ALKMaps.Protocol.CustomPlaces

A basic HTTP protocol for getting Custom Places from the server, and then convert them into KML features.  Create a new instance with the ALKMaps.Protocol.CustomPlaces constructor.

Inherits from

Summary
ALKMaps.Protocol.CustomPlacesA basic HTTP protocol for getting Custom Places from the server, and then convert them into KML features.
Properties
format
Constructor
ALKMaps.Protocol.CustomPlacesA class for custom places layer HTTP protocol.
Functions
destroyClean up the protocol.
handleResponseHandles custom places request response.
parseFeaturesPasre response JSON object into vector features, using KML format as the transformation.
readTileRequest custom places in the tile bounds.
readTilesRequest custom places in tiles.

Properties

format

{ALKMaps.Format.KML}Default format for transforming server side custom places object into KML format.

Constructor

ALKMaps.Protocol.CustomPlaces

A class for custom places layer HTTP protocol.

Parameters

options{Object} Optional object whose properties will be set on the instance.

Valid options include

format{ALKMaps.Format.KML}

Functions

destroy

destroy: function()

Clean up the protocol.

handleResponse

handleResponse: function(resp,
options)

Handles custom places request response.

Parameters

resp{Object} Response object in JSON.
options{Object} Includes callback function.

parseFeatures

parseFeatures: function(response)

Pasre response JSON object into vector features, using KML format as the transformation.  Build-in KML class may help showing meta data.

Parameters

response{Object}

readTile

readTile: function(tile,
options)

Request custom places in the tile bounds.

Parameters

tile{Object}
options{Object}

readTiles

readTiles: function(tiles,
options)

Request custom places in tiles.

Parameters

tiles{Array of Object} tile objects.
options{Object} requet object.

Valid properties of a tile include

id{String} In z-x-y format, it is used to identify a tile.
bounds{ALKMaps.Bounds} Max bounds for the tile.
custPlaceSetId{String} Custom places set ID filter.
custPlaceTag{String} Custom places tag filter.  //Todo: if the service adds more params, we need to add them here.

Valid options

callback{Method} Callback method to handle the service response.
scope{Object} The scope of “this” object.
destroy: function()
Clean up the protocol.
handleResponse: function(resp,
options)
Handles custom places request response.
parseFeatures: function(response)
Pasre response JSON object into vector features, using KML format as the transformation.
readTile: function(tile,
options)
Request custom places in the tile bounds.
readTiles: function(tiles,
options)
Request custom places in tiles.
A class for custom places layer HTTP protocol.
Abstract vector layer protocol class.
Read/Write KML.
Close