Skip to content

Commit 521d45c

Browse files
committed
Fixed up examples for 1.0 release.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@786 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
1 parent ea959e5 commit 521d45c

16 files changed

+61
-62
lines changed

examples/ciesin.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<head>
33
<style type="text/css">
44
#map {
5-
width: 800px;
6-
height: 475px;
5+
width: 512px;
6+
height: 512px;
77
border: 1px solid black;
88
}
99
</style>
@@ -27,7 +27,8 @@
2727

2828
map.addLayers([ol_wms, jpl_wms, cie_wms]);
2929
map.addControl(new OpenLayers.Control.LayerSwitcher());
30-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
30+
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
31+
map.zoomToFullExtent();
3132
}
3233
// -->
3334
</script>

examples/click.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<head>
33
<style type="text/css">
44
#map {
5-
width: 800px;
6-
height: 475px;
5+
width: 512px;
6+
height: 512px;
77
border: 1px solid black;
88
}
99
</style>
@@ -24,7 +24,8 @@
2424

2525
map.addLayers([ol_wms, jpl_wms]);
2626
map.addControl(new OpenLayers.Control.LayerSwitcher());
27-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
27+
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
28+
map.zoomToFullExtent();
2829
map.events.register("click", map, function(e) {
2930
var lonlat = map.getLonLatFromViewPortPx(e.xy);
3031
alert("You clicked near " + lonlat.lat + " N, " +

examples/controls.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<head>
33
<style type="text/css">
44
#map {
5-
width: 800px;
6-
height: 475px;
5+
width: 512px;
6+
height: 512px;
77
border: 1px solid black;
88
}
99
</style>
@@ -34,7 +34,8 @@
3434
map.addControl(new OpenLayers.Control.PanZoomBar());
3535
map.addControl(new OpenLayers.Control.MouseToolbar());
3636
map.addControl(new OpenLayers.Control.LayerSwitcher());
37-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
37+
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
38+
map.zoomToFullExtent();
3839
}
3940
// -->
4041
</script>

examples/example.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<head>
33
<style type="text/css">
44
#map {
5-
width: 800px;
6-
height: 475px;
5+
width: 512px;
6+
height: 512px;
77
border: 1px solid black;
88
}
99
</style>
@@ -31,7 +31,8 @@
3131

3232
map.addLayers([ol_wms, jpl_wms, dm_wms]);
3333
map.addControl(new OpenLayers.Control.LayerSwitcher());
34-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
34+
// map.setCenter(new OpenLayers.LonLat(0, 0), 0);
35+
map.zoomToFullExtent();
3536
}
3637
// -->
3738
</script>

examples/google.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
44
<style type="text/css">
55
#map {
6-
width: 800px;
7-
height: 475px;
6+
width: 512px;
7+
height: 512px;
88
border: 1px solid black;
99
background-color: red;
1010
}

examples/kamap.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<head>
33
<style type="text/css">
44
#map {
5-
width: 800px;
6-
height: 475px;
5+
width: 512px;
6+
height: 512px;
77
border: 1px solid black;
88
}
99
</style>
@@ -16,12 +16,14 @@
1616
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
1717
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
1818
var ka_wms = new OpenLayers.Layer.KaMap( "KaMap",
19-
"http://www.h2guide.com/my-ka-map/h2tile.php?" , { map: 'h2guide', g: 'background' }, new OpenLayers.LonLat(0,0));
19+
"http://www.h2guide.com/my-ka-map/h2tile.php?",
20+
{ map: 'h2guide', g: 'background' },
21+
new OpenLayers.LonLat(0,0));
2022

2123

2224
map.addLayers([ol_wms, ka_wms]);
2325
map.addControl(new OpenLayers.Control.LayerSwitcher());
24-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
26+
map.zoomToFullExtent();
2527
}
2628
// -->
2729
</script>

examples/markerResize.html

+9-8
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
44
<style type="text/css">
55
#map {
6-
width: 800px;
7-
height: 475px;
6+
width: 512px;
7+
height: 512px;
88
border: 1px solid black;
99
}
1010
</style>
@@ -25,14 +25,15 @@
2525

2626
size = new OpenLayers.Size(50,50);
2727
calculateOffset = function(size) {
28-
return new OpenLayers.Pixel(-(size.w/2), -size.h);
29-
};
30-
icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',size,null, calculateOffset);
31-
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(-180,90),
32-
icon));
28+
return new OpenLayers.Pixel(-(size.w/2), -size.h); };
29+
icon = new OpenLayers.Icon(
30+
'http://boston.openguides.org/markers/AQUA.png',
31+
size, null, calculateOffset);
32+
markers.addMarker(
33+
new OpenLayers.Marker(new OpenLayers.LonLat(-180,90), icon));
3334

34-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
3535
map.addControl(new OpenLayers.Control.LayerSwitcher());
36+
map.zoomToFullExtent();
3637
}
3738

