svn merge sandbox/vector-2.4/@2307 sandbox/vector-2.4/@HEAD trunk/openlayers/ git-svn-id: http://svn.openlayers.org/trunk/openlayers@2803 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
91 lines
2.9 KiB
HTML
91 lines
2.9 KiB
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<style type="text/css">
|
|
#map {
|
|
width: 800px;
|
|
height: 475px;
|
|
border: 1px solid black;
|
|
}
|
|
.olControlPanel div {
|
|
display:block;
|
|
width: 24px;
|
|
height: 24px;
|
|
margin: 5px;
|
|
background-color:red;
|
|
}
|
|
|
|
.olControlPanel .olControlMouseDefaultsItemActive {
|
|
background-color: orange;
|
|
background-image: url("../../oterral/ButtonBar/vector/img/PanEnable.png");
|
|
}
|
|
.olControlPanel .olControlMouseDefaultsItemInactive {
|
|
background-color: orange;
|
|
background-image: url("../../oterral/ButtonBar/vector/img/PanDisable.png");
|
|
}
|
|
.olControlPanel .olControlDrawFeatureItemActive {
|
|
width: 22px;
|
|
height: 22px;
|
|
background-image: url("../../oterral/ButtonBar/vector/img/EditLineEnable.png");
|
|
}
|
|
.olControlPanel .olControlDrawFeatureItemInactive {
|
|
width: 22px;
|
|
height: 22px;
|
|
background-image: url("../../oterral/ButtonBar/vector/img/EditLineDisable.png");
|
|
}
|
|
.olControlPanel .olControlZoomBoxItemInactive {
|
|
width: 22px;
|
|
height: 22px;
|
|
background-color: blue;
|
|
}
|
|
.olControlPanel .olControlZoomBoxItemActive {
|
|
width: 22px;
|
|
height: 22px;
|
|
background-color: orange;
|
|
}
|
|
.olControlPanel .olControlZoomToMaxExtentItemInactive {
|
|
width: 18px;
|
|
height: 18px;
|
|
background-image: url("../img/zoom-world-mini.png");
|
|
}
|
|
|
|
</style>
|
|
<script src="../lib/OpenLayers.js"></script>
|
|
<script src="../lib/Firebug/debug.js"></script>
|
|
<script type="text/javascript">
|
|
<!--
|
|
var lon = 5;
|
|
var lat = 40;
|
|
var zoom = 5;
|
|
var map, layer;
|
|
|
|
function init(){
|
|
map = new OpenLayers.Map( 'map', { controls: [] } );
|
|
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
|
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
|
map.addLayer(layer);
|
|
|
|
vlayer = new OpenLayers.Layer.Vector( "Editable" );
|
|
map.addLayer(vlayer);
|
|
|
|
|
|
zb = new OpenLayers.Control.ZoomBox();
|
|
panel = new OpenLayers.Control.Panel({defaultControl: zb});
|
|
panel.addControls([
|
|
new OpenLayers.Control.MouseDefaults(),
|
|
zb,
|
|
new OpenLayers.Control.DrawFeature(vlayer, OpenLayers.Handler.Path),
|
|
new OpenLayers.Control.ZoomToMaxExtent()
|
|
]);
|
|
map.addControl(panel);
|
|
|
|
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
|
|
}
|
|
// -->
|
|
</script>
|
|
</head>
|
|
<body onload="init()">
|
|
<div id="panel"></div>
|
|
<div id="map"></div>
|
|
</body>
|
|
</html>
|