API Docs for: 2.2
Show:

MQ.Geocode Class

Extends L.Class

This class provides access to MapQuest's Geocoding Service.

NOTE: This is typically not instantiated directly, instead use MQ.geocode.

Constructor

MQ.Geocode

(
  • [options]
)

Parameters:

  • [options] Object optional
    • [map] L.Map optional

      if set will place locations on the map

    • [icon] L.Icon optional

      default icon for the main marker

    • [bounds] L.Bounds optional
       When using batch geocoding or when ambiguous results are returned, any results within the provided bounds will be moved to the top of the results list.
    • [mapFitBounds] Boolean default = true

      if map is set will fit map to results

    • [maxResults] Number default = -1

      The number of results to limit the response to in the case of an ambiguous address. (-1 indicates no limit)

    • [key] String optional

Methods

_getOptionParameters

() Object private

Returns <Object>

_onResult

(
  • response
)
private

Parameters:

_placeOnMap

(
  • results
)
private

Parameters:

describeLocation

(
  • location
)
String

Creates an HTML string of a location object.

Parameters:

Returns <String>

initialize

(
  • options
)
protected

Parameters:

reverse

(
  • latLng
)
MQ.Geocode chainable

See more detailed documentation: MapQuest's Geocoding Service.

Parameters:

Returns <MQ.Geocode>

Events

error

Event Payload:

success

Event Payload: