panaghia edited this page Jul 10, 2011 · 6 revisions
Clone this wiki locally

Class: GeoSuggester

Provide an input interface to quickly insert geographic data into forms.


Options, Events

GeoSuggester: constructor


var geo = new GeoSuggester([options]);


options - (object, optional) An object with options.


  • inputItem - (String: default to null) The ID of input field in which user will insert address string.

  • container - (String: default to null) The ID of element that contains inputItem.

  • initText - (string) The placeholder for input field.

  • rollHeight - (number: default to 350) The height of map canvas, once opened.

  • baloonMsg - (string) The message that will be displayed as instruction near the map marker.

  • Delay - (number) Delay timer before showing map canvas (default 600 ms).

  • preferRegion - (string) TLD identifier to prefere a certain region in geocoding (E.g., 'IT').


  • select - (function) The function to execute when the user chooses a geolocation

  • clear - (function) The function to execute when the user clears the input-box


This functions provide access to instance variables.

Calls to these must be done after user choice (see onSelect[select] event)

  • getPostalCode

  • getStreetNumber

  • getRoute

  • getLocality

  • getCountry

  • getAdminArea1

  • getAdminArea2

  • getLatitude

  • getLongitude