zoom to lat+long

Brant Anderson brant at MUDLABS.COM
Sat Sep 18 18:23:49 EDT 2004


Hi Dylan,

Calculating a map extent will work. All you are doing is overriding the
extent that was set in the mapfile. Just change it via the URL using the
CGI interface with map_extent=minX+minY+maxX+maxY.
For example: map_extent=329801+5104534+330613+5105346

Go here for a complete reference:
http://mapserver.gis.umn.edu/doc42/cgi-reference.html
Take a look at "Changing map file parameters via a form or a URL" near
the bottom of the document for more details.

Cheers,
Brant Anderson



Dylan Beaudette wrote:

> Greetings!
>
> So far I have had great success with with mapserver 4.2 compiled for
> linux with the help of the mail list!
>
> I was thinking about implimenting a form element that would allow a
> persion to zoom to a set lat+long coordinate. All of my geographic data
> are in already in LatLong style projection, thus there should be no need
> for any complicated math or re-projections.
>
> However, I can't quite figure out how to get mapserver to zoom to a
> user-input coordinate pair...
>
> Do i need to calculate a map extent from the user-input coordinates?
>
> Thanks in advance!
>
> Dylan Beaudette
> Soil Science Grad Group
> University of California at Davis
>



More information about the mapserver-users mailing list