Changeset 1204
- Timestamp:
- 08/14/06 17:17:36 (2 years ago)
- Files:
-
- trunk/openlayers/examples/markerss.html (deleted)
- trunk/openlayers/examples/wms.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/examples/wms.html
r806 r1204 23 23 map.addLayer(layer); 24 24 25 markers = new OpenLayers.Layer.Markers("markers");26 map.addLayer(markers);27 28 25 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); 29 26 map.addControl( new OpenLayers.Control.LayerSwitcher() ); 30 27 } 31 28 32 function add() {33 var icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',new OpenLayers.Size(10,17));34 marker = new OpenLayers.Marker(new OpenLayers.LonLat(2, 41), icon);35 markers.addMarker(marker);36 }37 38 39 function remove() {40 markers.removeMarker(marker);41 }42 43 44 29 // --> 45 30 </script> … … 47 32 <body onload="init()"> 48 33 <div id="map"></div> 49 <div style="background-color:green" onclick="add()"> click to add the marker to the map</div>50 <div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>51 34 </body> 52 35 </html>
