M/Map~Map


import Map from 'M/Map';

Main constructor of the class. Creates a Map with parameters specified by the user

new Map(userParameters, options)

facade/js/Map.js, line 63
Name Type Description
userParameters string | Mx.parameters.Map

parameters

options Mx.parameters.MapOptions

custom options for the implementation provided by the user

Extends

  • M.facade.Base

Members

module:M/Map~Map.DRAWLAYER_STYLE{object}

Draw layer style options.

_defaultProj{Boolean}

Flag that indicates if the used projection is by default

panel{object}

userMaxExtent{Array.<Number>}

MaxExtent provided by the user

Methods

module:M/Map~Map.LAYER_SORT()

facade/js/Map.js, line 2657

TODO

addKML(layersParam){Map}

facade/js/Map.js, line 808

This function adds the KML layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.KML>

addLabel(layersParam)

facade/js/Map.js, line 2167

This function removes the WMC layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

addLayerGroup(layerGroups){M.Map}

facade/js/Map.js, line 584

TODO

Name Type Description
layerGroups Array.<M.layer.Group>

addLayers(layersParam){Map}

facade/js/Map.js, line 443

This function adds layers specified by the user

Name Type Description
layersParam string | Object | Array.<String> | Array.<Object>

addMVT()

facade/js/Map.js, line 1276

This function adds the vector tile layers

addPanels(){Map}

facade/js/Map.js, line 2335

TODO

addPlugin(plugin){Map}

facade/js/Map.js, line 1951

This function adds an instance of a specified developed plugin

Name Type Description
plugin Mx.Plugin

the plugin to add to the map

addPlugins(plugins){Map}

facade/js/Map.js, line 1977

This function adds plugins

Name Type Description
plugins Array.<Plugin>

plugins to add to the map

addPopup(){Map}

facade/js/Map.js, line 2555

TODO

Returns:
core map used by the implementation

addWFS(layersParam){Map}

facade/js/Map.js, line 1045

This function adds the WFS layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.WFS>

addWMC(layersParam){Map}

facade/js/Map.js, line 670

This function adds the WMC layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

addWMS(layersParam){Map}

facade/js/Map.js, line 916

This function adds the WMS layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.WMS>

addWMTS(layersParam){Map}

facade/js/Map.js, line 1156

This function adds the WMTS layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.WMTS>

calculateMaxExtent(){Promise}

facade/js/Map.js, line 1460

This function provides the maximum extent for this map instance. Async version of getMaxExtent

defaultProj()

facade/js/Map.js, line 2647

Getter of defaultProj_ attribute

destroy(){Map}

facade/js/Map.js, line 2149

This function destroys this map, cleaning the HTML and unregistering all events

drawFeatures(features)

facade/js/Map.js, line 2311

TODO

Name Type Description
features Array.<Feature> | Feature

drawPoints(points)

facade/js/Map.js, line 2272

This function removes the WMC layers to the map

Name Type Description
points Array.<Mx.Point> | Mx.Point

enableDrag(active)

facade/js/Map.js, line 2751

This function enables or disables the interaction DragPan

Name Type Description
active Boolean

enableMouseWheel(active)

facade/js/Map.js, line 2739

This function enables or disables the interaction MouseWheelZoom

Name Type Description
active Boolean

getBaseLayers(){Array.<Layer>}

facade/js/Map.js, line 414

This function gets the base layers added to the map

getBbox(){Mx.Extent}

facade/js/Map.js, line 1555

This function provides the current extent (bbox) of this map instance

getCenter(){Array.<Number>}

facade/js/Map.js, line 1663

This function provides the current center of this map instance

getContainer(){Object}

facade/js/Map.js, line 2452

This function provides the core map used by the implementation

Returns:
core map used by the implementation

getControls(controlsParam){Array.<Control>}

facade/js/Map.js, line 1319

This function gets controls specified by the user

Name Type Description
controlsParam string | Array.<String>

getEnvolvedExtent(){Promise}

facade/js/Map.js, line 2033

This function provides the promise of envolved extent of this map instance

getExactScale()

facade/js/Map.js, line 1835

This function provides the current scale of this map instance

getFeatureHandler(){M.handler.Feature}

facade/js/Map.js, line 431

This function adds layers specified by the user

getGeoJSON(layersParam){Array.<WFS>}

facade/js/Map.js, line 1017

This function gets the GeoJSON layers added to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>
Returns:
layers from the map

getImageMap()

facade/js/Map.js, line 2788

This function generate image map

getKML(layersParam){Array.<KML>}

facade/js/Map.js, line 772

This function gets the KML layers added to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

getLabel(layersParam){Map}

facade/js/Map.js, line 2237

This function removes the WMC layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

getLabels(layersParam){Map}

facade/js/Map.js, line 2249

This function removes the WMC layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

getLayerGroup(){Array.<M.layer.Group>}

facade/js/Map.js, line 568

TODO

getLayers(layersParam){Array.<Layer>}

facade/js/Map.js, line 368

This function gets the layers added to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

getMapImpl(){Object}

facade/js/Map.js, line 2467

This function provides the core map used by the implementation

Returns:
core map used by the implementation

getMaxExtent(){Mx.Extent}

facade/js/Map.js, line 1434

This function provides the maximum extent for this map instance

getMVT()

facade/js/Map.js, line 1222

This function gets the vector tile layers

getOverlayLayers(){Array.<Layer>}

facade/js/Map.js, line 2812

This function gets no-base layers added to the map

getPanels(){array.<Panel>}

facade/js/Map.js, line 2379

TODO

getPlugins(plugin){Map}

facade/js/Map.js, line 1917

TODO

Name Type Description
plugin Mx.Plugin

the plugin to add to the map

getPopup(){Popup}

facade/js/Map.js, line 2482

TODO

Returns:
core map used by the implementation

getPopups(){Popup}

facade/js/Map.js, line 2499

TODO

Returns:
core map used by the implementation

getProjection(){Mx.Projection}

facade/js/Map.js, line 1855

This function provides the current projection of this map instance

getResolutions(){Array.<Number>}

facade/js/Map.js, line 1767

This function provides the resolutions of this map instance

getRootLayers(layersParam){Array.<Layer>}

facade/js/Map.js, line 401

This function gets the layers which are not in any layerGroup

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

getRotation(){number}

facade/js/Map.js, line 2693

This function gets the rotation of the view map

getScale(){Mx.Projection}

facade/js/Map.js, line 1816

This function provides the current scale of this map instance

getTicket(ticket)

facade/js/Map.js, line 2108

This function gets the ticket of the map

Name Type Description
ticket String

getWFS(layersParam){Array.<WFS>}

facade/js/Map.js, line 981

This function gets the WFS layers added to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>
Returns:
layers from the map

getWMC(layersParam){Array.<WMC>}

facade/js/Map.js, line 634

This function gets the WMC layers added to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

getWMS(layersParam){Array.<WMS>}

facade/js/Map.js, line 880

This function gets the WMS layers added to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.WMC>
Returns:
layers from the map

getWMTS(layersParam){Array.<WMTS>}

facade/js/Map.js, line 1120

This function gets the WMTS layers added to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.WMTS>
Returns:
layers from the map

getZoom(){Number}

facade/js/Map.js, line 1608

This function provides the current zoom of this map instance

on()

facade/js/Map.js, line 2616

Sets the callback when the instace is loaded

refresh(){Map}

facade/js/Map.js, line 2632

This function refresh the state of this map instance, this is, all its layers.

Returns:
the instance

removeCenter()

facade/js/Map.js, line 1752

This function remove center for this map instance

removeControls(controlsParam){Map}

facade/js/Map.js, line 1397

This function removes the specified controls from the map

Name Type Description
controlsParam string | Array.<string>

specified by the user

removeFeatures(features)

facade/js/Map.js, line 2323

TODO

Name Type Description
features Array.<Feature> | Feature

removeKML(layersParam){Map}

facade/js/Map.js, line 852

This function removes the KML layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.KML>

removeLabel(layersParam){Map}

facade/js/Map.js, line 2261

This function removes the WMC layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

removeLayerGroup(layerGroups){M.Map}

facade/js/Map.js, line 612

TODO

Name Type Description
layerGroups Array.<M.layer.Group>

specified by the user

removeLayers(layersParam){Map}

facade/js/Map.js, line 537

This function removes the specified layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

specified by the user

removeMVT()

facade/js/Map.js, line 1253

This function removes the vector tile layers from map.

removeOverlayLayers(){Array.<Layer>}

facade/js/Map.js, line 2824

This function removes no-base layers to the map

removePanel()

facade/js/Map.js, line 2360

TODO

removePlugins(plugins){Map}

facade/js/Map.js, line 2002

This function removes the specified plugins from the map

Name Type Description
plugins Array.<Plugin>

specified by the user

removePopup(){Map}

facade/js/Map.js, line 2516

TODO

Returns:
core map used by the implementation

removeWFS(layersParam){Map}

facade/js/Map.js, line 1092

This function removes the WFS layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.WFS>

removeWMC(layersParam){Map}

facade/js/Map.js, line 747

This function removes the WMC layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.Layer>

removeWMS(layersParam){Map}

facade/js/Map.js, line 956

This function removes the WMS layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.WMS>

removeWMTS(layersParam){Map}

facade/js/Map.js, line 1198

This function removes the WMTS layers to the map

Name Type Description
layersParam Array.<string> | Array.<Mx.parameters.WMTS>

resetMaxExtent(){Map}

facade/js/Map.js, line 1537

This function resets the maximum extent of the Map.

setBbox(bboxParam, vendorOpts){Map}

facade/js/Map.js, line 1577

This function sets the bbox for this map instance

Name Type Description
bboxParam String | Array.<String> | Array.<Number> | Mx.Extent

the bbox

vendorOpts Object

vendor options

setBGColorContainer(color)

facade/js/Map.js, line 2724

This function assigns a color to the map container

Name Type Description
color String

setCenter(centerParam){Map}

facade/js/Map.js, line 1684

This function sets the center for this map instance

Name Type Description
centerParam String | Array.<String> | Array.<Number> | Mx.Center

the new center

setMaxExtent(maxExtentParam, zoomToExtent){Map}

facade/js/Map.js, line 1498

This function sets the maximum extent for this map instance

Name Type Default Description
maxExtentParam String | Array.<String> | Array.<Number> | Mx.Extent

the extent max

zoomToExtent Boolean true

Set bbox

setProjection(projection){Map}

facade/js/Map.js, line 1876

This function sets the projection for this map instance

Name Type Description
projection String | Mx.Projection

the bbox

setResolutions(resolutionsParam){Map}

facade/js/Map.js, line 1788

This function sets the resolutions for this map instance

Name Type Description
resolutionsParam String | Array.<String> | Array.<Number>

the resolutions

setRotation(rotation)

facade/js/Map.js, line 2708

This function sets the rotation of the view map

Name Type Description
rotation number

setTicket(ticket)

facade/js/Map.js, line 2086

This function adds a ticket to control secure layers

Name Type Description
ticket String

ticket user

setToClosestScale(scale)

facade/js/Map.js, line 2800

This function set scale to map

Name Type Description
scale Number

setZoom(zoomParam){Map}

facade/js/Map.js, line 1629

This function sets the zoom for this map instance

Name Type Description
zoomParam String | Number

the zoom

setZoomLevels(zoomLevels)

facade/js/Map.js, line 2763

This function set zoom levels

Name Type Description
zoomLevels Number

zoomToMaxExtent(){Map}

facade/js/Map.js, line 2067

This function gets and zooms the map into the calculated extent