Problem setting maximum extents
Delfos, Jacob
jacob.delfos at MAUNSELL.COM
Mon Jan 9 16:23:49 PST 2006
Morgan,
In this line:
>> $max_extent_obj->setExtent (7510802, 548620, 7827464, 783920);
Is there any chance you mixed up your X and Y (order of arguments is
MinX, MinY, MaxX, MaxY) ?
If your coordinates are in UTM, then the Y coordinates has 7 digits, the
x has 6.
Hope this helps,
Jacob
> -----Original Message-----
> From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of morgan harvey
> Sent: 10 January 2006 07:59
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Problem setting maximum extents
>
> Hello.
>
> I am using the zoompoint, zoomscale, and zoomrectangle
> methods within
> PHP MapScript and am observing some incorrect behavior w/r/t the
> maximum extent argument. When zooming out of the map, the maximum
> extents seem only to be bound to a single axis, so that, for
> instance, the minx and maxx boundaries are met, but the map goes way
> over the y extents. It will consistently zoom out until the
> it passes
> both axis constraints. All other zooming operations work
> properly for
> me. Is this a bug within mapserver or mapscript (i couldn't find any
> known bug within bugzilla) or is this the way this is
> supposed to work?
>
> Here's the applicable code:
>
> if ($extent['x1'] && $extent['y1'] &&
> $extent['x2'] && $extent['y2']) {
> $map->setExtent($extent['x1'],
> $extent['y1'], $extent
> ['x2'], $extent['y2']);
>
> $extent_obj = ms_newRectObj();
> $extent_obj->setExtent($extent['x1'],
> $extent['y1'],
> $extent['x2'], $extent['y2']);
> }
>
> else {
> $extent_obj = ms_newRectObj();
> $extent_obj->setExtent ($map->extent->minx, $map-
> >extent->miny, $map->extent->maxx, $map->extent->maxy);
> }
>
>
> $max_extent_obj = ms_newRectObj();
> $max_extent_obj->setExtent (7510802, 548620, 7827464, 783920);
>
> $zoom_factor = -4;
> $map->zoompoint($zoom_factor,$point_obj,$map->width,$map->height,
> $extent_obj,$max_extent_obj);
>
>
> ------------------------
> Nostalgia isn't what it used to be.
>
More information about the MapServer-users
mailing list