0

I have made a Geoprocessing service, which results (features) are in wgs_84 (4326). My map's spatial reference is wgs_84 Web Mercator Auxiliary Sphere 102100 (projected system) Considering that the graphics layer is not re projected on the fly, Why are the graphics placed in the correct position ? As I can see with firebug my graphics keep having decimal coordinates of WGS_84. While some feature layers I have, which are still in 4326 are reprojected on the fly and their X, Y coordinates are converted in meters

0

the jsapi is smart enough to be able to reproject WGS84 geometries added to the map on the fly internally and display them in web mercator {wkid:3857} applications.

check out esri/geometry/webMercatorUtils for a look at clientside methods that help you do the same on your own.

if you need to reproject between other coordinate systems you'll either need to utilize a geometry service or something like Proj4

  • Thanks for your answer. You say : "the jsapi is smart enough to be able to reproject WGS84 geometries added to the map on the fly internally and display them in web mercator {wkid:3857} applications.". Is the js api doing this only for 3857 on it reprojects geometries according to ANY spatial reference that the map may have. And if it does so, why are we saying that a GraphicsLayer cannot be reprojected on the fly ? – Smalis Jan 14 '15 at 9:41
  • only for maps in 3857, and only for geometries that are 4326. for other coordinate systems graphics cannot be reprojected on the fly because the API lacks the internal logic to perform the math. – John Gravois Jan 14 '15 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.