More

How do I use the Terrain with Labels basemap in the Map constructor

How do I use the Terrain with Labels basemap in the Map constructor


Seems like all the other basemaps can be used in the esri.Map() constructor, but this one doesn't have a corresponding entry in the list of acceptable values. I've tried just "terrain", and it didn't work.


You can combine the two layers as a singleBasemapand pass them to the map constructor. Below is a full working example using the two layers you are interested in.

This came from a discussion we had over on github related to using non-mercator maps as basemaps for the Configurable Map Viewer (cmv) that is based on the ESRI JS API.

This does not fully address your additional requirement to save the basemap with the user settings but perhaps gives you an idea on how to proceed. There might be additional details in that discussion related to the BaseMap widget that would be helpful for you. One of the tricks there was to include no basemap at all (or a blank one) and allow the BaseMap widget to determine the starting basemap. Something like that might work for your requirement to save the basemap.

     Simple Map     

UPDATE:

While answering a question over at the cmv github repository, it occurred to me that there is another solution that may get you closer to what you desire. The available basemaps are just an object within theesri.config.defaults.map. You can add your own custom basemaps to that object and they are treated like the standard ESRI basemaps. The advantage of this approach is you can refer to the basemap id in the map constructor and thus that id can be saved in the user settings as you desired. Here's a full example:

     Simple Map     

The map reference lists the available basemaps which can be specified using the keyword:

Valid values are: "streets" , "satellite" , "hybrid", "topo", "gray", "oceans", "national-geographic", "osm".

You can add other layers as a basemap by finding their REST endpoint and adding them as a tiled layer. There's a example script here.

The Esri Terrain layer seems to be coming from http://services.arcgisonline.com/arcgis/rest/services/World_Terrain_Base/MapServer

The labels seem to be coming from http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer

You can add these two layers manually to reproduce the Terrain With Labels basemap combination.


You can only use the Esri pre-canned basemaps ("streets", "satellite", "topo", etc.) in the constructor. If you search the Esri JavaScript code, you can find "Streets" and "Satellite" basemaps defined in the code, but not "Terrain".

You don't actually have to specify a basemap in the constructor. In the code example below, I am adding the streets basemap manually. Then I'm adding the terrain basemap over top with an opacity set to 0.8 so you can still see the streets.


Use esri-loader to load the required esri modules. This is a component rendering basemap.

This renders a base map but this is not responsive. If I remove the div around the view div or if I give the height and width of the outer div (surrounding viewDiv) as relative (< height: '100%', width: '100%'>), the map does not render. No idea why. Any suggestions to make it responsive would be appreciated.

An alternative method to the above is the one demonstrated in esri-react-router-example. That application uses a library called esri-loader to lazy load the ArcGIS API only in components/routes where it is needed. Example:

First, install the esri-loader libary:

Then import the esri-loader functions in any react module:

Then lazy load the ArcGIS API:

Then load and the ArcGIS API's (Dojo) modules that are needed to create a map:

The benefit of using esri-loader over the approach shown above is that you don't have to use the Dojo loader and toolchain to load and build your entire application. You can use the React toolchain of your choice (webpack, etc).

This blog post explains how this approach works and compares it to other (similar) approaches used in applications like esri-redux.


FeatureGroup layer control in Folium - only one active layer

I am trying to display several layers with information on a Choropleth Map having as base layer the Stamen Terrain and displaying the layers as FeatureGroup. Here is my initial code without overlay control:

my problem is that the FeatureGroup layers are selectable by checkbox allowing more than one layer to be selected at a certain time. In my case I would need at one time to have displayed the Stamen Terrain as background and only one active layer and I do not know how to do this.

I have also tried to control the overlay, but then only one single layer can be visible and I am loosing the Stamen Terrain as a background, i.e. the layers are controlled by radio buttons but there is only one group which includes the Stamen Terrain and the data FeatureGroup layers.

Any idea how I could display, as desired: Stamen Terrain as background and only one active at a moment data layer? I am not fixed to use the FeatureGroup, but at the moment my knowledge is limited to this and so far my google fu failed me.


Tiling scheme

The tiling scheme includes the scale levels, tile dimensions, and tile origin for the cache. These properties define where tile boundaries will exist and are important to match when overlaying caches in some clients. Other properties such as image format are also written into the tiling scheme but do not affect whether the client application can successfully overlay the tiles.

There are several options you can choose for the tiling scheme:

    ArcGIS Online / Bing Maps / Google Maps

The ArcGIS Online/Bing Maps/Google Maps tiling scheme allows you to overlay your cache tiles with tiles from these online mapping services. ArcGIS for Desktop includes this tiling scheme as a built-in option when loading a tiling scheme. When you choose this tiling scheme, the data frame of your source map document must use the WGS 1984 Web Mercator (Auxiliary Sphere) projected coordinate system.

The ArcGIS Online/Bing Maps/Google Maps tiling scheme is required if you'll be overlaying your package with ArcGIS Online, Bing Maps, or Google Maps. One advantage of the ArcGIS Online/Bing Maps/Google Maps tiling scheme is that it is widely known in the web mapping world, so your tiles will match those of other organizations who have used this tiling scheme. Even if you don't plan to overlay any of these well-known map services, you may choose the tiling scheme for its interoperability potential.

The ArcGIS Online/Bing Maps/Google Maps tiling scheme may contain scales that would be zoomed in too far to be of use to your map. Packaging for large scales can take up much time and disk storage space. For example, the largest scale in the tiling scheme is about 1:1,000. Packaging the entire continental United States at this scale can take weeks and require hundreds of gigabytes of storage. If you aren't prepared to package at this scale level, you should remove this scale level when you create the tile package.

Choose this option if your organization has created a tiling scheme for an existing service on your GIS server and you want to match it. Matching tiling schemes ensures that your tiles will overlay correctly in your application.

If you choose this option, your source map document should use the same coordinate system as the map whose tiling scheme you are importing.

All tile packages have a tiling scheme file conf.xml in the package directory (example: C:Documents and SettingsusernameMy DocumentsArcGISpackagesMyDataFrameLayersconf.xml). You can browse to this file to set the tiling scheme for your map service. This option allows you to use a tiling scheme file you obtained through e-mail, a file share, or an ArcGIS for Server service.

Choosing a tiling scheme from an online mapping service is not always possible due to requirements that you use a different coordinate system or set of scale levels. In this scenario, you will need to create your own tiling scheme. The following sections in this document will help you choose appropriate scales and other properties for your tiling scheme.

Legacy:

ArcGIS Online previously used a tiling scheme based on the WGS 1984 geographic coordinate system that used 512 x 512 pixel tiles. If you have services running that need to use this tiling scheme, you must load it from an existing service or a tiling scheme file.


Projections

The Earth is a three-dimensional sphere (approximately), while a map is a flat two-dimensional surface. The map that you see within the Maps JavaScript API, like any flat map of the Earth, is a projection of that sphere onto a flat surface. In its simplest terms, a projection can be defined as a mapping of latitude/longitude values into coordinates on the projection's map.

Projections in the Maps JavaScript API must implement the Projection interface. A Projection implementation must provide not only a mapping from one coordinate system to another, but a bi-directional mapping. That is, you must define how to translate from Earth coordinates ( LatLng objects) to the Projection class's world coordinate system, and vice versa. Google Maps uses the Mercator projection to create its maps from geographic data and convert events on the map into geographic coordinates. You can obtain this projection by calling getProjection() on the Map (or any of the standard base MapType types.) For most uses, this standard Projection will suffice, but you may also define and use your own custom projections.

Implementing a Projection

When implementing a custom projection, you will need to define a few things:

  • The formulae for mapping latitude and longitude coordinates into a Cartesian plane and vice versa. (The Projection interface only supports transformations into rectilinear coordinates.)
  • The base tile size. All tiles must be rectangular.
  • The "world size" of a map using the base tile set at zoom level 0. Note that for maps consisting of one tile at zoom 0, the world size and base tile size are identical.

Coordinate Transformations in Projections

