[Mapserver-users] Math

Ryan, Adam ARyan at co.linn.or.us
Wed Jun 2 18:45:06 EDT 2004


Eric,

Hope I get this right...

You can send mapserv.exe a point in one of two ways.

First, you could send the imgxy value - the point in terms of the image (the
top left being 0 0).  In conjunction with this, you'll have to send the
IMGSIZE and the IMGEXT parameters of the image that the user clicked on.
Using these, mapserv calculates the point in the coordinate system of the
shapefiles (etc) you're using and the scale to use.

Second, you could just send the calculated point and a scale directly to
mapserv.  You'd basically have to calculate the point on the client side.
To do this you would start with the minx and miny in coordinate system
terms, and add to this imgx*cellsize and imgy*cellsize respectively.
Cellsize is simply mapWidth/imageWidth for simples sake.

Hope this helps,

Adam

-----Original Message-----
From: Eric Katherman [mailto:vaiod at berloy.com] 
Sent: Wednesday, June 02, 2004 2:42 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] Math


Okay... This is confusing me.. how does mapserver know where to "move" to
when 
a user clicks the map.  It is returning mapa_x and mapa_y points of say
x:345 
and y:233.  How are the extents calculated from this? Also how does scale 
play into the extents?

Thanks,
Eric
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list