Make points on a map clickable + use criteria from MySQL

Fawcett, David David.Fawcett at STATE.MN.US
Tue May 30 13:03:56 EDT 2006


Sarah, 
 
You can accomplish the 'clickable-ness' in one of two ways.  You can do
a point query to return attribute information about a point or points
within the tolerance distance.  The other way to do it is with
imagemaps.  Take a look at the imagemap Howto:
http://mapserver.gis.umn.edu/docs/howto/imagemaps
 
I think that you are actually looking for more than just a simple
imagemap though.  It sounds like you want to a 'sticky' selector so you
can select multiple points before running the query.  This is going to
most likely require some client-side javascript.  Luckily for you, Steve
Lime has done something similar with polygons.  Take a look at his
example at:  
http://maps.dnr.state.mn.us/cgi-bin/mapserv48?map=/usr/local/www/docs_ma
ps/eco/rsg/search/search_example.map&qlayer=county&mode=nquery&searchmap
=true 
 
 
As for querying based on attributes in a joined MySQL database, I am not
sure of the status of the join functionality.  It it is possible, it
would be done using MapServer compiled with OGR.  
 
If your attribute data is already in MySQL, and you are just plotting
points, you not just store your point locations in MySQL as well?  That
way, you could just query the points that you want.  Take a look at:
http://mapserver.gis.umn.edu/docs/howto/ogrmysql
 
You need a relatively recent MapServer/OGR compile to do this.  Probably
within the past year on Windows, but last month or two on 'nix.  
 
David.

	-----Original Message-----
	From: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Sarah Parrott
	Sent: Tuesday, May 30, 2006 11:25 AM
	To: MAPSERVER-USERS at LISTS.UMN.EDU
	Subject: [UMN_MAPSERVER-USERS] Make points on a map clickable +
use criteria from MySQL
	
	
	Hi,
	
	 Is there a way to make points on a map clickable? Basically I
want the user to be able to look at the map and then select a subset of
the points on it by clicking on them and then use this 'list' of points
somewhere else. The points are stored in a shapefile which is displayed
on top of a raster layer. 
	
	 Also, with the same points in the shapefile, can I display them
differently depending on a value in a mysql database? Each user will
have their own data about that point - mainly whether or not they have
been there - and I want to be able to show points they have visited in a
different way to points they haven't. 
	
	Thanks!
	
	Sparrott :)
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060530/37bb2180/attachment.html


More information about the mapserver-users mailing list