2

I have the following block of code in my .js file:

require([
  "esri/Map",
  "esri/views/MapView",
  "dojo/domReady!"
], function(Map, MapView) {
  var map = new Map({
      center: [-46.807, 32.553],
      basemap: "streets"
  });

  var view = new MapView({
    container: "viewDiv",  // Reference to the DOM node that will contain the view
    map: map               // References the map object created in step 3
  });
});

The results is, as expected, a map of the whole world. How can I set the starting extent of the map to be my city, so clients will know my company's location. I've tried using the extent option, but it doesn't work. Any suggestions?

1 Answer 1

2

Okay, I found a good explanation on ESRI's website:

https://developers.arcgis.com/javascript/3/jssamples/map_currentextent.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.