Sunday, May 19, 2019

Code Snippet: ESRI JS API 4.11 get Latittude Longitude on mouse hover

ESRI JS API 4.11 get Latittude Longitude on mouse hover

//print point on mouse hover on map

mapView.on("pointer-move", function(event){
let mapPoint = mapView.toMap({x: event.x, y: event.y});

//print point on mouse click on map

mapView.on("click", function(event){
let mapPoint = event.mapPoint;

Both console statement will return the identical object as below which has latitude and longitude

  1. {__accessor__: b}
    1. cache(...)
    2. extent(...)
    3. hasM(...)
    4. hasZ(...)
    5. latitude(...)
    6. longitude(...)
    7. m(...)
    8. spatialReference(...)
    9. type(...)
    10. x(...)
    11. y(...)
    12. z(...)
    13. constructed(...)
    14. destroyed(...)
    15. initialized(...)


1 comment :

  1. I bought this copy of Jimmy Choo shoes and clothes from this jimmy choo uk The quality is great. I have repurchased it many times.replica jimmy choo espradrilles I recommend it to my friends. They all praise the quality of the shoes and the service attitude of the store.



© 2011 GIS and Remote Sensing Tools, Tips and more .. ToS | Privacy Policy | Sitemap

About Me