Each projection provides two methods which translate between these two coordinate systems, allowing you to convert between geographic and world coordinates:

  • The Projection.fromLatLngToPoint() method converts a LatLng value into a world coordinate. This method is used to position overlays on the map (and to position the map itself).
  • The Projection.fromPointToLatLng() method converts a world coordinate into a LatLng value. This method is used to convert events such as clicks that happen on the map into geographic coordinates.

Google Maps assumes that projections are rectilinear.

Generally, you may use a projection for two cases: to create a map of the world, or to create a map of a local area. In the former case, you should ensure that your projection is also rectilinear and normal at all longitudes. Some projections (especially conic projections) may be "locally normal" (i.e. point north) but deviate from true north for example, the further the map is positioned relative to some reference longitude. You may use such a projection locally, but be aware that the projection is necessarily imprecise and transformation errors will become increasingly apparently the further away from the reference longitude you deviate.

Map Tile Selection in Projections

Projections are not only useful for determining the positions of locations or overlays, but for positioning the map tiles themselves. The Maps JavaScript API renders base maps using a MapType interface, which must declare both a projection property for identifying the map's projection and a getTile() method for retrieving map tiles based on tile coordinate values. Tile coordinates are based on both your basic tile size (which must be rectangular) and the "world size" of your map, which is the pixel size of your map world at zoom level 0. (For maps consisting of one tile at zoom 0, the tile size and world size are identical.)

You define the base tile size within your MapType 's tileSize property. You define the world size implicitly within your projection's fromLatLngToPoint() and fromPointToLatLng() methods.

Since image selection depends on these passed values, it is useful to name images that can be selected programmatically given those passed values, such as map_zoom_tileX_tileY.png .

The following example defines an ImageMapType using the Gall-Peters projection:


2 Answers 2

I used a lot ggmap, and this type of problem I could not solve then in an elegant way. But there is a way to achieve something like what you want (doing kind of manually). With geom_rect making the lightbox, and with geom_text writing the copyright information.

The size and limits of geom_rect and geom_text must be edited manually according to the size of the save file. In this example, I provide the ggsave I used for it and plot in a nice way.

Although seemingly simple, this is actually a quite complex issue. I did some research and found out that you can achieve this by tweaking both size and scale arguments. However, if you are using ggmap v3.0.0 as I do, you will find that specifying non-square dimensions just gives you a "noisy image" as follows:

This involves a known bug in the ggmap package. It has not yet been resolved. Although there exists a solution as mentioned here, that only partially solves the problem because the solution has failed for some cases mentioned in this post. Hence, I'd suggest rewriting that function to make it work in a robust way. Luckily, after investigating the source code, I found the problem not so hard to deal with. The problem results from some image-processing failure in the get_goolemap function. Therefore, outsourcing the image processing in that function to a dedicated package is a simple workaround.

Consider this get_googlemap2 (to make it simple, I have ignored all those argument checkings in the original get_goolemap , so be careful with your inputs)

I tried some specifications of size and scale with this new function and found out that the following specifications render the best map possible.

I hope this is what you want. I call this the best-possible result because if you attempt to further narrow the width, for example, down to 250, the attribution text will overlap with the logo.

As far as I can tell, this is Google's problem, not ggmap 's. I have no way to solve it. Another workaround would be removing the attribution text from the image but reintroducing it as plain text within the content, as mentioned in Google's attribution guidlines. However, as Google's logo still needs to be there, you then have to figure out how to paste that onto the map. IMO, using plain text gives you greater flexibility in page layouts, and thus might be a better way to go.


A flattened collection of all layers in the map.

A flattened collection of tables anywhere in the map's hierarchy.

The applicationProperties contains the viewing properties of the WebMap.

The name of the application that authored the WebMap.

The version of the application that authored the WebMap.

Specifies a basemap for the map.

An array of saved geographic extents that allow end users to quickly navigate to a particular area of interest.

A collection of editable layers.

When a web map is configured as floor-aware, it has a floorInfo property defined.

Specifies the surface properties for the map.

The initial view of the WebMap.

A collection of operational layers.

Indicates whether the instance has loaded.

The Error object returned if an error occurred while loading.

Represents the status of a load operation.

The portal item from which the WebMap is loaded.

The version of the source document from which the WebMap was read.

