My ArcGISTiledLayer does not load in Beta 2

3218
7
Jump to solution
12-03-2015 03:42 AM
omega_cancer
Occasional Contributor II

This layer World_Terrain_Base (MapServer) having properties

Full Extent:

XMin: -2.0037507067161843E7

YMin: -1.9971868880408604E7

XMax: 2.0037507067161843E7

YMax: 1.997186888040863E7

Spatial Reference: 102100  (3857)

Units: esriMeters

loads but my layer having properties

Spatial Reference: GEOGCS["Geographic Coordinate System",DATUM["D_WGS84",SPHEROID["WGS84",6378137.0,298.257223560493]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

Units:

esriDecimalDegrees

does not load.

Is WGS84 supported in ArcGIS API for JS Beta 2? or there is something else that I am missing.

Thanks

0 Kudos
1 Solution

Accepted Solutions
KristianEkenes
Esri Regular Contributor

This looks like a bug. Thanks for letting us know, Abdul.

View solution in original post

7 Replies
RobertScheitlin__GISP
MVP Emeritus

Adbul,

   I am confused the url you provided is to a cached map service with WKID 102100 and in meters. You can not just specify a different spatial reference for a cached map service and expect it to work as all the cached tiles are created in the map services specified spatial reference.

omega_cancer
Occasional Contributor II

These are two different layers tried to render in Beta 4 one by one.

I have huge data cached as WGS84 but Beta 4 does not seems to render it.

I guess WGS 84 is not supported.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Abdul,

  Are you say that you are trying to add two different cached map service and they are using different WKIDs?

I can confirm the WGS 84 cached map is supported. Here is a code sample:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Basic 2D map - 4.0 beta 2</title>
<style>
  html, body {
    padding: 0;
    margin: 0;
  }
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.0beta2/esri/css/main.css">
<script src="https://js.arcgis.com/4.0beta2/"></script>
<script>
require([
  "esri/Map",
  "esri/views/MapView",
  "esri/layers/ArcGISTiledLayer",
  "dojo/domReady!"
], function(Map, MapView, ArcGISTiledLayer){
  var map = new Map();
  var view = new MapView({
    container: "viewDiv",  //reference to the scene div created in step 5
    map: map,  //reference to the map object created before the scene
    zoom: 4,  //sets the zoom level based on level of detail (LOD)
    center: [15, 65]  //sets the center point of view in lon/lat
  });
  var layer = new ArcGISTiledLayer({
    url: "http://services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer"
  });
  map.add([layer]);
});
</script>
</head>
<body>
  <div id="viewDiv"></div>
</body>
</html>
omega_cancer
Occasional Contributor II

Have you tried it in scene view? I want it in SceneView.

I gave it try and it is not working for me.

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
  <title>4.0beta2</title>




  <link rel="stylesheet" href="https://js.arcgis.com/4.0beta2/esri/css/main.css">
  <script src="https://js.arcgis.com/4.0beta2/"></script>

  <style>
    html,
    body {
      padding: 0;
      margin: 0;
    }
  </style>




  <script>
    require([
        "esri/Map",
        "esri/views/SceneView",
        "esri/layers/ArcGISTiledLayer",
        "dojo/domReady!"
      ],
      function(
        Map, SceneView, ArcGISTiledLayer
      ) {
     
        var layer = new ArcGISTiledLayer({
    url: "http://services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer"
  });


        var map = new Map({
       
          layers: [layer] // This isnt working
        });




        var view = new SceneView({
          container: "viewDiv",
          map: map
        });
     
        //map.add(layer);  //neither this


      });
  </script>
</head>


<body>
  <div id="viewDiv"></div>
</body>
</html>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Abdul,

   You are correct it appears that a WGS 84 cached map service does not work in a sceneView.

Kristian Ekenes

0 Kudos
KristianEkenes
Esri Regular Contributor

This looks like a bug. Thanks for letting us know, Abdul.

KristianEkenes
Esri Regular Contributor

The following have been acknowledged as known limitations for ArcGISTiledLayer in 4.0 beta 2:

  • if viewingMode="global"
    • only web mercator are supported
  • if viewingMode="local"
    • only services with projected coordinate systems are supported
0 Kudos