Create a Markers layer for drawing and managing POI objects.
ALKMaps. | Create a Markers layer for drawing and managing POI objects. |
Properties | |
displayInfo | Property indicating whether or not to display popups containing information on the individual POIs on click. |
displayName | Property indicating whether or not to display hover tooltip containing POI’s place name. |
poiFeatures | Property containing array of POI features currently on the layer. |
beforeMarkerAdded | Optional user defined callback function for manipulating POI markers before they are added to the layer. |
Constructor | |
ALKMaps. | Create a markers layer for drawing and managing POI objects. |
Functions | |
destroy | Destroy this layer |
radiusSearch | Performs a search of all POIs in the specified categories within the radius distance of the given center point. |
getCategoryImage | Retrieve the default image for the given category; |
removeAllPOIs | Remove all POI features from the layer. |
removeCategory | Remove all POI features from the layer that are in the given category. |
setCategoryVisibility | Set visibility of all POI features from the layer that are in the given category. |
getPoisBy | Retrieve list of POIs by attribute value. |
Create a markers layer for drawing and managing POI objects.
name | {String} Name of the layer. |
params | {Object} properties to set on this layer. |
displayInfo | {Boolean} Indicates whether or not to display hover popups containing information on the individual POIs. |
{ALKMaps.Layer.POI} A new markers layer for drawing and managing POI objects.
radiusSearch: function ( params )
Performs a search of all POIs in the specified categories within the radius distance of the given center point. These points are then added to the layer.
center | {ALKMaps.LonLat} Center point of the search |
radius | {Number} Distance from the center point to search for POIs |
units | {String} Distance units of the radius. Default Miles. |
categories | {String} Comma delimited string of category names to include in the search. Default All. |
region | {String} Data region of the search. |
dataset | {String} Dataset of the search. |
options | {Object} Options object. (optional) |
success | {Function} callback function called after success with the return object as a parameter. Allows for the manipulation of the POI list returned from the service before it is passed to the layer for processing and rendering. If an array is returned from this function, it will be used as the new POI list.(optional) |
failure | {Function} callback function called after failure with the return object as a parameter. (optional) |
graphic | {String} Single external graphic to use for all POIs returned by this search. |
graphicHeight | {Number} Height of the graphic in pixels. |
graphicWidth | {Number} Width of the graphic in pixels. |
displayInfo | {Boolean} Indicates whether or not to display info popups for this search. |
displayName | {Boolean} Indicates whether or not to display hover tooltip containing POI’s place name. |
eraseSearches | {Boolean} Indicates whether or not to remove any existing POIs from previous searches. |
limit | {Number} Limits the number of POIs that will be rendered. Please note that the POIs are returned from the service in order of their distance from the center of the search. Therefore, specifying a limit will cause only that many of the closest POIs to be displayed. |
getCategoryImage: function ( category )
Retrieve the default image for the given category;
hexCategory | {String} The category’s hexadecimal enum value. |
{Object} Object containing the category’s name and ALKMaps.IMAGE corresponding category image.
Destroy this layer
destroy: function()
Performs a search of all POIs in the specified categories within the radius distance of the given center point.
radiusSearch: function ( params )
Retrieve the default image for the given category;
getCategoryImage: function ( category )
Remove all POI features from the layer.
removeAllPOIs: function ()
Remove all POI features from the layer that are in the given category.
removeCategory: function ( category )
Set visibility of all POI features from the layer that are in the given category.
setCategoryVisibility: function ( category, show )
Retrieve list of POIs by attribute value.
getPoisBy: function ( attribute, value )