PHP, MySQL, and points!

Daniel Morissette morissette at dmsolutions.on.ca
Tue Oct 31 15:15:25 EST 2000


Frederic Marchand wrote:
> 
> Since i start playing with ms, i've got projection, zoom-in, zoom-out and
> other stuff working on most of maps i've got. But now, i would like to put
> point (like red dot) on the map where my lat,long coord are stored in
> mysql db. I know i can put point using the feature command directly from
> the map file but i would like to know how to create those point directly
> from PHP. I tried to use the object pointObj with the draw functions, but
> in PHP3 module, draw don't exist and in PHP4, where draw is there, there
> is no SHADESET support (as MARKERSET and LINESET).
> 

There are a couple ways to do it:

1- Using pointObj->draw() as you suggested above.
   For how to convert your symbol file from 3.3.011 format to the new
   format, see:
http://mapserver.gis.umn.edu/majordom_lists/archives/mapserver-users/html/0010/msg00027.html

2- For best performance in rendering and spatial queries: Convert all
   your points to a shapefile... MapServer works very well with 
   shapefiles.

3- Assuming that you don't display all 110000 points all the time,
   but instead run an initial SQL query to pre-select a set of points 
   to play with based on some client selections, then see:
http://mapserver.gis.umn.edu/majordom_lists/archives/mapserver-users/html/0009/msg00059.html

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