MGRS Widget for Flex Viewer

6092
47
Jump to solution
02-15-2012 08:37 PM
MarcGraham
Occasional Contributor
Hi,

Has anyone got a compiled widget for the Flex Viewer that returns the current cursor location as an MGRS grid?

It would be great if it worked with multiple coordinate systems.

regards,

Marc
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Frequent Contributor
Marc,

I have looked at it on my system and the right click copy MGRS is working as it should. Just in case we have had a mix up of files along the way somewhere I have attached a zip file containing the 3 widgets (coordinate, coordinatemenu & MGRS) that are all working on my system.

Regards

Anthony

View solution in original post

0 Kudos
47 Replies
AnthonyGiles
Frequent Contributor
Marc,

Have you had a look at the widgets posted by Kerry Coffin:


'>http://www.arcgis.com/rc/item.html?id=56d4d2ed5d474eb4b8e29973d2376652

http://www.arcgis.com/rc/item.html?id=3192d6f61c9f4baaa34c9789d00d5b95

I found these really useful and have combined the code into the coordinate widget to provide the same functionality that is provided in these widgets. (i.e. show MGRS location on mouse move, turn MGRS grid and geographic grid on/off and zoom to mgrs) in a banner along the bottom of the application.

Regards

Tony
0 Kudos
MarcGraham
Occasional Contributor
Hi Tony,

That is exactly what I am after.  However, It would be brilliant if someone could upload a compiled version for Flex Viewer 2.5.  I don't have any way to build that widget.  Is there any chance you could compile your modified coordinate widget and upload that? 

That would be extremely awesome.

Cheers,

Marc
0 Kudos
AnthonyGiles
Frequent Contributor
Marc,

Please find attached zip file that includes compiled versions of the MGRS widget and my updated coordinate widget. They are both compiled to work with geographics (EPSG 4326). Hopefully they will work without the rest of the project as they do ultilise two libraries that do not seem to be in the compiled version of the application. Unfortunately if you do require them to work with a different projection you will need to contact Kerry Coffin to provide different libraries.

The coordinate widget is added into the UI area in your main config file:

<widget url="widgets/Coordinate/CoordinateWidget.swf" config="widgets/Coordinate/CoordinateWidget.xml" left="0" bottom="0"/>

Then set bottom="25" as a property of your map element.

The MGRS widget gets added in the same way as other widgets.

Hope these are of some use

Regards

Tony
0 Kudos
MarcGraham
Occasional Contributor
Those tools are great.  I have spun up a quick test site in WGS84 and they work perfectly.  I really like how the mgrs tool returns a grid square if you enter less than ten figures, genius.  ESRI need to implement that into ArcGIS Desktop for 10.1.  One small improvement would be to be able to right click and copy the grid to the clipboard, that would make them even awesomer!

Only thing is our web maps are all running in WGS1984 Web Mercator Auxilliary Sphere .  Kerry Coffin, if you are out there, are you able to help?

Cheers!

Marc
0 Kudos
AnthonyGiles
Frequent Contributor
Marc,

I have implemented this functionality by adapting the coordinate menu widget by Andrew Timmins:

http://www.arcgis.com/home/item.html?id=edd4a2b7c722493a8b08f53eaa131e1e

Again place the widget in your UI elements in the main config:

<widget url="widgets/CoordinateMenu/CoordinateMenuWidget.swf" config="widgets/CoordinateMenu/CoordinateMenuWidget.xml" top="20" left="8"/>

Regards

Tony
0 Kudos
MarcGraham
Occasional Contributor
Tony,

The combination of the two tools you have supplied me are Exactly what I am after.

Except for the fact they only work on a WGS84 webmap.

If anybody could adapt these to work with a WGS1984 Web Mercator Auxilliary Sphere map I would be eternally grateful.

Thanks heaps!

Marc
0 Kudos
MarcGraham
Occasional Contributor
Hi Tony,

Is there any chance you could incorporate the Web Mercator version of Kerry's widgets as found here:

http://www.arcgis.com/home/item.html?id=56d4d2ed5d474eb4b8e29973d2376652

If you could help me on this it would be awesome.

Cheers,

Marc
0 Kudos
AnthonyGiles
Frequent Contributor
Marc,

Sorry for the delay in responding been a bit tied up in work, hopefully the attached zip will answer your questions

Regards

Anthony

PS. Please don't forget to mark post as answered

[ATTACH=CONFIG]12348[/ATTACH]
0 Kudos
TrevorWeiland
New Contributor III
Thank you!
0 Kudos