The Basemap
module provides basemap related functions.
This module exports an object with the following properties
Basemap
{type} esri/dijit/Basemap classBasemapGallery
{type} esri/dijit/BasemapGallery classBasemapLayer
{type} esri/dijit/BasemapLayer classmakeBasemaps
{function} function make basemap gallery based on the settings provided
- Source:
- Source:
Methods
(inner) generateLocalCanvas(map) → {Promise}
- Source:
Create a canvas from the user added layers (svg tag)
Parameters:
Name | Type | Description |
---|---|---|
map |
Object | esri map object |
Returns:
resolving when the canvas have been created resolve with a canvas element with user added layer on it
- Type
- Promise
(inner) generateServerImage(esriBundle, geoApi, map, options) → {Promise}
- Source:
Generate the image from the esri print task
Parameters:
Name | Type | Description |
---|---|---|
esriBundle |
Object | bundle of API classes |
geoApi |
Object | geoApi to determine if we are in debug mode |
map |
Object | esri map object |
options |
Object | options for the print task url - for the esri geometry server format - output format |
Returns:
resolving when the print task created the image resolve with a "response: { url: value }" where url is the path for the print task export image
- Type
- Promise
(inner) hideLayers(map) → {Array}
- Source:
Set svg-based layer visibility to false to avoid CORS error
Parameters:
Name | Type | Description |
---|---|---|
map |
Object | esri map object |
Returns:
layer array of layers where visibility is true
- Type
- Array
(inner) printMap(esriBundle, geoApi) → {Object}
- Source:
Generate the print image by combining the output from esri print task and svg export of the user added layers.
Parameters:
Name | Type | Description |
---|---|---|
esriBundle |
Object | bundle of API classes |
geoApi |
Object | geoApi to determine if we are in debug mode |
Returns:
with two promises - local and server canvas; each promise resolves with a corresponding canvas; each promise can error separately if the canvas cannot be generated returning whatever error message was supplied; it's responsibility of the caller to handle errors appropriately
- Type
- Object
(inner) showLayers(layers)
- Source:
Set user added layer visibility to true for those whoe where visible
Parameters:
Name | Type | Description |
---|---|---|
layers |
Array | array of graphic layers to set visibility to true |