Mapscript: adding data points

Kieran Ames kames at optonline.net
Wed Dec 13 17:10:49 EST 2000


I want to thank all those who helped me last month in installing
Mapscript/PHP on an NT machine. I was wondering now if I might trouble
the group once more. I'm looking for some "starter code" for an SQL
interface.

I can't see anything in the archives that gives a plain example of
adding point data on-the-fly with Mapscript/PHP. For instance, with a
map containing layers like lakes, roads and parks, (...pre-defined shape
files), I'd like to add points, say... historical markers, from a MySQL
db. I use Decimal Degrees in my maps and my data have LAT/LON
coordinates.

The concept would be:
Add a layer as SELECT * FROM TABLE WHERE LATITUDE BETWEEN x&y AND
LONGITUDE BETWEEN a&b.
This would return points that I'd like to include on the map as a layer.

Some things I've found thus far include labelObj from
http://mapserver.gis.umn.edu/majordom_lists/archives/mapserver-users/html/0006/msg00125.html

but I can't make the connection to making the point layer.

An example would really help in getting me started with understanding
Mapscript (and PHP as well!).

Thanks for any help.
Kieran




More information about the mapserver-users mailing list