Get Coordinate from right click mouse menu
Hi: Is there any workflow for silverlightthat can extract the coordinate from the right click menu once I click on a specific location on the map?
I am asking for this because we don't our users to copy one by one xy from the toolbar when they click on xy plot button.
Thanks
-
I have implemented a workflow for the GVH for the project I am working on it, but can't share it since the client pays for it, and also it shows the dropdown list to the user to pick which coordinate system the clicked point to convert and calculate the label for the location in that selected coordinate system.
With that workflow, a user can click as many as they want to mark on the map withe label, and can stop to get the last point's label to cut-and-paste.
For GVS, a user can use Text Markup tool (GVS default) to get the coordinate on the clicked location on the map, right. But may not cut-and-paste on silverlight viewer (and anoyed to copy from the coordinate tool on the toolbar too).
The workflow implementation is not complicated, and I will put pesu-do code here so that you may try to implement since I can't post my solution with the reason above.
1. Get the map's spatial reference using the MapInfo activity, whose output is a Spatial Reference of your map which will be the SR for the clicked geometry point.
2. Use Display Form for a user to choose which coordinate system they want to conver the clicked mappoint (or you may hard coded if you want to allow only one target Coordinate System) to set the target Spatial Reference with WKID, which will be the target SR
3. Use 'Captured Display Geometry' activity where use 'Point' type only (check HELPD doc to configure AutoSubmit so that a user does not click the button on UI. This tool returns the mapPoint at the point of the map a user clicked with SR from step 1.
4. Use Geometry Service - Project activity, to convert the clicked location on the map (item 3 with SR from item 1), and a target SR (item2) to projec to get the projected map point.
5. From step 4, you have MapPoint from which you have X, Y on the projected coordinate system. You may use Temportry Markup command to show the location and MarkuPText commad, which unfortunately pops up the UI a user needs to type. So if you want to render the Label, you need to implement the client activity to mark the Label though.
6. By now, you have a X, Y for a user to copy, but how to put it to the Clipboard so that a user can paste it is the qustion you need to explore more for GVS. In my case I just use Alert where a user can highlight the text and copy and paste. While I study the way to put Text to the Clipboard, you can use the third party tool which may yse Flash or so, which I don't like to use. Or something else for a user to take.
I know it is the one exactly you asked, but this can be done if no one gives the workflow to do.
Munhwan
0 -
Dear Munwhan Thanks for your help ... I will try from my side and hope I can success for something. This is exactly what I am looking for. 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare