1 <html xmlns="http://www.w3.org/1999/xhtml">
3 <title>MultiMap</title>
4 <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
5 <link rel="stylesheet" href="style.css" type="text/css" />
6 <style type="text/css">
10 border: 1px solid black;
15 <script type="text/javascript" src="http://clients.multimap.com/API/maps/1.1/metacarta_04"></script>
18 <script src="../lib/OpenLayers.js"></script>
19 <script type="text/javascript">
23 var map, mmlayer, layer;
26 map = new OpenLayers.Map( 'map' ,
27 {controls:[new OpenLayers.Control.MouseDefaults()]});
29 mmlayer = new OpenLayers.Layer.MultiMap( "MultiMap");
30 map.addLayer(mmlayer);
32 markers = new OpenLayers.Layer.Markers("markers");
33 map.addLayer(markers);
35 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
36 map.addControl( new OpenLayers.Control.LayerSwitcher() );
37 map.addControl( new OpenLayers.Control.PanZoomBar() );
42 marker = new OpenLayers.Marker(new OpenLayers.LonLat(2, 41));
43 markers.addMarker(marker);
47 markers.removeMarker(marker);
51 <body onload="init()">
52 <h1 id="title">MultiMap Example</h1>
54 An example of using the Layer.MultiMap class.
56 <div id="map" class="smallmap"></div>
57 <div style="background-color:green" onclick="add()"> click to add the marker to the map</div>
58 <div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>