[OpenLayers-Users] Deleting a layer by its name
Frank Broniewski
brfr at metrico.lu
Mon Feb 3 00:08:17 PST 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Well, there's getLayersByName() [1] and removeLayer() [2], what else
do you need?
[1]
http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getLayersByName
[2]
http://dev.openlayers.org/releases/OpenLayers-2.13.1/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.removeLayer
Am 2014-02-03 06:19, schrieb adityakumar529:
> Hello User,
>
> I am adding layers in a loop by executing the same function again.
> var one = new OpenLayers.Layer.WMS(name,"url",
> {'layers':name,transparent: true, format: 'image/gif'},
> {isBaseLayer:false}); map.addLayer(one);..
>
>
> Now I want to delete the the layer with the layer name. Can anyone
> help me to do so?
>
>
> Aditya Kumar
>
>
>
> ----- GIS Developer
>
> -- View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Deleting-a-layer-by-its-name-tp5101463.html
>
>
Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________ Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
- --
Frank BRONIEWSKI
METRICO s.à r.l.
géomètres
technologies d'information géographique
rue des Romains 36
L-5433 NIEDERDONVEN
tél.: +352 26 74 94 - 28
fax.: +352 26 74 94 99
http://www.metrico.lu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJS705SAAoJEHopqW0d1cQVxb8IALT7EyYFqRD8E052ZiPChd1d
aSsE5k9PJRRcA05yIQbVT81BXADKAYjo0U6qtiDiP9sOzkpm/6nXlWixH/3v7SQZ
rOT4DLIDA12IQbwjsjDZJzJTrMIPi9Ce7RCZ6qNRFiAXiFSYGokbK4D9TZC5aghP
14K+gexeRgZcwoU2gOm/qBYd34JioXfBqevBINNhuQehwdPZFx3jjaZEod6sClOO
WIRtRnbl+1vgu0LeJpSawYIXcVglrcsstvI7n/fS5pL93vONwMTMXd5rUt+2ewpP
DK92pnhSAKd4VTDnHuAi4x/MNJge7ExqA+EkC6kgdsvewwHhxwgcnOhSMwjCRJo=
=pZab
-----END PGP SIGNATURE-----
More information about the Users
mailing list