Coordinate Menu Widget - New !

7190
95
02-17-2011 07:51 PM
AndrewTimmins
Regular Contributor
Hello Everyone,
I created a new widget that you might find useful.
Tucked away in the map context menu are three XY operations

   1.     Copy XY
   2.     Project XY (configurable)
   3.     Go To XY

ReadMe.txt included

Hope you find it useful!

Click Here to demo and download the Coordinate Menu Widget

Drew
Tags (2)
0 Kudos
95 Replies
MattiasEkström
Regular Contributor
Thanks for this!
I already have a copy XY contextmenu, and a tool for GoTo XY, and don't really need the projecting. But still this one is very useful because now I can use this widget with a few modifications instead of adding a lot of code in the main application like mapmanager and other files which i try to avoid as much as possible.
Great work! thanks again.
0 Kudos
PedroGarcia
New Contributor III
Hello Everyone,
I created a new widget that you might find useful.
Tucked away in the map context menu are three XY operations

   1.     Copy XY
   2.     Project XY (configurable)
   3.     Go To XY

ReadMe.txt included

Hope you find it useful!

Click Here to demo and download the Coordinate Menu Widget

Drew


Great widget. However I've found a problem using Goto XY Custom, I hope you can clarify me. In my place I've the following lines in xml file:
                        ...
  <coordinateSystem name="ETRS89 UTM Zona 30" wkid="25830" decimals="2"/>
  <coordinateSystem name="ED50   UTM Zona 30" wkid="23030" decimals="2"/>
                        ...

But I've noticed that coordinates in wkid=25830 works fine (that is, the location is accurate), however coordinates in wkid=23030 are moved about 170 meters, so that isn't suitable. Any idea?
0 Kudos
AndrewTimmins
Regular Contributor
Great widget. However I've found a problem using Goto XY Custom, I hope you can clarify me. In my place I've the following lines in xml file:
                        ...
  <coordinateSystem name="ETRS89 UTM Zona 30" wkid="25830" decimals="2"/>
  <coordinateSystem name="ED50   UTM Zona 30" wkid="23030" decimals="2"/>
                        ...

But I've noticed that coordinates in wkid=25830 works fine (that is, the location is accurate), however coordinates in wkid=23030 are moved about 170 meters, so that isn't suitable. Any idea?


Pedro,
Do you have a sample running online I can test with?

Drew
0 Kudos
PedroGarcia
New Contributor III
Hi Drew,

I've created a sample for you can test it, in http://iderm.imida.es/drew

The following coordinate (x=664157, y=4206606) in coordinate system name="ETRS89 UTM Zona 30" wkid="25830", is the center of a traffic circle that you can see. And the following coordinate (x=664269, y=4206813) in coordinate system name="ED50 UTM Zona 30" wkid="23030" is the same location, however your widget displays it moved.

Regards.
0 Kudos
AndrewTimmins
Regular Contributor
Hi Drew,

I've created a sample for you can test it, in http://iderm.imida.es/drew

The following coordinate (x=664157, y=4206606) in coordinate system name="ETRS89 UTM Zona 30" wkid="25830", is the center of a traffic circle that you can see. And the following coordinate (x=664269, y=4206813) in coordinate system name="ED50 UTM Zona 30" wkid="23030" is the same location, however your widget displays it moved.

Regards.


Pedro,
I tested the numbers you supplied and you are correct, but the program is not fudging the location at all. The geometry service is providing the projected coordinate and the code is placing the result on the map.

How certain are you that the numbers you supplied are the exact location ?
According to my widget the location in ED50 (23030) would be X: 664163.36 Y: 4206677.56 which is a little different than yours ED50 location. What software supplied you with the original coordinates ?

Drew
0 Kudos
PedroGarcia
New Contributor III
Hi Drew,

I'm totally sure about the coordinates I've provided you. Because the original orto (aerial image) is in ED50 and I've got the coordinates with ArcMap. Besides, even the location in ETRS89 that your widget provides is not totally accurate because the coordinates are the center of the traffic circle and your widget in ETRS89 displays the icon a little displaced (about 3 meters).

Thanks.
0 Kudos
GonzaloTapia_Koch
New Contributor II
Hi Drew,

I'm facing a weird bug with your widget. It work fine until yesterday, when suddenly the option "Go to XY coordinates" shows always this message "Error projecting coordinates". The other tools included like copy to clipboard an project coordinates work well, the trouble in only with the Go to option. I use my own geometry service, then i switch for the ESRI geometry service but nothing happens. In addition the viewshed widget don't work since yesterday either.

Could be an Flex upgrade that cause the bug?, my other widgets work fine and like said before the only tool broken is Go To XY.

Thanks in advance for any help

PD. Sorry for my bad english.

Esteban Koch
0 Kudos
AndrewTimmins
Regular Contributor
Hi Drew,

I'm facing a weird bug with your widget. It work fine until yesterday, when suddenly the option "Go to XY coordinates" shows always this message "Error projecting coordinates". The other tools included like copy to clipboard an project coordinates work well, the trouble in only with the Go to option. I use my own geometry service, then i switch for the ESRI geometry service but nothing happens. In addition the viewshed widget don't work since yesterday either.

Could be an Flex upgrade that cause the bug?, my other widgets work fine and like said before the only tool broken is Go To XY.

Thanks in advance for any help

PD. Sorry for my bad english.

Esteban Koch


Esteban,
It sounds like something else has broken outside of the widget. If you have an external version of your application I can assist with debugging it. If not, I suggest using Firebug or some other network traffic tool to see whats failing.

The error you see is when the geometry service fails. If you switched it to the ESRI geometry service I suggest making sure your browsers cache is clear. Sometimes the browser caches the config files and will still load your old config. Are you familiar on how to clear your browsers cache ?


Let me know if you get it going.
Thanks,

Drew
0 Kudos
AndrewTimmins
Regular Contributor
Hi Drew,

I'm totally sure about the coordinates I've provided you. Because the original orto (aerial image) is in ED50 and I've got the coordinates with ArcMap. Besides, even the location in ETRS89 that your widget provides is not totally accurate because the coordinates are the center of the traffic circle and your widget in ETRS89 displays the icon a little displaced (about 3 meters).

Thanks.


Pedro,
I tested your numbers with your service in ArcMap and I think the widget is working fine.
I would double check to make sure the numbers are correct. Here is how I tested your numbers.

- Create a new map document.
- Set the data frame to be ED_1950_Zone_30N
- Add your map service in
- Go to Edit->Go to XY
- Set the Units to Meters from the small drop down menu
- Enter your numbers : x=664269, y=4206813
- Zoom to point.

The attached shows my result (same as widget)

Let me know what happens.

Drew
0 Kudos