A collection of layer instances that are tables saved in a Map and/or a WebMap.

The URL to the thumbnail used for the webmap.

The utilityNetworks object contains utility networks saved on the web map

The widgets object contains widgets that are exposed to the user.

Property Details

A flattened collection of all layers in the map. This collection contains basemap layers, operational layers and ground layers. Group Layers and their children layers are also part of this collection. Reference layers in the basemap will always be included at the end of the collection.

Layers should not be added directly to this collection. They must only be added via the layers, basemap or ground properties.

To access a flattened collection of tables, use the allTables property instead.

A flattened collection of tables anywhere in the map's hierarchy. This will contain individual tables within the map's tables, in addition to any group layer tables. In order for the table(s) to be recognized as such, the FeatureLayer property must return true .

Currently, only feature layer tables are recognized.

To access spatial layers, use the allLayers property instead.

The applicationProperties contains the viewing properties of the WebMap.

The name of the application that authored the WebMap.

The version of the application that authored the WebMap.

Specifies a basemap for the map. The basemap is a set of tile layers that give geographic context to the MapView or SceneView and the other operational layers in the map.

This value can be an instance of Basemap or one of the strings listed in the table below.

Basemaps for use with API keys

Use of these basemaps requires an ArcGIS Developer subscription.

Value Source
arcgis-imagery Imagery Hybrid
arcgis-imagery-standard Imagery
arcgis-imagery-labels The reference layer from arcgis-imagery
arcgis-light-gray Light Gray Canvas
arcgis-dark-gray Dark Gray Canvas
arcgis-navigation Navigation
arcgis-navigation-night Navigation (Night)
arcgis-streets Streets
arcgis-streets-night Streets (Night)
arcgis-streets-relief Streets (with Relief)
arcgis-topographic Topographic
arcgis-oceans Oceans
osm-standard OpenStreetMap
osm-standard-relief OpenStreetMap (with Relief)
osm-streets OpenStreetMap (Streets)
osm-streets-relief OpenStreetMap (Streets with Relief)
osm-light-gray OpenStreetMap (Light Gray Canvas)
osm-dark-gray OpenStreetMap (Dark Gray Canvas)
arcgis-terrain Terrain with Labels
arcgis-community Community Map
arcgis-charted-territory Charted Territory Map
arcgis-colored-pencil Colored Pencil Map
arcgis-nova Nova Map
arcgis-modern-antique Modern Antique Map
arcgis-midcentury Mid-Century Map
arcgis-newspaper Newspaper Map
arcgis-hillshade-light The hillshade layer from argis-topographic
arcgis-hillshade-dark

For use without an API key

Value Source
topo https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer
streets https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer
satellite https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer
hybrid https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer
and
https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer
dark-gray https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer
and
https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer
gray https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer
and
https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer
national-geographic https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer
oceans https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer
and
https://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer
osm OpenStreetMapLayer
terrain https://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer
and
https://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer
dark-gray-vector Dark Gray Canvas [v2]
gray-vector Light Gray Canvas [v2]
streets-vector World Street Map [v2]
streets-night-vector World Street Map (Night) [v2]
streets-navigation-vector World Navigation Map [v2]
topo-vector https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer
and
World Topographic Map [v2]
streets-relief-vector https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer
and
World Street Map (with Relief) [v2]

An array of saved geographic extents that allow end users to quickly navigate to a particular area of interest.

The name of the class. The declared class name is formatted as esri.folder.className .

A collection of editable layers. Layers are considered editable if they have editing capabilities and if the user associated authenticated with the layer has editing privileges.

When a web map is configured as floor-aware, it has a floorInfo property defined. A floor-aware map is a map that contains indoor GIS data representing floor plan features. The floor info must contain levelLayer and facilityLayer properties at a minimum. The siteLayer property is optional.

Specifies the surface properties for the map. In MapView, this property is used by the ElevationProfile widget when the profile contains an ElevationProfileLineGround. In 3D SceneView, it renders the terrain or topographical variations in the real world on the map's surface with a collection of ElevationLayers.

