ALKMaps.Control.SingleSearch (Leaflet)

This control is for single search.

Summary
ALKMaps.Control.SingleSearch (Leaflet)This control is for single search.
Properties
POI_ICONS{Object} POI icons
Constants
DEFAULT_SEARCH_OPTION{Object} Default search settings.
Functions
setSearchOptionUpdates search option.
setMarkerStyleSets location marker icon style configuration properties.
setMarkerConfigSets location marker configuration properties.
setPopupConfigSets popup configuration properties.

Properties

POI_ICONS

{Object} POI icons

Constants

DEFAULT_SEARCH_OPTION

{Object} Default search settings.  Region is NA.  Max results count is 20.  You can change search options by using the searchOption property or call setSearchOption method.

Functions

setSearchOption

setSearchOption: function(key,
value)

Updates search option.

Parameters

key{String} Key for the property.
value{String|Number|Function} It depends on the key.  Valid keys are “query”, “maxResults”, “currentLonLat”, “excludedSearchTypes”, “poiCategories”, “countries”, “countryType”, “states”, “region”, “async”, “success”, and “failure”.

Definitions for the keys

query{String} Your search query.  If it is not supplied, the search input text box value will be used.
maxResults{Number} Maximum returned results.  Between 0 and 100.
currentLonLat{Object} Current longitude and latitude values in degrees.
excludedSearchTypes{String} Comma-separated list of types to exclude from the search.
poiCategories{String} Comma-separated list of poi category names by which you want to filter all POI results.
countries{String} Comma-separated list of country abbreviations by which you want to filter all results.  Defaults to ISO format.
countryType{String} ISO, FIPS, GENC2, GENC3
states{String} Comma-separated list of state abbreviations by which you want to filter all results.
region{String} NA, EU, WW.  To get supported regions, you can call ALKMaps.Geocoder.singleSearchGetRegions() method.
async{Boolean} Open an asynchronous request.  Default is true.
success{Function} To overwrite default handler, supply custom method here.
failure{Function} To overwrite default handler, supply custom method here.

setMarkerStyle

setMarkerStyle: function(key,
value)

Sets location marker icon style configuration properties.  Valid keys are “iconUrl”, “iconSize”, “iconAnchor” and “popupAnchor”.

setMarkerConfig

setMarkerConfig: function(key,
value)

Sets location marker configuration properties.  Valid keys are “exclusive”, “centerOnMap”, and “zoomLevel”.  If exclusive is set to true, any existing marker will be removed before a new marker is added.  If centerOnMap is true, marker will be centered on the map with the zoom level that is configured in zoomLevel.

setPopupConfig

setPopupConfig: function(key,
value)

Sets popup configuration properties.  Valid keys are “show” and “closeButton’.  If show is set to true, the popup will be added to the location marker.  If closeButton is true, the close button will be added to the popup.

setSearchOption: function(key,
value)
Updates search option.
setMarkerStyle: function(key,
value)
Sets location marker icon style configuration properties.
setMarkerConfig: function(key,
value)
Sets location marker configuration properties.
setPopupConfig: function(key,
value)
Sets popup configuration properties.
Close