Select to view content in your preferred language

Add a basemap layer

4031
21
Jump to solution
11-17-2017 08:53 AM
BrandonPrice
Occasional Contributor

I would like to add a basemap layer to a custom web app made with arcgis api javascript framework syntax. I am using ArcGIS API 3.22 to call an arcgis online web map that has no basemap. I would like to set it using arcgis api for js. Can you add a baselayer with a map that has already been created? I cannot use something like:

var map = new esri.Map("mapDiv", {
        center: [-56.049, 38.485],
        zoom: 3,
        basemap: "streets"
      });

because the map has been created.

Thanks,

Brandon

https://community.esri.com/community/gis/web-gis/storymaps?sr=search&searchId=3ed16340-2d5e-48ee-a9a...

https://community.esri.com/groups/web-app-builder-custom-widgets?sr=search&searchId=2ab0dae4-3629-48...

0 Kudos
21 Replies
RobertScheitlin__GISP
MVP Emeritus

If you are happy with that then go with it.

0 Kudos
BrandonPrice
Occasional Contributor

 Sounds great

0 Kudos