This value can be an instance of Ground, or one of the following strings:

  • world-elevation for a default instance of ground using the Terrain3D Service.
  • world-topobathymetry for an instance of ground that combines surface elevation and bathymetry using the TopoBathy3D Service.

The ground may not be set to null or undefined , it is guaranteed to always contain an instance of type Ground. The elevation can be removed from the ground by setting the ground property to a new empty Ground instance or by removing all the ground layers.

The initial view of the WebMap. This object contains properties such as viewpoint, spatialReference, that should be applied to the view when the WebMap loads.

A collection of operational layers. This property contains the operational layers, such as FeatureLayers, WebTileLayers and GraphicsLayers that may be queried, assigned different renderers, analyzed, etc. It does not include basemaps.

A layer is a collection of one or more features, or graphics, that represent real-world phenomena. Each feature contains a symbol and geographic data that allows it to be rendered on the map as a graphic with spatial context. Features within the layer may also contain data attributes that provide additional information that may be viewed in popup windows and used for rendering the layer.

Layers may be added in the constructor, with the add() or addMany() methods, or directly to the layers collection using add() or addMany().

In 3D, for layers that are rendered on the terrain, the order of the layers also depends on the type of layer. Tiled layers (VectorTileLayer, WebTileLayer, WMTSLayer) are always drawn first in the same order as specified in the layer collection. Dynamic layers (MapImageLayer, ImageryLayer, WMSLayer, and feature based layers with elevation mode on-the-ground ) are rendered on top using the order from the layer collection.

A layer may only be added to one parent. Adding the same layer to multiple Maps or GroupLayers is not possible. If you attempt to do so, the layer will automatically be removed from its current parent and placed in the new parent.

To access tables from feature layers, use the tables property in either Map or WebMap classes.

Indicates whether the instance has loaded. When true , the properties of the object can be accessed. A WebMap is considered loaded when its layers and basemap are created, but not yet loaded.

The Error object returned if an error occurred while loading.

Represents the status of a load operation.

Value Description
not-loaded The object's resources have not loaded.
loading The object's resources are currently loading.
loaded The object's resources have loaded without errors.
failed The object's resources failed to load. See loadError for more details.

Possible Values : "not-loaded" | "loading" | "failed" | "loaded"

The portal item from which the WebMap is loaded.

Provides multiple slides. Each slide has a different "title", "extent", "basemap", "layers" etc.

The version of the source document from which the WebMap was read. The WebMap must be version 2.x to load into an app.

The major version of the WebMap.

The minor version of the WebMap.

A collection of layer instances that are tables saved in a Map and/or a WebMap. In order for the table(s) to be recognized as such, the FeatureLayer's isTable property must return true . A table can be created via one of the options below:

  • Referencing the URL to a table in a feature service.
  • Create a feature layer using the Layer.fromArcGISServerUrl method and confirm that it is a table using feature layer's isTable property. This can be either a feature service or feature collection.
  • Create a feature layer using the Layer.fromPortalItem method and confirm that it is a table using feature layer's isTable property. This can be either a feature service or feature collection.
  • Create an in-memory, non-spatial, client-side feature layer.

Beginning with 4.17, it is possible to persist non-spatial, tables in a feature service to a WebMap, although in-memory (feature collection) tables are not yet supported.

Persisting tables within a GroupLayer is not yet supported. If this is needed, add them to the Map and/or WebMap.

Currently, only feature service feature layers are recognized.

To access spatial layers, use the layers property in either Map or WebMap classes.


Data policy

Locations are geocoded by Google Maps. Any data that does not require geocoding is not sent to any server. Please see the Google Maps Terms of Service for more information on their data policy.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.


Create a scene from the map

In ArcGIS Pro , a 3D map is called a scene. A scene can be viewed in either global or local mode. In global mode, the earth is drawn as a globe and your viewpoint is usually thousands of kilometers from the data. This view is best for very large study areas. In local mode, the earth is drawn in perspective and your viewpoint is usually tens of kilometers from the data. This view is best for small study areas.

In this project, your area of interest is very small. You'll convert the map to a local scene.

Above: A global view centered on New Zealand. Below: A local view of land cover in Wellington.

  1. On the ribbon, click the View tab. In the Windows group, click Reset Panes and click Reset Panes for Mapping .

