[mapserver-users] Highlighting symbols dynamically on a point layer using C# mapscript

Tamas Szekeres szekerest at gmail.com
Tue Feb 23 15:38:04 EST 2010


Assuming the mapObj.drawQuery method is not appropriate for you (as you
intend to use a custom symbol for highlighting), you might want to create a
new layer on the top of the map, such as:

layer = new layerObj(map);
layer.name = "overlay layer";
layer.status = mapscript.MS_ON;
classObj newclass = new classObj(layer);
newclass.name = "Cosmetic";
styleObj style = new styleObj(newclass);
style.setSymbolByName(map, "symbolname");

then you should populate this layer with the selection data:

resultCacheObj results = querylayer.getResults();
if (results != null && results.numresults > 0)
       resultCacheMemberObj res;
       shapeObj feature;
       for (int j = 0; j < results.numresults; j++)
                res = results.getResult(j);
                feature = querylayer.getFeature(res.shapeindex,
                if (feature != null)

Best regards,


2010/2/23 sireesha <sireesha_alloori at satyam.com>

> Dear All,
> I am developing an application using mapserver.
> My requirement is when i select a district in dropdown list the
> corresponding villages should be highlighed with a different symbol.
> District is a polygon layer and villages are point layer.
> I have given symbols to the point layer in mapfile.
> Now how do i change the symbol of selected points(villages) in the point
> layer?
> I tried to create a dummy layer in map file and then add selected points to
> the dummylayer  but it is not working.
> Please help me.
> Thank you.
> Regards,
> Sireesha
> --
> View this message in context:
> http://n2.nabble.com/Highlighting-symbols-dynamically-on-a-point-layer-using-C-mapscript-tp4617293p4617293.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100223/22fd89cf/attachment.html

More information about the mapserver-users mailing list