The idea for this folder is collect dev-friendly documentation for the moment.
This folder would contain things that answer these types of questions:
Once the project matures, these docs can be the basis of official public docs, help documentation, etc.
The api.maps array is now private and only accessible from the api. The cgpv.api.maps
is not available anymore. To access and interact with the maps, new functions have been added.
@returns {string[]} Array of map IDs */ getMapViewerIds(): string[] ```
@returns {boolean} True if map exist */ hasMapViewer(mapId: string): boolean ```
_Implementation_
``` ts
const myMap = cgpv.api.getMapViewer('Map1');
myMap.layer.addGeoviewLayerByGeoCoreUUID(layer)
_Implementation_
``` ts
if (cgpv.api.hasMapViewer(map)) {
cgpv.api.deleteMapViewer(map, false).then(() => {
resolve();
});
} else {
resolve();
}