Zoom to Real Point
Mike Davis
mike.and.kerry at GMAIL.COM
Fri Oct 15 14:26:20 PDT 2004
I use a pop up window that accepts UTM or MGRS coordinates and then
re-draws the parent map to that location. What I do is take the
supplied x and y values and use them to create a new mapext value.
So:
xmin = xvalue - 250
xmax= xvalue + 250
ymin= yvalue - 250
ymax= yvalue + 250
(250 is a variable number depending on what scale you want the map to zoom to)
I use these to set the parent windows mapext value using:
window.opener.document.mapserv.mapext.value = xmin + ' ' + ymin + ' '
+ xmax + ' ' + ymax
then is is just a matter of submitting the mapserv form in the parent
window using:
window.opener.document.mapserv.submit();
and your off and running. So far is seems to work pretty well
Good luck
Mike Davis
GIS Specialist
Fort Richardson, AK
On Fri, 15 Oct 2004 12:32:12 -0700, Eric Katherman <vaiod at berloy.com> wrote:
> Okay, I have been looking into this for over 24 hours now and can't find the
> solution and am sure there is one. I have a real point (e.g. 623421.1121,
> 921128.2021) and want to zoom centered to that point. What am I missing?
>
> Eric
>
More information about the MapServer-users
mailing list