简体   繁体   中英

(projection)Lat Long issue in ESRI javascript api version 4.18 and above

Version 4.17 Projection is working fine, but if we use version 4.18 & above then, (lat & long) values going beyond the +/- 180. Working Link: codepen.io/thanhtetaung/pen/NWGRZGJ (version 4.15)

It was a change in behavior for the project() method. The longitudes are no longer "normalized" for project().

If you want the older ("normalized") behavior, you can use webMercatorUtils.webMercatorToGeographic() which includes a second property that allows you to either normalize or not.

In your codepen change from projection.project(view.extent, sr4326);to webMercatorUtils.webMercatorToGeographic(view.extent, false); .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM