Skip to content

Commit

Permalink
Fixed up examples for 1.0 release.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@786 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
  • Loading branch information
schuyler committed Jun 27, 2006
1 parent ea959e5 commit 521d45c
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 62 deletions.
7 changes: 4 additions & 3 deletions examples/ciesin.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
Expand All @@ -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>
Expand Down
7 changes: 4 additions & 3 deletions examples/click.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
Expand All @@ -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, " +
Expand Down
7 changes: 4 additions & 3 deletions examples/controls.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
Expand Down Expand Up @@ -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>
Expand Down
7 changes: 4 additions & 3 deletions examples/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
Expand Down Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions examples/google.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
10 changes: 6 additions & 4 deletions examples/kamap.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
Expand All @@ -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>
Expand Down
17 changes: 9 additions & 8 deletions examples/markerResize.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions examples/markers.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions examples/markersTextLayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions examples/markerss.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions examples/notile.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<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'} );
Expand Down
12 changes: 3 additions & 9 deletions examples/popups.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions examples/tiger.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
width: 512px;
height: 512px;
border: 1px solid black;
}
</style>
Expand Down
4 changes: 2 additions & 2 deletions examples/ve.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
16 changes: 7 additions & 9 deletions examples/wfs.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions examples/yahoo.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 521d45c

Please sign in to comment.