I have a Web Application that displays a Map Service that is in NAD 1927 UTM Zone 15N. I have JavaScript code that displays the XY in status bar based on where mouse cursor is on that map. I want to display Latitude/Longitude values instead. Does anyone know how?
A:
There is a javascript port of the proj.4
projection system called proj4js. proj.4
allows converting from grids to lat/long and vice-versa.
mtrw
2010-04-19 20:45:28
This sounds promising mtrw. I don't suppose you have any quick code to show me how to implement this? I see there is some documentation that I will start reading up on.
Josh
2010-04-19 20:53:53
@Josh - I'm afraid not. I've used `proj.4` in desktop stuff, but I've never done any web development.
mtrw
2010-04-19 21:18:35
mtrw- How did you get this installed? My OS is Windows XP. All the files that came from the zip file are readable in wordpad but I'm confused
Josh
2010-04-19 21:41:46
@Josh - I've only ever installed `proj.4`, which is the original C-language version. If you want to try that, it's available at http://trac.osgeo.org/proj/ (look under the "Binaries" section for prebuilt files). You can use `invproj` from the command line for the calculation you're looking for. But getting it into a browser is outside my abilities, I'm afraid.
mtrw
2010-04-19 21:53:17
@Josh - Does a c# solution work for you? See http://stackoverflow.com/questions/1867950/is-there-a-free-net-library-to-convert-osgb36-to-wgs84/2129570#2129570
mtrw
2010-04-19 21:56:50
Hi mtrw- I really need it in javascript if at all possible. I'll take a look at what you posted to see if this can help. Thanks,
Josh
2010-04-19 22:08:12