Different spatial ref map svcs in Web APP

346
2
09-02-2018 12:54 AM
Ayesha_
New Contributor

Is it possible in arcgis java API  web application to display twomap services having  different spatial reference as base map.

is there any way to switch between two services.as i belong to industrial company and i want at 10,000,000 to 50,000 scale user can access base map service having spatial reference(GCS WGS84) and after 50K scale end user can see basemap service of spatial ref(LCC) in my webapp....how can i achieve it ? plz help

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Ayesha,

   That is not a supported workflow. All basemaps should be in the same spatial reference. The one sledgehammer workaround approach is to remove all layers from the map and destroy the map object and recreate the map object with the different spatial reference if you really must use different WKIDs.

if (some condition) {
  map.removeAllLayers();
  map.spatialReference = null;
  map.destroy();

  //now recreate the map object
  map = new Map({
    //the new properties
  });
}
0 Kudos
irtizahussain
Occasional Contributor

salam ayesha pm me need some help !!

0 Kudos