This namespace contains definitions for geocoding providers. A geocoding provider is any object that can resolve an address string and return a coordinate plus several other information about the returned point. At least the coordinates returned must be in EPSG:4326 LonLat although the provider can return other projection coordinates if it is defined a function for it.
- Source:
- mapspace/geocoding/geocoding.jsdoc
Classes
Type Definitions
-
Address
-
Geocoding address returned by a Geocoding provider.
- Source:
- mapspace/typedefs.js
Properties:
Name Type Description fullname
string Full name of the address.
postcode
string | undefined Postal code.
building
string | undefined Building identifier.
housenumber
string | undefined House number identifier.
road
string | undefined Road or atreet name.
town
string | undefined Town name.
village
string | undefined Village name.
city
string | undefined City name.
state
string | undefined State name.
country
string | undefined Country name.
-
CoordsOptions
-
Options for the Coords geocoding provider.
- Source:
- mapspace/typedefs.js
Properties:
Name Type Description name
string | undefined Name of the object provider. To be shown in a control selector. Default is 'Coords'.
tipLabel
string | undefined A tip label to be shown in a control textbox for best pattern in query entry.
autocompletable
boolean | undefined If true this provider search function can be used in an autocomplete control.
-
GoogleOptions
-
Options for the Google geocoding provider.
- Source:
- mapspace/typedefs.js
Properties:
Name Type Description name
string | undefined Name of the object provider. To be shown in a control selector. Default is 'Coords'.
tipLabel
string | undefined A tip label to be shown in a control textbox for best pattern in query entry.
autocompletable
boolean | undefined If true this provider search function can be used in an autocomplete control.
usertoken
string | undefined The Google APIKEY for using Google Geocodig API web services.
geocoder
Object | undefined The Google google.maps.Geocoder object from Google Maps API for using Google Maps API instead or Geocoding API. If both usertoken and geocoder are present geocoder takes precedence.
language
string | undefined The globalization code for the results' language.
-
OSMOptions
-
Options for the OSM Nominatim geocoding provider.
- Source:
- mapspace/typedefs.js
Properties:
Name Type Description name
string | undefined Name of the object provider. To be shown in a control selector. Default is 'OSM'.
tipLabel
string | undefined A tip label to be shown in a control textbox for best pattern in query entry.
autocompletable
boolean | undefined If true this provider search function can be used in an autocomplete control.
-
OSMProxyOptions
-
Options for the OSM geocoding proxy provider.
- Source:
- mapspace/typedefs.js
Properties:
Name Type Description name
string | undefined Name of the object provider. To be shown in a control selector. Default is 'OSM Proxy'.
tipLabel
string | undefined A tip label to be shown in a control textbox for best pattern in query entry.
autocompletable
boolean | undefined If true this provider search function can be used in an autocomplete control.
userkey
string | undefined Userkey to access Mapspace Services.
-
ProviderOptions
-
Options for a the base of geocoding providers.
- Source:
- mapspace/typedefs.js
Properties:
Name Type Description name
string | undefined Name of the object provider. To be shown in a control selector.
tipLabel
string | undefined A tip label to be shown in a control textbox for best pattern in query entry.
autocompletable
boolean | undefined If true this provider search function can be used in an autocomplete control.
-
ProviderType
-
Types of geocoding providers.
Name Value Mapspace.geocoding.ProviderType.BING bing Mapspace.geocoding.ProviderType.COORDS coords Mapspace.geocoding.ProviderType.GOOGLE google Mapspace.geocoding.ProviderType.MAPQUEST mapquest Mapspace.geocoding.ProviderType.OSM osm Mapspace.geocoding.ProviderType.OSMPROXY osmproxy Mapspace.geocoding.ProviderType.PELIAS pelias Mapspace.geocoding.ProviderType.PHOTON photon Mapspace.geocoding.ProviderType.SOK sok - Source:
- mapspace/enums.js
-
Result
-
Geocoding result is a pair of address and coordinate returned by a Geocoding provider, with extra info as the projection of the coordinate and a sample of how to render the address and the location in HTML.
- Source:
- mapspace/typedefs.js
Properties:
Name Type Description address
Mapspace.geocoding.Address The address.
location
Mapspace.Coordinate The coordinate.
projection
string | undefined The EPSG projection code of the location coordinates as 'EPSG:code' or undefined if the geocoding provider could not determine it.
htmlAddress
string | undefined An HTML formatted version of address.
copyAddress
string | undefined A formatted version of address to send to clipboard when doing a copy.
htmlLocation
string | undefined An HTML formatted version of location.
geocodingType
Mapspace.GecodingType | undefined Type of geocoding action.
-
SokOptions
-
Options for the Mapspace Sok geocoding provider.
- Source:
- mapspace/typedefs.js
Properties:
Name Type Description name
string | undefined Name of the object provider. To be shown in a control selector. Default is 'Sok'.
tipLabel
string | undefined A tip label to be shown in a control textbox for best pattern in query entry.
autocompletable
boolean | undefined If true this provider search function can be used in an autocomplete control.
userkey
string | undefined Userkey to access Mapspace Services.