Actually, in the "old days" of web mapping (up until 2 or 3 years ago?) the way we did that was to treat the map image like a big submit button, which passed the x-y image coordinates back to a CGI program which then converted these image coordinates to geographic coordinates and responded appropriately.
You can do everything you are trying to do in a VERY low-bandwidth way with Mapserver! I would also recommend a book like Tyler Mitchell's Web Mapping, everything you'll need to deal with this stuff is in there including the code to do the planar math that Chris refered to. Cheers, Percy Kaspar Fischer wrote: > Dear list, > > Is there a way to convert the x/y-coodinates, measured from the top- > left corner of a map centered at a fixed position and zoom level, to > lat/long-coordinates without running on a browser? For instance, is > there a webservice available for this? > > Background: I need to show on my website a very, very low-bandwidth > map of a specific, fixed region at a specific, fixed zoom level. To > meet the bandwith requirement, I would show a PNG copy with the map > (including credits to OpenLayer, of course) and only load a very small > piece of custom JavaScript code -- not the whole OpenLayers JS file. > > When the user clicks the map, the code sends the x/y-coordinates back > to the webserver via AJAX. The server now needs to convert these to > lat/long-coordinates. > > Is there an easy way to achieve this? > > Thanks in advance for any guidance on this. > hbf > > > P.S. I have posted about this subject on the Google Maps API list > a few minutes before but have become aware of OpenLayers while > searching a little further. For the sake of completeness, here is the > link to the original message regarding the Google Maps API: > > > http://groups.google.com/group/Google-Maps-API/browse_thread/thread/278923f0aad4811a/ad50789413873976?lnk=gst&q=web+service+coordinates#ad50789413873976 > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users > -- David Percy Geospatial Data Manager Geology Department Portland State University http://gisgeek.pdx.edu 503-725-3373 _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