This ensures that the Contents and Catalog panes are open and that other panes are closed.

The map is converted to a scene named Kelburn_3D. The local scene icon appears on the scene's view tab.

You can view any scene as a global scene or a local scene by clicking Global or Local in the View group on the View tab.

Local scenes support projected coordinate systems. Global scenes don't support projected coordinate systems. They use the WGS 1984 geographic coordinate system.

In the Contents pane, the map layers have been copied to the scene. At the bottom of the pane is an Elevation Surfaces category with a ground layer named WorldElevation3D/Terrain3D. (Expand the Ground heading to see the layer.) This layer provides elevation values for the 2D map layers so they draw in 3D space.

WorldElevation3D/Terrain3D is a worldwide elevation surface. It's a composite of many elevation maps with varying resolution, or detail. In New Zealand, the resolution is approximately 31 meters, meaning there is one elevation value for every 961 square meters of area (31 meters squared).

To see the WorldElevation3D/Terrain3D resolution and data source for any part of the world, open the Elevation Coverage Map.

From the current perspective, the scene doesn't look very 3D, but you'll take a few moments to explore it from other perspectives.

If you get disoriented, use Bookmarks on the Map tab to return to a familiar perspective. For help with 3D navigation, see Navigation in 3D or the Navigate maps and scenes quick-start tutorial.

The dark gray basemap tends to obscure the 3D effect, so you'll change the basemap.

Next, you'll change some properties of the elevation surface.

The Elevation Surface contextual tab set appears on the ribbon.

Vertical exaggeration is a visual effect that enhances the 3D appearance of the scene.

This adds shading to the terrain based on the scene's current illumination settings. However, by default, the sun altitude is 90 degrees (directly overhead), so there isn't any shading. You'll change the illumination settings, which are a property of the scene, not the elevation surface.

The scene redraws and the map layers are flat. The elevation surface layer must be turned on for its elevation values to be applied.


Method Overview

Cancels a load() operation if it is already in progress.

Creates a deep clone of this object.

Destroys the basemap, and any associated resources, including its layers and portalItem.

Creates a new basemap instance from a well known basemap ID.

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product.

isFulfilled() may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected).

isRejected() may be used to verify if creating an instance of the class is rejected.

isResolved() may be used to verify if creating an instance of the class is resolved.

Loads the resources referenced by this class.

Loads all the externally loadable resources associated with the basemap.

Converts an instance of this class to its ArcGIS portal JSON representation.

when() may be leveraged once an instance of the class is created.

Method Details

Cancels a load() operation if it is already in progress.

Creates a deep clone of this object.

Destroys the basemap, and any associated resources, including its layers and portalItem. These can no longer be used once the basemap has been destroyed. To prevent these objects from being destroyed, remove them from the basemap before calling destroy() .

Creates a new basemap instance from a well known basemap ID. See Map.basemap for a list of possible values.

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

isFulfilled() may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected). If it is fulfilled, true will be returned.

Type Description
Boolean Indicates whether creating an instance of the class has been fulfilled (either resolved or rejected).

isRejected() may be used to verify if creating an instance of the class is rejected. If it is rejected, true will be returned.

isResolved() may be used to verify if creating an instance of the class is resolved. If it is resolved, true will be returned.

Loads the resources referenced by this class. This method automatically executes for a View and all of the resources it references in Map if the view is constructed with a map instance.

This method must be called by the developer when accessing a resource that will not be loaded in a View.

The load() method only triggers the loading of the resource the first time it is called. The subsequent calls return the same promise.

It's possible to provide a signal to stop being interested into a Loadable instance load status. When the signal is aborted, the instance does not stop its loading process, only cancelLoad can abort it.

Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an Error named AbortError when an abort is signaled. See also AbortController for more information on how to construct a controller that can be used to deliver abort signals.

Loads all the externally loadable resources associated with the basemap. For the basemap this will load all the base layers and reference layers.

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

when() may be leveraged once an instance of the class is created. This method takes two input parameters: a callback function and an errback function. The callback executes when the instance of the class loads. The errback executes if the instance of the class fails to load.