more demo work
git-svn-id: http://svn.openlayers.org/trunk/openlayers@549 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -22,6 +22,12 @@
|
||||
|
||||
map.addLayer(layer);
|
||||
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS2",
|
||||
"http://octo.metacarta.com/cgi-bin/mapserv",
|
||||
{map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'} );
|
||||
|
||||
map.addLayer(layer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
}
|
||||
@@ -103,6 +109,11 @@
|
||||
markers.removeMarker(marker);
|
||||
}
|
||||
|
||||
function removelayer() {
|
||||
layer.destroy();
|
||||
// map.removeLayer(markers);
|
||||
}
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
@@ -113,5 +124,8 @@
|
||||
<div style="background-color:green" onclick="addMarker()"> click to add a Marker with an AnchoredBubble popup</div>
|
||||
<div style="background-color:blue" onclick="changer()"> click to modify popup's attributes</div>
|
||||
<div style="background-color:red" onclick="remove()"> click to remove the popup from map</div>
|
||||
<div style="background-color:grey" onclick="removelayer()"> click to remove the markers layer</div>
|
||||
<div style="background-color:orange" onclick="alert(marker.onScreen())"> marker.onscreen()?</div>
|
||||
<div style="background-color:yellow" onclick="destroy()"> click to destroy the popup from map</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user