[mapserver-users] How to add different PIXMAP Symbols for Point Layer based on user click on map
Venkat Rao Tammineni
vtammineni at roulacglobal.com
Wed Dec 10 19:53:58 PST 2008
Dear All,
How to add different types of PIXMAP Symbols to point layer based on user
click on the map. At present I can able to assign only single pixmap symbol.
Below is my code to load single symbol.
This is my mapfile code
Layer # Layer starts here
Name "PointLayer"
#======================== POSTGRE SQL Server Connection
============================================
ConnectionType POSTGIS
Connection "host=localhost dbname=GIS password=administrator user=postgres
port=5432"
Data "the_geom from globalnews"
#===========================================================================
========================
Type POINT
Status ON
TEMPLATE "query.html" # temporary template file for Query map
End # end of the State Layer
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----
And here I am loading C# code
public static void LaodStyles(mapObj map,layerObj layer)
{
layer=map.getLayerByName("PoinLayer");
symbolObj getSymbol = new symbolObj("Symbol", null);
getSymbol.type = (int)MS_SYMBOL_TYPE.MS_SYMBOL_PIXMAP;
getSymbol.setImagepath(@"\RIP\MapFile\round_push_2.gif");
getSymbol.sizex = 100;
getSymbol.sizey = 100;
map.symbolset.appendSymbol(getSymbol);
classObj clsObj = new classObj(layer);
clsObj.name = "test";
styleObj symStyle = new styleObj(clsObj);
symStyle.symbolname = "Symbol";
symStyle.symbol = map.symbolset.index("Symbol");
symStyle.size = 75;
}
Please any can help me or at least suggest me something.I am waiting for
your great response.
Advanced Thanks.
Regards
Venkat.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081211/1a66a8c1/attachment.htm>
More information about the MapServer-users
mailing list