API Docs for: 7.2
Show:

MQA.GeocodeIO Class

Module: MQA

MQA.GeocodeIO class. This class defines methods for geocoding.

Constructor

MQA.GeocodeIO

(
  • baseURI
  • noProxy
)

Parameters:

  • baseURI String

    the base URI to use, defaults to /geocodeio

  • noProxy Boolean

    if true then script tags will be used instead of ajax calls

Methods

batch

(
  • geocodeRequest
  • ioSettings
  • callback
)

Locations is an array of location objects (specified above). On success passes an array of location arrays (the beloved LocationCollectionCollection) to the callback.

Otherwise the same as geocode().

Parameters:

geocode

(
  • loc
  • geocodeOptions
  • ioSettings
  • callback
)

Execute an address geocode. On success a array of geocoded locations is passed to the callback (locations), on failure: (false, errorInfo).

Request

{
   addressLine1: "300 Granite Run Dr.",
   city: "Lancaster",
   state: "PA",
   county: "Lancaster County",
   postalCode: "17601",
   country: "US"
}

Response

[
   {
       addressLine1: "300 Granite Run Dr.",
       city: "Lancaster",
       state: "PA",
       county: "Lancaster County",
       postalCode: "17601",
       country: "US",
       lat: 40.0378,
       lng: -76.305801
   }
]

This method delegates to MQA.IO.doGetJSON for work, so the return value, ioSettings and callback follow the contract laid out by that method.

Parameters:

reverse

(
  • latlng
  • geocodeOptions
  • ioSettings
  • callback
)

Request

{
    lat: 40.050225,
    lng: -76.304673
}

Response

Array of location objects (see above).

Parameters: