new GoMap(interactions)
| Name | Type | Description |
|---|---|---|
interactions |
GoInteractions |
Methods
-
addInteractions(interactions)
Map/GoMap.ts, line 111 -
This function add to the map all the interactions defined in json configuration
Name Type Description interactionsmodule:types~interactions json configuration
-
addLayer(idMap, layerOptions){GOLayer}
Map/GoMap.ts, line 541 -
Add one layer to Map *Example:
const options = ' { "id": "manantial", "alias": "Manantial", "layerType": "GO_VECTOR_LAYER", "isBaseLayer": false, "opacity": 1, "url": "ENV/geoserver/SACMEX", "layerName": "SACMEX:manantial", "urlFolder": "Geografía/", "zIndex":1, "defaultVisibility":false, "sldStyle": { "url": "ENV/geoserver/rest/styles/manantial.sld", "mapUnits": true } } ' const GoMap = new GoMap(); GoMap.addLayer(options)Name Type Description idMapstring Name of map to add layer
layerOptionsmodule:types~layerOptions Options from Layer to configurate all
Returns:
Type Description GOLayer -
addMap(options)
Map/GoMap.ts, line 76 -
This function creates a Map with a json configuration
Name Type Description optionsmodule:types~mapOptionsBasic json configuration
-
bindViews(refView, viewsToBind)
Map/GoMap.ts, line 744 -
This Method allows to bind views taking one of them as a reference of bind
Name Type Description refViewstring Name of reference map
viewsToBindArray.<string> Array of map names
-
createMap(div, view){module:types~OlMap}
Map/GoMap.ts, line 176 -
This function allow to create a map passing the id of the div
Name Type Description divstring The id of the div
viewmodule:types~GoView The view of the map
Returns:
Type Description module:types~OlMap Return a new map -
createPerspectiveMap(div, view){module:types~OlMap}
Map/GoMap.ts, line 193 -
This function allow to create a perspective map passing the id of the div
Name Type Description divstring The id of the div
viewmodule:types~GoView The view of the map
Returns:
Type Description module:types~OlMap Return a new map -
createProjection(options)
Map/GoMap.ts, line 139 -
Name Type Description optionsmodule:types~projOptions This function creates a projection with a json configuration
-
createView(options, idMap){module:types~GoView}
Map/GoMap.ts, line 208 -
This function allow to create a view passing the id of the map.
Name Type Description optionsmodule:types~optionsView The options of the view
idMapstring The id of the map
Returns:
Type Description module:types~GoView Return a new view -
existLayer(idMap, idLayer){void}
Map/GoMap.ts, line 681 -
This function allow to determine if the layer exists
Name Type Description idMapstring The id of the map
idLayerstring The id of the layer
Returns:
Type Description void Return nothing -
flyTo(map, centerTo, duration, zoom){void}
Map/GoMap.ts, line 779 -
This function allow to move the map to a new position
Name Type Description mapmodule:types~OlMap The map to move
centerToArray.<number> The center to move
durationnumber The duration of the move
zoomnumber The zoom to move
Returns:
Type Description void Return nothing -
flyToCenter(idMap, centerTo, duration, zoom)
Map/GoMap.ts, line 356 -
This function add animation to translate from one position to another
Name Type Description idMapstring Name of the map we want to change center
centerToArray.<number> Center to fly
durationnumber Duration in secons the dynamic fly
zoomnumber optional Value to final zoom
-
getAllStaging(){Map.<string, GOStagingMap>}
Map/GoMap.ts, line 389 -
Obtain all data from all maps: Map,Layers, interacctions etc....
Returns:
Type Description Map.<string, GOStagingMap> -
getCenter(idMap){Coordinate}
Map/GoMap.ts, line 269 -
This function get center from a Map with a json configuration
Name Type Description idMapstring Name of the map we want to obtain center
Returns:
Type Description Coordinate Return a Coordinates Center -
getInteractions()
Map/GoMap.ts, line 164 -
This function return interactions for this map
-
getLanguage(){types.SupportedLangs}
Map/GoMap.ts, line 474 -
Get Actual language
Returns:
Type Description types.SupportedLangs -
getLayers(idMap){GOLayer}
Map/GoMap.ts, line 500 -
Get All layers from Map
Name Type Description idMapstring Name of map to obtain layers
Returns:
Type Description GOLayer -
getMap(idMap){OlMap}
Map/GoMap.ts, line 372 -
Obtain OpenLayers Map
Name Type Description idMapstring Name of the map we want obtain
Returns:
Type Description OlMap -
getProjection(idMap){string}
Map/GoMap.ts, line 230 -
This function allow to get the projection of the map
Name Type Description idMapstring This function creates a Map with a json configuration
Returns:
Type Description string EPSG Return a Code:EPSG projection map example: EPSG:4326 -
getStaging(idMap){GOStagingMap}
Map/GoMap.ts, line 400 -
Obtain all data from one map: Map,Layers, interacctions etc....
Name Type Description idMapstring Name of map to obtain all data
Returns:
Type Description GOStagingMap -
getTheme(){themes}
Map/GoMap.ts, line 448 -
Gets actual theme for all maps, if you never used setThemeAllMaps, it returns themes.DARK
Returns:
Type Description themes -
getView(idMap){GoView}
Map/GoMap.ts, line 244 -
This function obtain a View from Map
Name Type Description idMapstring Name of the map we want to obtain View
Returns:
Type Description GoView Return a View from GoView -
getZoom(idMap)
Map/GoMap.ts, line 304 -
This function obtain the zoom level from Map in that moment
Name Type Description idMapstring Name of the map we want to change center
-
goToExtent(idMap, Extent)
Map/GoMap.ts, line 338 -
This function change location in the map from a especific Extent
Name Type Description idMapstring Name of the map we want to change center
ExtentExtent Extent Value [xmin,ymin,xmax,ymax]
-
hasStagingMap(idMap){void}
Map/GoMap.ts, line 734 -
This function allow to determine if the map is a staging map
Name Type Description idMapstring The id of the map
Returns:
Type Description void Return nothing -
injectDataGeoJson(idMap, idLayer, ClearData, Data)
Map/GoMap.ts, line 636 -
Inject data in a GeoJson layer
Name Type Description idMapstring Name of map to obtain layers
idLayerstring Name of Layer
ClearDataboolean If Inject data Remove all Features from Layer
DataGeoJSON Data to inject in Layer
-
onMap(idMap, type, callback){boolean}
Map/GoMap.ts, line 717 -
Do any interaction when the map .....
Name Type Description idMapstring Name of map of launch method
typemodule:constants~typeOn types to do in the method : change - Generic change event. Triggered when the revision counter is increased. change:layerGroup change:size change:target change:view click - A click with no dragging. A double click will fire two of this. dblclick - A true double click, with no dragging. error - Generic error event. Triggered when an error occurs. moveend - Triggered after the map is moved. movestart - Triggered when the map starts moving. pointerdrag - Triggered when a pointer is dragged. pointermove - Triggered when a pointer is moved. Note that on touch devices this is triggered when the map is panned, so is not the same as mousemove. postcompose - Triggered after all layers are rendered. The event object will not have a context set. postrender - Triggered after a map frame is rendered. precompose - Triggered before layers are rendered. The event object will not have a context set. propertychange - Triggered when a property is changed. rendercomplete- Triggered when rendering is complete, i.e. all sources and tiles have finished loading for the current viewport, and all tiles are faded in. The event object will not have a context set. singleclick
callbackfunction Function to do in this method
Returns:
Type Description boolean -
refreshLayer(idMap, idLayer)
Map/GoMap.ts, line 592 -
Refresh data from layer
Name Type Description idMapstring Name of map to obtain layers
idLayerArray.<string> Name of Layer
-
refreshMap(idMap)
Map/GoMap.ts, line 484 -
Refresh all content of map
Name Type Description idMapstring Name of map to refresh
-
removeLayer(idMap, idLayer){GOStagingMap}
Map/GoMap.ts, line 556 -
Remove one Layer from Map
Name Type Description idMapstring Name of map to obtain layers
idLayerstring Name of Layer
Returns:
Type Description GOStagingMap -
setCenter(idMap, center)
Map/GoMap.ts, line 288 -
This function change center from a Map
Name Type Description idMapstring Name of the map we want to change center
centerCoordinate Coordinates Center
-
setLanguage(lang)
Map/GoMap.ts, line 408 -
Set language for all GOStagingMap instances.
Name Type Description langtypes.SupportedLangs The language to set.
-
setLayer(idMap, layerOption){module:types~GOLayer|null}
Map/GoMap.ts, line 817 -
This function allow to set a new layer.
Name Type Description idMapstring The id of the map
layerOptionmodule:types~layerOptions The layer options.
Returns:
Type Description module:types~GOLayer | null Return promise Promise<GOLayer | null> -
setThemeAllMaps(theme)
Map/GoMap.ts, line 462 -
Sets dark/light theme all maps.
Name Type Description themethemes The language to set.
-
setZoom(idMap, Zoom)
Map/GoMap.ts, line 322 -
This function set the zoom level from Map
Name Type Description idMapstring Name of the map we want to change center
Zoomnumber Number value to set Zoom in the Map Number from 0 to 20
-
unbindAllViews(option)
Map/GoMap.ts, line 763 -
This Method unbind all views of maps
Name Type Description optionany The option to unbind
