Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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()" 
<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

You would have to send a new request to Mapserver. See

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


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.