Fixed up examples for 1.0 release.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@786 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -27,7 +27,8 @@
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms, cie_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToFullExtent();
|
||||
map.events.register("click", map, function(e) {
|
||||
var lonlat = map.getLonLatFromViewPortPx(e.xy);
|
||||
alert("You clicked near " + lonlat.lat + " N, " +
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -34,7 +34,8 @@
|
||||
map.addControl(new OpenLayers.Control.PanZoomBar());
|
||||
map.addControl(new OpenLayers.Control.MouseToolbar());
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
map.addLayers([ol_wms, jpl_wms, dm_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -16,12 +16,14 @@
|
||||
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
var ka_wms = new OpenLayers.Layer.KaMap( "KaMap",
|
||||
"http://www.h2guide.com/my-ka-map/h2tile.php?" , { map: 'h2guide', g: 'background' }, new OpenLayers.LonLat(0,0));
|
||||
"http://www.h2guide.com/my-ka-map/h2tile.php?",
|
||||
{ map: 'h2guide', g: 'background' },
|
||||
new OpenLayers.LonLat(0,0));
|
||||
|
||||
|
||||
map.addLayers([ol_wms, ka_wms]);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -25,14 +25,15 @@
|
||||
|
||||
size = new OpenLayers.Size(50,50);
|
||||
calculateOffset = function(size) {
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h);
|
||||
};
|
||||
icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',size,null, calculateOffset);
|
||||
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(-180,90),
|
||||
icon));
|
||||
return new OpenLayers.Pixel(-(size.w/2), -size.h); };
|
||||
icon = new OpenLayers.Icon(
|
||||
'http://boston.openguides.org/markers/AQUA.png',
|
||||
size, null, calculateOffset);
|
||||
markers.addMarker(
|
||||
new OpenLayers.Marker(new OpenLayers.LonLat(-180,90), icon));
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
|
||||
function resize() {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -31,8 +31,8 @@
|
||||
marker = new OpenLayers.Marker(new OpenLayers.LonLat(90,10),icon);
|
||||
marker.events.register('mousedown', marker, function(evt) { alert(this.icon.url); Event.stop(evt); });
|
||||
markers.addMarker(marker);
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -23,8 +23,8 @@
|
||||
var newl = new OpenLayers.Layer.Text( "text", "./textfile.txt" );
|
||||
map.addLayer(newl);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -34,8 +34,8 @@
|
||||
markers = new OpenLayers.Layer.Markers( "Markers" );
|
||||
map.addLayer(markers);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
|
||||
function changer() {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -11,7 +11,7 @@
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function init(){
|
||||
var map = new OpenLayers.Map('map');
|
||||
var map = new OpenLayers.Map('map', {maxResolution: 'auto'});
|
||||
|
||||
var ol_wms = new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -20,14 +20,8 @@
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
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());
|
||||
map.zoomToFullExtent();
|
||||
}
|
||||
|
||||
function changer() {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<head>
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
@@ -14,20 +14,18 @@
|
||||
var map, layer;
|
||||
|
||||
function init(){
|
||||
OpenLayers.ProxyHost = '/dev/examples/proxy.cgi?url=';
|
||||
map = new OpenLayers.Map('map');
|
||||
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
||||
map.addLayer(layer);
|
||||
|
||||
layer = new OpenLayers.Layer.WFS( "OpenLayers WFS",
|
||||
"http://labs.metacarta.com/search/WFS?",
|
||||
{q: 'dolphins', maxfeatures: 10} );
|
||||
|
||||
layer = new OpenLayers.Layer.WFS( "Owl Survey",
|
||||
"http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?",
|
||||
{typename: "OWLS", maxfeatures: 10},
|
||||
OpenLayers.Feature.WFS );
|
||||
map.addLayer(layer);
|
||||
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||
map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
||||
<style type="text/css">
|
||||
#map {
|
||||
width: 800px;
|
||||
height: 475px;
|
||||
width: 512px;
|
||||
height: 512px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user