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
Solved! Go to Solution.
This looks like a bug. Thanks for letting us know, Abdul.
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.
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.
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>
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>
Abdul,
You are correct it appears that a WGS 84 cached map service does not work in a sceneView.
This looks like a bug. Thanks for letting us know, Abdul.
The following have been acknowledged as known limitations for ArcGISTiledLayer in 4.0 beta 2:
viewingMode="global"
viewingMode="local"