FWD: newbie question
Daniel Morissette
morissette at dmsolutions.on.ca
Wed Oct 25 14:50:53 PDT 2000
> ------------- Begin Forwarded Message -------------
>
> From: "Sebastiaan Raaphorst" <sebastiaan at info.nl>
>
> I got the mapserver running on NT, see http://routenet.info.nl/nederland/
> which shows the major road network of the Netherlands. In a MS SQL server i
> have vehicle positions which are updated every minute, i would like to put
> them on the map. The vehicle positions are stored in a simple table
> containing vehicle_id, lat, lon, speed, status and timestmap. Any
> suggestions on how to ad this 'layer' to the map ?
>
I don't think you can do that directly with the mapserv CGI without some
kind of scripting on the server.
So one way could be to use MapScript in a PHP environment (or maybe
Perl???, not sure since you're on Windows???) to access your table
through ODBC and create a temporary shapefile with your locations. Then
you add the temporary shapefile to your .map file and draw the map.
If you have only a few locations to map then you may not even need to
create a temporary shapefile... just creating pointObj features in
MapScript and drawing them should be good enough.
Unfortunately there is no sample application showing how to do that, but
that would be a good candidate for a new MapScript demo since this kind
of question comes back often.
Good Luck!
--
------------------------------------------------------------
Daniel Morissette morissette at dmsolutions.on.ca
http://www.dmsolutions.on.ca/
------------------------------------------------------------
Don't put for tomorrow what you can do today, because if
you enjoy it today you can do it again tomorrow.
More information about the MapServer-users
mailing list