[mapserver-users] Reporting lat/long from projected map units

Milo van der Linden milo at dogodigi.net
Wed Jan 12 12:44:14 EST 2011


(Sorry, my last posts went straight to you by accident, I prefer to stay on
the list, but gmail for applications not always agrees with me)

proj4js has project pages including documentation on the OSGeo wiki. The
userguide is here:

http://trac.osgeo.org/proj4js/wiki/UserGuide

and it immediately explains what you want


2011/1/12 Bistrais, Bob <Bob.Bistrais at maine.gov>

>  Yes, I can get UTM coordinates back.  Can you elaborate a bit on
> proj4js?  I’m not familiar with that.
>
>
>  ------------------------------
>
> *From:* Milo van der Linden [mailto:milo at dogodigi.net]
> *Sent:* Wednesday, January 12, 2011 11:10 AM
>
> *To:* Bistrais, Bob
> *Subject:* Re: [mapserver-users] Reporting lat/long from projected map
> units
>
>
>
> Well then one question remains:
>
> Are you able to convert screen coords to UTM capturing an onclick event?
> Because then all you need to do is enhance it with proj4js
>
> 2011/1/12 Bistrais, Bob <Bob.Bistrais at maine.gov>
>
> Yes, a web mapping application.  Not using Open Layers.  We are using
> PHP-Mapscript/HTML/JavaScript.  All queryable data is in shapefiles, again,
> all of these are in UTM.
>
>
>  ------------------------------
>
> *From:* Milo van der Linden [mailto:milo at dogodigi.net]
> *Sent:* Wednesday, January 12, 2011 11:03 AM
> *To:* Bistrais, Bob
>
>
> *Subject:* Re: [mapserver-users] Reporting lat/long from projected map
> units
>
>
>
> Are you talking bout a web-app? Do you use a client like OpenLayers? What
> programming language(s) do you use? Is your datasource a database? Like
> postgis?
>
>
>
> If you can get UTM coordinates from the mouseclick, the next best option
> (in my opinion) would be to use proj4js:
>
> http://proj4js.org/
>
> Simply embed the js-library ad an event for mouse handling and convert:
> screen->utm->4326.
>
>
>    2011/1/12 Bistrais, Bob <Bob.Bistrais at maine.gov>
>
> This should be fairly straightforward, but I was wondering what is the
> easiest and quickest way to convert coordinates on the fly.  All my data is
> in UTM coordinates.  I want to report coordinates to the screen in
> Lat/Long.  Changing the projections on the map files to lat/long (EPSG:4326)
> is not an option, as this will cause problems elsewhere.  So what I want to
> do is take point coordinates, either from a mouse click or from UTM
> coordinates, project to lat/long, which will be reported in a result
> window.  What is the quickest way to do this?
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110112/1615cf78/attachment.html


More information about the mapserver-users mailing list