[Mapserver-west] Bounding Box and Selection
Matthew Perry
perrygeo at gmail.com
Mon May 30 15:12:47 EDT 2005
Dean,
You wrote:
> Is there any code out there for a bounding box? And once the box has been
> drawn, the items are selected?
>
The call to mapserver is relatively simple: Just use a mode=nquery
which selects multiple featuers. Then give it the mapfile, the imgext
(image extents in real coordinates), the imgbox (coordinates of the
query box in pixels), the imgsize (map image size in pixels) and the
layers you want to query. Here's an example:
http://localhost/cgi-bin/mapserv.cgi?mode=nquery&map=/maps/atlas.map&imgext=338729.35560859187+4471600+673170.6443914081+4701700&imgbox=545+213+591+253&imgsize=610+420&layers=major_rivers
Now the real trick is getting the interface to construct this query
for you. What client software (ie HTML interface) are you using to
talk to mapserver? This will largely be a javascript issue and will
vary depending on your interface.
--
Matt Perry
perrygeo at gmail.com
http://www.perrygeo.net
>
>
> Hi everyone,
>
> Is there any code out there for a bounding box? And once the box has been
> drawn, the items are selected?
>
> For instance, you want to select several wells from a field, so you use a
> bounding box. This determines the x,y (or lat/long) values for the corners.
> You then want the selected wells to show up on a list (via template html).
>
> Cheers,
> Dean
>
> _______________________________________________
> Mapserver-west mailing list
> Mapserver-west at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/mapserver-west
>
>
>
More information about the Mapserver-west
mailing list