[Fwd: Re: [mapserver-dev] Wrong number of queryresults(phpmapscript)between a static and dynamic setup]

Steve Lime Steve.Lime at dnr.state.mn.us
Thu May 15 09:15:29 EDT 2008

Ok, I figured it out. It's an extent issue. The key is the method "$map->setExtent" in MapScript (all languages). That does more than just set the minx,miny,maxx,maxy values it also adjusts them to fit the aspect ratio defined by the map width and height. In this case you have a square image with a tall and skinny extent so the x values are increased. I'm not sure that I agree with adjusting the extent in setExtent like this. I don't think it's necessary since the draw or prepareImage will do this any way and the side effects are problems like this. I didn't check to see if the docs warn about the adjustment.

Anyway, when reading from the mapfile the extent is left "as is" until you draw. If you move your save calls below your draws you'll see the effect of the adjustment. So in the 1st case the larger extent is used to pre-filter and in the 2nd the smaller extent is used. One of your points is outside that smaller extent but inside the larger, hence the confusion (see attached image).

Make sense?


>>> Nicol Hermann <nicol at nicol.info> 05/13/08 2:05 PM >>>
Hi Steve,

I like to ask if there is anything new on this? Do you need any further
information from me?

I am really interested in a solution. 

Many thanks

-------------- next part --------------
A non-text attachment was scrubbed...
Name: k.gif
Type: image/gif
Size: 1408 bytes
Desc: CompuServe GIF graphic
Url : http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20080515/ab491c5c/k.gif

More information about the mapserver-dev mailing list