Skip to content

Documentation

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.

Implements:

Options, Events

GeoSuggester: constructor

Syntax

var geo = new GeoSuggester([options]);

Arguments:

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

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').

Events:

  • 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

Functions:

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

Something went wrong with that request. Please try again.