ALKMaps.Layer.POI

Create a Markers layer for drawing and managing POI objects.

Inherits from

Summary
ALKMaps.Layer.POICreate a Markers layer for drawing and managing POI objects.
Properties
displayInfoProperty indicating whether or not to display popups containing information on the individual POIs on click.
displayNameProperty indicating whether or not to display hover tooltip containing POI’s place name.
poiFeaturesProperty containing array of POI features currently on the layer.
beforeMarkerAddedOptional user defined callback function for manipulating POI markers before they are added to the layer.
Constructor
ALKMaps.Layer.POICreate a markers layer for drawing and managing POI objects.
Functions
destroyDestroy this layer
radiusSearchPerforms a search of all POIs in the specified categories within the radius distance of the given center point.
getCategoryImageRetrieve the default image for the given category;
removeAllPOIsRemove all POI features from the layer.
removeCategoryRemove all POI features from the layer that are in the given category.
setCategoryVisibilitySet visibility of all POI features from the layer that are in the given category.
getPoisByRetrieve list of POIs by attribute value.

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.Layer.POI

Create a markers layer for drawing and managing POI objects.

Parameters

name{String} Name of the layer.
params{Object} properties to set on this layer.

Valid params include

displayInfo{Boolean} Indicates whether or not to display hover popups containing information on the individual POIs.

Returns

{ALKMaps.Layer.POI} A new markers layer for drawing and managing POI objects.

Functions

destroy

destroy: function()

Destroy this layer

radiusSearch

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.

Parameters

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)

Valid options include

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

getCategoryImage: function (category)

Retrieve the default image for the given category;

Parameters

hexCategory{String} The category’s hexadecimal enum value.

Returns

{Object} Object containing the category’s name and ALKMaps.IMAGE corresponding category image.

removeAllPOIs

removeAllPOIs: function ()

Remove all POI features from the layer.

removeCategory

removeCategory: function (category)

Remove all POI features from the layer that are in the given category.

Parameters

category{String} Category of POI features to remove.

setCategoryVisibility

setCategoryVisibility: function (category,
show)

Set visibility of all POI features from the layer that are in the given category.

Parameters

category{String} Category of POI features to remove.
show{Boolean} Indicates whether to show hide POIs of the specified category.

getPoisBy

getPoisBy: function (attribute,
value)

Retrieve list of POIs by attribute value.

Parameters

attribute{String} Name of attribute.  Supported attribute values include Category,PlaceName,StreetAddress,Street,City,State,DistanceFromCenter
value{String/Number} Desired attribute value.
destroy: function()
Destroy this layer
radiusSearch: function (params)
Performs a search of all POIs in the specified categories within the radius distance of the given center point.
getCategoryImage: function (category)
Retrieve the default image for the given category;
removeAllPOIs: function ()
Remove all POI features from the layer.
removeCategory: function (category)
Remove all POI features from the layer that are in the given category.
setCategoryVisibility: function (category,
show)
Set visibility of all POI features from the layer that are in the given category.
getPoisBy: function (attribute,
value)
Retrieve list of POIs by attribute value.
Create a markers layer for drawing and managing POI objects.
This class represents a longitude and latitude pair
A set of predefined icons for use with ALKMaps.Icon.
Close