Instances of ALKMaps.Layer.BaseMap are used to display data from ALK Web Service Create a new ALK Map layer with the ALKMaps.Layer.BaseMap constructor.
ALKMaps. | Instances of ALKMaps.Layer.BaseMap are used to display data from ALK Web Service Create a new ALK Map layer with the ALKMaps.Layer.BaseMap constructor. |
Constants | |
DEFAULT_PARAMS | {Object} Hashtable of default parameter key/value pairs |
Properties | |
isBaseLayer | {Boolean} Default is true for WMS layer |
encodeBBOX | {Boolean} Should the BBOX commas be encoded? |
displayOutsideMaxExtent | {Boolean} If wrapDateLine is true, zoom level gets adjusted to prevent user zooming way out. |
singleTile | {Boolean} Use tiles for single image dynamic map. |
tileOrigin | {ALKMaps.LonLat} Tile origin |
zoomOffset | {Number} Using zoomOffset is an alternative to setting serverResolutions if you only want to expose a subset of the server resolutions. |
transparentOverlayLayer | {ALKMaps.Layer.BaseMap} Transparent overlay on satellite map. |
Constructor | |
ALKMaps. | Create a new ALK map base layer object |
Functions | |
setMap | |
destroy | Destroy this layer |
clone | Create a clone of this layer |
getURL | Return a GetMap query string for this layer |
getTileXYZ | Calculates x, y and z for the given bounds. |
mergeNewParams | Catch changeParams and uppercase the new params to be merged in before calling changeParams on the super class. |
getFullRequestString | Combine the layer’s url with its params and these newParams. |
changeStyle | Used to switch map styles. |
setVisibility | Change layer visibility. |
afterAdd | When satellite or terrain layer is added as a base layer, add the transparent layer at the same time. |
cloneOverlayLayer | Clones the base map layer with some modifications. |
setContent | Initialize drawergroups and then add map drawers. |
addContent | Add map drawers. |
removeContent | Remove map drawers Drawers could be a comma-delimited string, an array of strings, or an array of comma-delimited strings. |
setSatelliteImageSource | Sets the satellite provider, and redraws layer and updates attribution if in the satellite style. |
{Number} Using zoomOffset is an alternative to setting serverResolutions if you only want to expose a subset of the server resolutions.
Create a new ALK map base layer object
name | {String} A name for the layer |
params | {Object} An object with key/value pairs representing the GetMap query string parameters and parameter values. |
options | {Object} Hashtable of extra options to tag onto the layer. These options include all properties listed above, plus the ones inherited from superclasses. |
var layer = new ALKMaps.Layer.BaseMap( "ALK Maps", { style: ALKMaps.STYLE.DATADARK, region: 'NA' }, { sphericalMercator: true, singleTile: false, zoomOffset:0, // Positive whole number from 0 to 18 wrapDateLine: true, displayInLayerSwitcher: false, resolutions: [], attribution: "Your attribution info", attrUseHyperlink: true } );
clone: function( obj )
Create a clone of this layer
{ALKMaps.Layer.BaseMap} An exact clone of this layer
getURL: function( bounds )
Return a GetMap query string for this layer
bounds | {ALKMaps.Bounds} A bounds representing the bbox for the request. |
{String} A string with the layer’s url and parameters and also the passed-in bounds and appropriate tile size specified as parameters.
getTileXYZ: function( bounds )
Calculates x, y and z for the given bounds.
bounds | {ALKMaps.Bounds} |
{Object} | an object with x, y and z properties. |
mergeNewParams: function( newParams )
Catch changeParams and uppercase the new params to be merged in before calling changeParams on the super class.
Once params have been changed, the tiles will be reloaded with the new parameters.
newParams | {Object} Hashtable of new params to use |
getFullRequestString: function( newParams, altUrl )
Combine the layer’s url with its params and these newParams.
Add the SRS parameter from projection -- this is probably more eloquently done via a setProjection() method, but this works for now and always.
newParams | {Object} |
altUrl | {String} Use this as the url instead of the layer’s url |
{String}
setMap: function( map )
Destroy this layer
destroy: function()
Create a clone of this layer
clone: function( obj )
Return a GetMap query string for this layer
getURL: function( bounds )
Calculates x, y and z for the given bounds.
getTileXYZ: function( bounds )
Catch changeParams and uppercase the new params to be merged in before calling changeParams on the super class.
mergeNewParams: function( newParams )
Combine the layer’s url with its params and these newParams.
getFullRequestString: function( newParams, altUrl )
Used to switch map styles.
changeStyle: function( style )
Change layer visibility.
setVisibility: function( visibility )
When satellite or terrain layer is added as a base layer, add the transparent layer at the same time.
afterAdd: function()
Clones the base map layer with some modifications.
cloneOverlayLayer: function( style )
Initialize drawergroups and then add map drawers.
setContent: function ( content )
Add map drawers.
addContent: function ( contentToAdd )
Remove map drawers Drawers could be a comma-delimited string, an array of strings, or an array of comma-delimited strings.
removeContent: function ( contentToRemove )
Sets the satellite provider, and redraws layer and updates attribution if in the satellite style.
setSatelliteImageSource: function( imgSrc )