get x,y values from the map
We have a road attribute service that accepts x,y values and returns road attribute information. I'd like to set up a tool in the Silverlight viewer that allows the user to click on the map and send the x,y values to the road attribute service. Can we do a point click and retrive the x,ys or latitude, longitude?
this is the service with canned parameters:
So does geocortex have predefined x,y variables that I could access?
Thanks greatly.
Sonia
-
Hi Sonia,
If you're coding a module to send these coordinates, you can subscribe to the MapMouseClicked event in the Silverlight viewer and it will contain the map coordinates of the click (as well as the screen coordinates).
It looks like your service is consuming UTM coordinates. If your map is in a different coordinate system, you can easily project the point by adding a using directive for Geocortex.EssentialsSilverlightViewer.Infrastructure.Utils. If you do that, you should be able to access an extension method called Project on the MapPoint object received in the event.
Hope this helps.
- Jason
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar