Dear Sir
Can you please tell me how remove specific layer or at least clear the
layer form map. I can able to clear the layer based on index.but if I click
clear layer button again it is clearing whatever the 0 position next layer.
For example my map contains the layers called Continents and
countries and states that is like
0 ,1, 2 position. If I want to remove continents (0) that is in 0 position ,
if I use MapFunction.Map.removeLayer(0); , it is working fine. If I Click
the same button again countries will be the second position then the country
layer is removing .but I want to remove single layer.
protected void btnClearPointLayer_Click(object sender, EventArgs e)
{
if(Page.IsPostBack)
{
MapFunction.Map.removeLayer(0);
}
}
Is it Possible every time same layer removable(dynamically the same layer
will be adding).
I am waiting for your great response.
Advanced Thanks
Regards
Venkat.
From: Tamas Szekeres [mailto:[email protected]]
Sent: Tuesday, December 16, 2008 10:03 PM
To: Venkat Rao Tammineni
Cc: [email protected]
Subject: Re: [mapserver-users] Remove Layer based on layer Name C#
Hi,
How about doing this?
layer = MapFunction.Map.getLayerByName("PointLayer");
MapFunction.Map.removeLayer(layer.index);
Best regards,
Tamas
2008/12/16 Venkat Rao Tammineni <[email protected]>
Dear All,
I want remove layer based on Layer Name.Now I Can able to
remove layer based on index.Is it possible to do.
layer = MapFunction.Map.getLayerByName("PointLayer");
MapFunction.Map.removeLayer(0);
Thanks
Venkat.
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users