From 521d45c091b79e4abec0bad051120fb1a84977c2 Mon Sep 17 00:00:00 2001 From: Schuyler Erle Date: Tue, 27 Jun 2006 04:25:23 +0000 Subject: [PATCH] Fixed up examples for 1.0 release. git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@786 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- examples/ciesin.html | 7 ++++--- examples/click.html | 7 ++++--- examples/controls.html | 7 ++++--- examples/example.html | 7 ++++--- examples/google.html | 4 ++-- examples/kamap.html | 10 ++++++---- examples/markerResize.html | 17 +++++++++-------- examples/markers.html | 6 +++--- examples/markersTextLayer.html | 6 +++--- examples/markerss.html | 6 +++--- examples/notile.html | 6 +++--- examples/popups.html | 12 +++--------- examples/tiger.html | 4 ++-- examples/ve.html | 4 ++-- examples/wfs.html | 16 +++++++--------- examples/yahoo.html | 4 ++-- 16 files changed, 61 insertions(+), 62 deletions(-) diff --git a/examples/ciesin.html b/examples/ciesin.html index 05a6824119..51bcb5f95b 100644 --- a/examples/ciesin.html +++ b/examples/ciesin.html @@ -2,8 +2,8 @@ @@ -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(); } // --> diff --git a/examples/click.html b/examples/click.html index 4ae607f93e..2492a4fef9 100644 --- a/examples/click.html +++ b/examples/click.html @@ -2,8 +2,8 @@ @@ -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, " + diff --git a/examples/controls.html b/examples/controls.html index 78f7fc9c38..af0b0e6e61 100644 --- a/examples/controls.html +++ b/examples/controls.html @@ -2,8 +2,8 @@ @@ -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(); } // --> diff --git a/examples/example.html b/examples/example.html index c94c6a9e7e..7898d521d1 100644 --- a/examples/example.html +++ b/examples/example.html @@ -2,8 +2,8 @@ @@ -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(); } // --> diff --git a/examples/google.html b/examples/google.html index 83cbf5fd9f..6e7bc237f7 100644 --- a/examples/google.html +++ b/examples/google.html @@ -3,8 +3,8 @@ @@ -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(); } // --> diff --git a/examples/markerResize.html b/examples/markerResize.html index 851ab0b38e..6d1960d32c 100644 --- a/examples/markerResize.html +++ b/examples/markerResize.html @@ -3,8 +3,8 @@ @@ -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() { diff --git a/examples/markers.html b/examples/markers.html index 6bde6bd02f..d3fc236eb6 100644 --- a/examples/markers.html +++ b/examples/markers.html @@ -3,8 +3,8 @@ @@ -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(); } // --> diff --git a/examples/markersTextLayer.html b/examples/markersTextLayer.html index 893e286330..c6a8eb5e13 100644 --- a/examples/markersTextLayer.html +++ b/examples/markersTextLayer.html @@ -3,8 +3,8 @@ @@ -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(); } // --> diff --git a/examples/markerss.html b/examples/markerss.html index 3bb4a18edb..dc4db92b64 100644 --- a/examples/markerss.html +++ b/examples/markerss.html @@ -3,8 +3,8 @@ @@ -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() { diff --git a/examples/notile.html b/examples/notile.html index 3a757bfd96..1877d28ae2 100644 --- a/examples/notile.html +++ b/examples/notile.html @@ -2,8 +2,8 @@ @@ -11,7 +11,7 @@ diff --git a/examples/yahoo.html b/examples/yahoo.html index 8f79ff8b15..98cdf4fbf6 100644 --- a/examples/yahoo.html +++ b/examples/yahoo.html @@ -3,8 +3,8 @@