Merge the excellent documentation work done during foss4g into trunk. Many
thanks to all the contributors who helped put this together. I'm not exactly sure of what's going to happen with this, but for now, at http://openlayers.org/dev/doc/examples.html you can see links to all the examples *with descriptions*. Hooray! git-svn-id: http://svn.openlayers.org/trunk/openlayers@5362 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>OpenLayers Google Layer Example</title>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 100%;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
background-color: red;
|
||||
@@ -21,19 +22,19 @@
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
map = new OpenLayers.Map( 'map' ,
|
||||
map = new OpenLayers.Map( 'map' ,
|
||||
{ controls: [new OpenLayers.Control.MouseDefaults()] , 'numZoomLevels':20});
|
||||
|
||||
var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} );
|
||||
|
||||
|
||||
map.addLayers([satellite]);
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic', 'transparent':true},
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic', 'transparent':true},
|
||||
{isBaseLayer: false} );
|
||||
layer.setVisibility(false);
|
||||
var twms = new OpenLayers.Layer.WMS( "World Map",
|
||||
"http://world.freemap.in/cgi-bin/mapserv?",
|
||||
var twms = new OpenLayers.Layer.WMS( "World Map",
|
||||
"http://world.freemap.in/cgi-bin/mapserv?",
|
||||
{map: '/www/freemap.in/world/map/factbooktrans.map', transparent:'true',
|
||||
layers: 'factbook', 'format':'png'}, {'reproject': true} );
|
||||
map.addLayer(twms);
|
||||
@@ -45,14 +46,14 @@
|
||||
map.addControl( new OpenLayers.Control.PanZoomBar() );
|
||||
|
||||
}
|
||||
|
||||
|
||||
function add() {
|
||||
|
||||
var url = 'http://boston.openguides.org/markers/AQUA.png';
|
||||
var sz = new OpenLayers.Size(10, 17);
|
||||
var calculateOffset = function(size) {
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h);
|
||||
};
|
||||
};
|
||||
var icon = new OpenLayers.Icon(url, sz, null, calculateOffset);
|
||||
var barcelona = new OpenLayers.LonLat(2.13134765625,
|
||||
41.37062534198901);
|
||||
@@ -67,9 +68,21 @@
|
||||
</script>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<h1>OpenLayers With Google Layer Example</h1>
|
||||
<h1 id="title">Google Layer Example</h1>
|
||||
|
||||
<div id="tags"></div>
|
||||
|
||||
<p id="shortdesc">
|
||||
Demonstrate a Google basemap used with boundary and marker overlay layers.
|
||||
</p>
|
||||
|
||||
<div id="map"></div>
|
||||
<div style="background-color:green" onclick="add()"> click to add a marker to the map</div>
|
||||
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>
|
||||
|
||||
<div style="width:512px">
|
||||
<div style="background-color:green" onclick="add()"> click to add a marker to the map</div>
|
||||
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>
|
||||
</div>
|
||||
|
||||
<div id="docs"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user