Zoom to Real Point

Eric Katherman vaiod at BERLOY.COM
Mon Oct 18 13:41:35 EDT 2004


Yes and no, I am able to zoom to the point relatively closely by creating the
extents with these lines:

$right_brdr = ($link[0] + ($_COOKIE["CTRENCH_GIS_CONF-HEIGHT"] *2));
$left_brdr = ($link[0] - ($_COOKIE["CTRENCH_GIS_CONF-HEIGHT"] /2));
$top_brdr = ($link[1] + ($_COOKIE["CTRENCH_GIS_CONF-WIDTH"] /2));
$bottom_brdr = ($link[1] - ($_COOKIE["CTRENCH_GIS_CONF-HEIGHT"] *4));

Why, I don't know because I thought initially I would just need to divide each
one by two and add the diff to each side of the point.  That was zooming to
the point but it was in the bottom right every time. What I have above seems
to take me close to centering that point.  If anybody has a better way I
would love to hear your opinion.  Mike's suggestion seems sound although I
should be able to get the same result with PHP and setting the extent with
setextent().

Eric

> with what Mike Davis and I wrote were you able to get this thing figured
> out?
>
> KL
>
> > ----------
> > From:       Eric Katherman[SMTP:vaiod at berloy.com]
> > Sent:       Friday, October 15, 2004 4:45 PM
> > To:         Lawrence, Kevin
> > Cc:         MAPSERVER-USERS at LISTS.UMN.EDU
> > Subject:    Re: [UMN_MAPSERVER-USERS] Zoom to Real Point
> >
> > Yea that is sort of what I am doing now... I have it so that the point is
> > zoomed to but I don't have it centered quite yet...
> >
> > I am using PHP to generate the maps.
> >
> > Here is a part of what I am using: (It makes no sense to my not so math
> > friendly brain what this is doing)
> >
> > $right_brdr = ($link[0] + ($_COOKIE["CONF-HEIGHT"] *2));
> > $left_brdr = ($link[0] - ($_COOKIE["GIS_CONF-HEIGHT"] ));
> > $top_brdr = ($link[1] + ($_COOKIE["GIS_CONF-WIDTH"] /2));
> > $bottom_brdr = ($link[1] - ($_COOKIE["GIS_CONF-HEIGHT"] *2));
> >
> > The cookie values are set currently at 800x600.
> >
> > I then just either take the user to the map or present them with links if
> > several answers to the query are available (e.g. Central & 7th Ave or 7th
> > St)
> >
> > > Brute force approach?
> > > figure out the new window extents that surround the point and use those
> >
> > as
> >
> > > the extents to draw the new map.
> > >
> > > > ----------
> > > > From:   UMN MapServer Users List[SMTP:MAPSERVER-USERS at LISTS.UMN.EDU]
> > > > on behalf of Eric Katherman[SMTP:vaiod at BERLOY.COM]
> > > > Reply To:       Eric Katherman
> > > > Sent:   Friday, October 15, 2004 3:32 PM
> > > > To:     MAPSERVER-USERS at LISTS.UMN.EDU
> > > > Subject:        [UMN_MAPSERVER-USERS] Zoom to Real Point
> > > >
> > > > 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