View | API Reference | ArcGIS API for JavaScript 4.6
There is a statement that says "When using an Esri basemap, the default spatial reference is Web Mercator Auxiliary Sphere."
This makes me think that it can be changed? I would like to set to 4326. I can set a custom basemap using a layer with that spatial reference but I want that layer on top.
I have also tried setting the center and extent of the MapView with the spacial reference but I do not get what I would expect.
Hi there,
You can use wgs84 esri vector basemaps. Pick one of the webmaps and set your Map's basemap as shown below:
var map = new Map({ basemap: { portalItem: { id: "8dda0e7b5e2d4fafa80132d59122268c" //Streets (WGS84) } } });<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Jim,
All esri standard basemaps are in 102100 (Web Mercator Auxiliary Sphere). This not something that can be changed. Basemaps are normally come from a tiled/cached map service which is a collection of images at predefined scales. Based on that fact on the fly re-projection is NOT possible. If you need your map to be in WGS84 for some reason then you will have to use a custom basemap in that projection.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.