<!DOCTYPE html> <html> <head> <metahttp-equiv="Content-Type"content="text/html; charset=utf-8" /> <metaname="viewport"content="initial-scale=1, maximum-scale=1,user-scalable=no" /> <title>Test Map</title> <linkrel="stylesheet"href="http://localhost:8080/api49/arcgis_js_api/library/4.9/dijit/themes/claro/claro.css" /> <linkrel="stylesheet"href="http://localhost:8080/api49/arcgis_js_api/library/4.9/esri/css/main.css" /> <style> html, body, #viewDiv { margin: 0; padding: 0; width: 100%; height: 100%; } </style> <scriptsrc="http://localhost:8080/api49/arcgis_js_api/library/4.9/dojo/dojo.js"></script> <script> var myMap, view; require([ "esri/Basemap", "esri/layers/TileLayer", "esri/Map", "esri/views/MapView", "dojo/domReady!" ], function (Basemap, TileLayer, Map, MapView){ // -------------------------------------------------------------------- // If you do not have public Internet access then use the Basemap class // and point this URL to your own locally accessible cached service. // // Otherwise you can just use one of the named hosted ArcGIS services. // https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer // -------------------------------------------------------------------- var layer = newTileLayer({ url: "https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" }); var customBasemap = newBasemap({ baseLayers: [layer], title: "Custom Basemap", id: "myBasemap" }); myMap = newMap({ basemap: customBasemap }); view = newMapView({ center: [-111.87, 40.57], // long, lat container: "viewDiv", map: myMap, zoom: 6 }); }); </script> </head> <bodyclass="claro"> <divid="viewDiv"></div> </body> </html>