displaying objects based on DBF information

Yeewen Sat yeewen at petromap.com
Tue Jan 16 12:27:23 EST 2001


I think my question was a bit unclear. I need to be able to tell mapserv
which object to display based on what a user has selected at runtime. So,
it's like I need to change the CLASS EXPRESSION in the mapfile at runtime,
telling mapserv what to display, based on user selections.

Say, on a page, we will display a list of all objects that are currently
visible (I think we can do this through other methods. Users can then select
the objects they want to display, and click on Refresh to display a new map
containing only those objects being selected (hiding the ones that are not
selected). Say the user selected objects with ObjectID=1, and ObjectID=5.
You would tell mapserv to only display objects with these ObjectIDs. And, at
the same time, user can zoom in/out, and the list of objects will change.
Users can then modify their selections in the same manner.

>From what I understood, CLASS object EXPRESSION is static.....only those
objects that matched the EXPRESSION get displayed, and the selections of
objects get displayed don't change at run time.

Thanks.
--
Yeewen Sat

Petromap Inc.
Voice: (403)263-4664x239
Fax: (403)266-2423
Email: yeewen at petromap.com <mailto:yeewen at petromap.com>



-----Original Message-----
From: Stephen Lime [mailto:steve.lime at dnr.state.mn.us]
Sent: January 16, 2001 9:39 AM
To: Mapserver-Users; yeewen at petromap.com
Subject: Re: displaying objects based on DBF information


This is what class objects are for. You can use class expressions to
restrict display to certain sets of features or to change the display
characteristics (eg. color/size/symbol) for each "class". I've attached
a map file that I use to draw different highway shields based on an
item value. Look at the definitions for "major_roads".

Steve

>>> "Yeewen Sat" <yeewen at petromap.com> 01/15/01 03:35PM >>>
Hi,

I like to find out if mapserver CGI support this:

display objects based on specific DBF information?

As an example, DBF file contains a field named ObjectID. And, a map being
displayed has bunch of lines in it. When user zoom into the map, all lines
that fall inside the bounding rectangle will show up. Is there a way to tell
mapserver to draw only those lines that match the given ObjectIDs?

The same question applies to mapscript. Can I just pass these lines
ObjectIDs to some mapscript functions, and it will only plot these lines?

If mapserver cgi or mapscript does supports the above functions, can I get
some examples to get me started?

Thanks.
Yee Wen


Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937





More information about the mapserver-users mailing list