Zoomscale (Integer data type?)

Ed McNierney ed at TOPOZONE.COM
Tue Feb 8 13:29:46 EST 2005


Kevin -

zoomScale zooms to a given scale centered on a pixel in the image,
presumably a pixel that was clicked on.  The pixel coordinates (that is,
the X and Y coordinates in the image) of the pixel of interest must be
integers, as you can't click on the right half of a pixel, for example.

They're not the spatial (geographic) coordinates of the point, which
might not be integers.  Pixel coordinates must be integers.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242   

-----Original Message-----
From: Kevin Grootendorst [mailto:kgrootendorst at BAIRD.COM] 
Sent: Tuesday, February 08, 2005 1:25 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU; Ed McNierney
Subject: Re: Zoomscale (Integer data type?)

Ed,
They're supposed to represent the location of a point.

Info:
Spatial reference: NAD83, DD.
Original extents: (-93 38 -74 51)
Map Size (600 x 475) w x h
Longitude/Latitude of point: -79.606, 43.496

Kevin


On Tue, 8 Feb 2005 13:16:51 -0500, Ed McNierney <ed at TOPOZONE.COM> wrote:

>Kevin -
>
>You can't have a fractional pixel - what are those extents supposed to 
>represent?
>
>        - Ed
>
>Ed McNierney
>President and Chief Mapmaker
>TopoZone.com / Maps a la carte, Inc.
>73 Princeton Street, Suite 305
>North Chelmsford, MA  01863
>ed at topozone.com
>(978) 251-4242
>
>-----Original Message-----
>From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] 
>On Behalf Of Kevin Grootendorst
>Sent: Tuesday, February 08, 2005 1:01 PM
>To: MAPSERVER-USERS at LISTS.UMN.EDU
>Subject: [UMN_MAPSERVER-USERS] Zoomscale (Integer data type?)
>
>Does anybody know how to force 'ZoomScale' to recognize double or float

>data types, instead of treating numbers as integers?
>
>I have the following extents (in pixels):
>$px = 417.4;
>$py = 290.6;
>
>Using ZoomScale:
>$oMapNavigator->zoomScale( 25000, $px1, $py2);
>
>The map actually zooms to the point (417,290) which causes my point to 
>appear off centered.  I want to have the point centered.
>
>Thanks.
>
>Kevin



More information about the mapserver-users mailing list