Skip to content

Function: loadBasemap() ​

ts
function loadBasemap(resolution, scope, options?): Promise<BasemapLayers>;

The basemap layers of one resolution and scope, decoded to GeoJSON.

  • Resolves with the same object for the same request once it has loaded.
  • Rejects, with an Error that names the resolution, when the base data cannot be loaded. The failure is not remembered: the next call tries again.
  • With extras, resolves with the base layers alone when only the extras cannot be loaded, and warns once per resolution. That result is not remembered either.
  • With url, the one file Plotly's layout has per scope is fetched; extras then only says which of its layers to decode.

Parameters ​

ParameterType
resolutionGeoResolution
scopeGeoScope
optionsBasemapOptions

Returns ​

Promise<BasemapLayers>

Released under the MIT License.