c# - Executing function based on pointer location -


i working arcgis sdk dot net. programming using vc#. want execute piece of code mouse pointer enters particular longitude/latitude on map or if mouse clicked on location. there many event handlers don't know how retrieve location mouse pointer at. e.g want display picture mouse pointer @ longitude 25 , lat 33.

  1. add mousemove listener mapview.
  2. your listener method have parameter of type mouseeventargs. call getposition(null) on parameter screen point.
  3. use mapview.screentolocation(point) mappoint in map coordinates.
  4. if map isn't in longitude/latitude, use geometryengine.project(geometry, spatialreference.create(4326)) convert longitude/latitude.
  5. check longitude , latitude see if they're in range want.

i tried posting source code here stack overflow gave me error, here screenshot:

enter image description here


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -