Initialize Map
To initialize map pass options to the initializeMap
function.
Options
-
targetElement- The container for the map, the id of the element. -
tileSettings- Settings of the tile layerSettings structure
-
source- Type of the source. Supported sourcesxyz | tiledWms | ktn_ektis. -
url- Url of the source. -
serverType- Type of the tile server. This option is only used when source type istiledWms. -
layers- Name of the layer set on the tile server. This option is only used when source type istiledWms. -
extent- An array of numbers representing an extent. This option is only used when source type istiledWms.
-
-
zoomLevel- Optional parameter. Sets the zoom level of the map. If not set then default values will be used. Default value is8 -
center- Optional parameter. Sets the center of the map. If not set then default values will be used.Center structure
-
lat- Optional parameter. Sets the lattitude of the map. If not set then default value will be used. Default value is40.378165 -
lon- Optional parameter. Sets the longitude of the map. If not set then default value will be used. Default value is49.82999
-
Example
var options = {
tileSettings: {
source: 'ktn_ektis',
url: 'https://arc.eagro.az'
},
zoomLevel: 12,
center: {
lat: 40.4,
lon: 49.8
},
targetElement: 'map' // Id of the <div> element. Container of the map.
};
GisTools.initializeMap({options: options});