maxscale & queryByAttributes with mapscript
Tim Schaub
tim at COMMENSPACE.ORG
Fri Aug 12 10:23:38 PDT 2005
I thought this might be a problem that others have confronted.
When using queryByAttributes() (at least the PHP MapScript variety)
there is an implicit queryByRect() with the map extent that happens
before the attribute query. So if the map is zoomed to an extent that
doesn't contain the feature that you're looking for, you'll never find
it.
The way I've dealt with this is to set the extent of the map to the
extent of the query layer (or some max extent) before doing the
queryByAttributes(). This, however, also fails if the query layer has a
maxscale that is less (in mapserver terms) than the map scale when
zoomed to this new extent. Getting around this requires temporarily
setting the layer's maxscale to -1.
Is this too obvious to be documented somewhere? Or is there a better
method?
Tim Schaub
406-579-5929
CommEn Space <http://www.commenspace.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050812/8e6bc42d/attachment.htm>
More information about the MapServer-users
mailing list