Problem setting maximum extents
morgan harvey
mharvey at PDX.EDU
Mon Jan 9 17:09:48 PST 2006
All of my extents are correct -- my projection is NAD 83 HARN Oregon
North, epsg=2913 in the mapfile. I've checked those numbers several
times and they are correct for my map.
thanks,
-mo
------------------------
As part of the conversion, computer specialists
rewrote 1,500 programs; a process that
traditionally requires some debugging.
--USA Today, referring to the IRS
switchover to a new computer system.
On Jan 9, 2006, at 4:23 PM, Delfos, Jacob wrote:
> 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