ALKMaps.Control.ArgParser

The ArgParser control adds location bar querystring parsing functionality to an ALKMaps Map.  When added to a Map control, on a page load/refresh, the Map will automatically take the href string and parse it for lon, lat, zoom, and layers information.

Inherits from

Summary
ALKMaps.Control.ArgParserThe ArgParser control adds location bar querystring parsing functionality to an ALKMaps Map.
Properties
center{ALKMaps.LonLat}
zoom{int}
layers{String} Each character represents the state of the corresponding layer on the map.
displayProjection{ALKMaps.Projection} Requires proj4js support.
Constructor
ALKMaps.Control.ArgParser
Functions
getParameters
setMapSet the map property for the control.
setCenterAs soon as a baseLayer has been loaded, we center and zoom ...and remove the handler.
configureLayersAs soon as all the layers are loaded, cycle through them and hide or show them.

Properties

zoom

{int}

layers

{String} Each character represents the state of the corresponding layer on the map.

displayProjection

{ALKMaps.Projection} Requires proj4js support.  Projection used when reading the coordinates from the URL.  This will reproject the map coordinates from the URL into the map’s projection.

If you are using this functionality, be aware that any permalink which is added to the map will determine the coordinate type which is read from the URL, which means you should not add permalinks with different displayProjections to the same map.

Constructor

ALKMaps.Control.ArgParser

Parameters

options{Object}

Functions

getParameters

getParameters: function(url)

setMap

setMap: function(map)

Set the map property for the control.

Parameters

map{ALKMaps.Map}

setCenter

setCenter: function()

As soon as a baseLayer has been loaded, we center and zoom ...and remove the handler.

configureLayers

configureLayers: function()

As soon as all the layers are loaded, cycle through them and hide or show them.

This class represents a longitude and latitude pair
Methods for coordinate transforms between coordinate systems.
getParameters: function(url)
setMap: function(map)
Set the map property for the control.
setCenter: function()
As soon as a baseLayer has been loaded, we center and zoom ...and remove the handler.
configureLayers: function()
As soon as all the layers are loaded, cycle through them and hide or show them.
Controls affect the display or behavior of the map.
Instances of ALKMaps.Map are interactive maps embedded in a web page.
Close