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 layer
    Settings structure
    • source - Type of the source. Supported sources xyz | tiledWms | ktn_ektis.
    • url - Url of the source.
    • serverType - Type of the tile server. This option is only used when source type is tiledWms.
    • layers - Name of the layer set on the tile server. This option is only used when source type is tiledWms.
    • extent - An array of numbers representing an extent. This option is only used when source type is tiledWms.
  • zoomLevel - Optional parameter. Sets the zoom level of the map. If not set then default values will be used. Default value is 8
  • 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 is 40.378165
    • lon - Optional parameter. Sets the longitude of the map. If not set then default value will be used. Default value is 49.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});