AnsweredAssumed Answered

Map with MapView doesn't zoom to GK4 coordinates

Question asked by michaellodes on Jul 6, 2017

Hi,

 

I am new to ArcGIS API for JavaScript. I followed the Get started with MapView - Create a 2D map | ArcGIS API for JavaScript 4.4  and have now problems with the MapView. The map doesn't zoom to the extent/coordinates I set. What did I do wrong?

 

require([
  "esri/Map",
  "esri/views/MapView",
  "dojo/domReady!"
], function(Map, MapView) {
  var map = new Map({
    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
  });
 
 
      view.extent = new Extent({
      xmin: 4400000.0,
      ymin: 5335500.0,
      xmax: 4413500.0,
      ymax: 5346000.0,
   

      spatialReference: {
        wkid: 31468
      }
      });
   
    view.center = [4409051.287, 5341122.644];
    view.zoom = 14;



   



 
});

Outcomes