Zoomscale (Integer data type?)

Kevin Grootendorst kgrootendorst at BAIRD.COM
Tue Feb 8 13:48:39 EST 2005


OK, so If I get the 'real' pixel value of the point of interest, I should
be able to use something like this to zoom to the point:

$oMapNavigator->zoomPoint(250, $px1, $py2);

So then something must be wrong with the way I convert lat-long to pixels...

Thanks.

Kevin



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

>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