The Permalink control is hyperlink that will return the user to the current map view. By default it is drawn in the lower right corner of the map. The href is updated as the map is zoomed, panned and whilst layers are switched.
ALKMaps. | The Permalink control is hyperlink that will return the user to the current map view. |
Properties | |
argParserClass | {Class} The ArgParser control class (not instance) to use with this control. |
element | {DOMElement} |
anchor | the character ‘#’ is used in place of the character ‘?’ |
base | {String} |
displayProjection | {ALKMaps.Projection} Requires proj4js support. |
Constructor | |
ALKMaps. | |
Functions | |
destroy | |
setMap | Set the map property for the control. |
draw | {DOMElement} |
updateLink | |
createParams | Creates the parameters that need to be encoded into the permalink url. |
{ALKMaps.Projection} Requires proj4js support. Projection used when creating the coordinates in the link. This will reproject the map coordinates into display coordinates. If you are using this functionality, the permalink which is last 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.
createParams: function( center, zoom, layers )
Creates the parameters that need to be encoded into the permalink url.
center | {ALKMaps.LonLat} center to encode in the permalink. Defaults to the current map center. |
zoom | {Integer} zoom level to encode in the permalink. Defaults to the current map zoom level. |
layers | {Array(ALKMaps.Layer)} layers to encode in the permalink. Defaults to the current map layers. |
{Object} Hash of parameters that will be url-encoded into the permalink.
destroy: function()
Set the map property for the control.
setMap: function( map )
{DOMElement}
draw: function()
updateLink: function()
Creates the parameters that need to be encoded into the permalink url.
createParams: function( center, zoom, layers )