3839
function resize() {

examples/markers.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
44
<style type="text/css">
55
#map {
6-
width: 800px;
7-
height: 475px;
6+
width: 512px;
7+
height: 512px;
88
border: 1px solid black;
99
}
1010
</style>
@@ -31,8 +31,8 @@
3131
marker = new OpenLayers.Marker(new OpenLayers.LonLat(90,10),icon);
3232
marker.events.register('mousedown', marker, function(evt) { alert(this.icon.url); Event.stop(evt); });
3333
markers.addMarker(marker);
34-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
3534
map.addControl(new OpenLayers.Control.LayerSwitcher());
35+
map.zoomToFullExtent();
3636
}
3737
// -->
3838
</script>

examples/markersTextLayer.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
44
<style type="text/css">
55
#map {
6-
width: 800px;
7-
height: 475px;
6+
width: 512px;
7+
height: 512px;
88
border: 1px solid black;
99
}
1010
</style>
@@ -23,8 +23,8 @@
2323
var newl = new OpenLayers.Layer.Text( "text", "./textfile.txt" );
2424
map.addLayer(newl);
2525

26-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
2726
map.addControl(new OpenLayers.Control.LayerSwitcher());
27+
map.zoomToFullExtent();
2828
}
2929
// -->
3030
</script>

examples/markerss.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
44
<style type="text/css">
55
#map {
6-
width: 800px;
7-
height: 475px;
6+
width: 512px;
7+
height: 512px;
88
border: 1px solid black;
99
}
1010
</style>
@@ -34,8 +34,8 @@
3434
markers = new OpenLayers.Layer.Markers( "Markers" );
3535
map.addLayer(markers);
3636

37-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
3837
map.addControl(new OpenLayers.Control.LayerSwitcher());
38+
map.zoomToFullExtent();
3939
}
4040

4141
function changer() {

examples/notile.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
<head>
33
<style type="text/css">
44
#map {
5-
width: 800px;
6-
height: 475px;
5+
width: 512px;
6+
height: 512px;
77
border: 1px solid black;
88
}
99
</style>
1010
<script src="../lib/OpenLayers.js"></script>
1111
<script type="text/javascript">
1212
<!--
1313
function init(){
14-
var map = new OpenLayers.Map('map');
14+
var map = new OpenLayers.Map('map', {maxResolution: 'auto'});
1515

1616
var ol_wms = new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS",
1717
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );

examples/popups.html

+3-9
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
44
<style type="text/css">
55
#map {
6-
width: 800px;
7-
height: 475px;
6+
width: 512px;
7+
height: 512px;
88
border: 1px solid black;
99
}
1010
</style>
@@ -20,14 +20,8 @@
2020
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
2121
map.addLayer(layer);
2222

23-
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS2",
24-
"http://octo.metacarta.com/cgi-bin/mapserv",
25-
{map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'} );
26-
27-
map.addLayer(layer);
28-
29-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
3023
map.addControl(new OpenLayers.Control.LayerSwitcher());
24+
map.zoomToFullExtent();
3125
}
3226

3327
function changer() {

examples/tiger.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<head>
33
<style type="text/css">
44
#map {
5-
width: 800px;
6-
height: 475px;
5+
width: 512px;
6+
height: 512px;
77
border: 1px solid black;
88
}
99
</style>

examples/ve.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
44
<style type="text/css">
55
#map {
6-
width: 800px;
7-
height: 475px;
6+
width: 512px;
7+
height: 512px;
88
border: 1px solid black;
99
}
1010
</style>

examples/wfs.html

+7-9
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
44
<style type="text/css">
55
#map {
6-
width: 800px;
7-
height: 475px;
6+
width: 512px;
7+
height: 512px;
88
border: 1px solid black;
99
}
1010
</style>
@@ -14,20 +14,18 @@
1414
var map, layer;
1515

1616
function init(){
17-
OpenLayers.ProxyHost = '/dev/examples/proxy.cgi?url=';
1817
map = new OpenLayers.Map('map');
1918
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
2019
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
2120
map.addLayer(layer);
2221

23-
layer = new OpenLayers.Layer.WFS( "OpenLayers WFS",
24-
"http://labs.metacarta.com/search/WFS?",
25-
{q: 'dolphins', maxfeatures: 10} );
26-
22+
layer = new OpenLayers.Layer.WFS( "Owl Survey",
23+
"http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?",
24+
{typename: "OWLS", maxfeatures: 10},
25+
OpenLayers.Feature.WFS );
2726
map.addLayer(layer);
28-
29-
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
3027
map.addControl(new OpenLayers.Control.LayerSwitcher());
28+
map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
3129
}
3230
// -->
3331
</script>

examples/yahoo.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
44
<style type="text/css">
55
#map {
6-
width: 800px;
7-
height: 475px;
6+
width: 512px;
7+
height: 512px;
88
border: 1px solid black;
99
}
1010
</style>

0 commit comments

Comments
 (0)