[Mapserver-users] Re: auto extent?
Hobbes Zatow
hobbes_zatow at yahoo.com
Fri Aug 22 15:15:40 PDT 2003
So instead of using a filter at all, I'd use a query?
Any pointers where I might mapscript code to do the
iteration through a built-in query's results and
aggregate the extent? I'm just getting started with
mapscript ...
Thank you.
--- Steve Lime <steve.lime at dnr.state.mn.us> wrote:
> Basically your talking about doing a query first and
> then using the
> resulting shapes to
> set an extent. From the CGI point of view this
> feature is available.
> You might do somthing
> like this to initialize an application:
>
>
>
.../mapserv?map=foo.map&mode=itemquery&qlayer=counties&qitem=state&qstring=FL&mapext=shapes
>
> and then in foo.map you'd either use query templates
> to create the
> interface itself or simply
> redirect them to the interface but with extent
> generated by the query.
> The mapext=shapes
> is the key. I do this all the time, works
> swimmingly.
>
> In MapScript it's just as easy. First you do an item
> query, then loop
> through the results creating
> an aggregate extent as you go and then use that
> value for your map
> extent.
>
> Steve
>
> Stephen Lime
> Data & Applications Manager
>
> Minnesota DNR
> 500 Lafayette Road
> St. Paul, MN 55155
> 651-297-2937
>
> >>> Hobbes Zatow <hobbes_zatow at yahoo.com> 08/22/03
> 09:58AM >>>
> Is there an auto extent feature in mapserver that
> will
> display a zoomed-in view of the visible area of a
> map?
>
> For example, given a shapefile of US counties, if I
> filter so that only Florida counties are matched,
> could mapserver display Florida within whatever SIZE
> the map file specifies?
>
> If not, can anyone provide code for doing this using
> perl/mapscript?
>
> I tried leaving out EXTENT from the .map file, but
> at
> least the CGI file did not like that.
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the MapServer-users
mailing list