Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a mapfile where the symbol color is set to blue. In my html I have a hover event that brings a popup when the user puts their cursor over the symbol. Working as intended.

Now on that same hover, I'd like to change that blue to another color.

This seems tricky as the color is set in the mapfile.

I added a class to my html tag, but can only modify content within the popup div...or so it seems.

map_body.html. Apologies for the lack of formatting but I tried to format it nicely within vim and got an unexpected token error, so I guess it has to be like this.

<! -- MapServer Template -->
<area shape="circle" class="map_circle" coords="[shpxy precision=0 proj=image yf=",7"    
xf=","]" title="" alt="" onmouseover='displayCityInfoHover("<table><tr><td>[Name],</td>
<td><td>[ICAO]</td></tr></table>", [shpxy precision=0 proj=image yf=",7" xf=","], 
[shpxy precision=0 proj=image yf=",7" xf=","])' onmouseout="hideCityInfoHover()" 
onclick='displayCityInfo("<table><tr><td>Name:</td><td><a 
href=\"/customer_airports2.php?lat=[LAT]&long=[LONG]\">[Name]</a></td></tr><tr>
<td>Airport Code:</td><td>[ICAO]</td></tr><tr><td>Lat:</td><td>[LAT]</td></tr><tr>
<td>Long:</td><td>[LONG]</td></tr></table>")' ">
share|improve this question

2 Answers 2

You would have to send a new request to Mapserver. See http://mapserver.org/cgi/runsub.html.

share|improve this answer

You can send a new request with parameters that override the symbol color. See here Changing map file parameters via a form or a URL

You can also highlight one ore more features. See here SLD based selection on WMS layers

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.