Change the sundials example to also hae a google layer.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8252 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<title>OpenLayers: Sundials on a Map</title>
|
<title>OpenLayers: Sundials on a Spherical Mercator Map</title>
|
||||||
|
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
|
||||||
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
|
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="../theme/default/framedCloud.css" type="text/css" />
|
<link rel="stylesheet" href="../theme/default/framedCloud.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="style.css" type="text/css" />
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
map.addLayer(mapnik);
|
map.addLayer(mapnik);
|
||||||
|
map.addLayer(new OpenLayers.Layer.Google("Google",{sphericalMercator:true}));
|
||||||
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/sundials.kml",
|
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/sundials.kml",
|
||||||
{
|
{
|
||||||
format: OpenLayers.Format.KML,
|
format: OpenLayers.Format.KML,
|
||||||
@@ -56,6 +58,7 @@
|
|||||||
map.addControl(selectControl);
|
map.addControl(selectControl);
|
||||||
selectControl.activate();
|
selectControl.activate();
|
||||||
map.zoomToExtent(new OpenLayers.Bounds(68.774414,11.381836,123.662109,34.628906).transform(map.displayProjection, map.projection));
|
map.zoomToExtent(new OpenLayers.Bounds(68.774414,11.381836,123.662109,34.628906).transform(map.displayProjection, map.projection));
|
||||||
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||||
}
|
}
|
||||||
function onPopupClose(evt) {
|
function onPopupClose(evt) {
|
||||||
selectControl.unselect(selectedFeature);
|
selectControl.unselect(selectedFeature);
|
||||||
@@ -92,12 +95,12 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="init()">
|
<body onload="init()">
|
||||||
<h1 id="title">KML Layer Example</h1>
|
<h1 id="title">OSM + Google Maps + KML Reprojection</h1>
|
||||||
|
|
||||||
<div id="tags"></div>
|
<div id="tags"></div>
|
||||||
|
|
||||||
<p id="shortdesc">
|
<p id="shortdesc">
|
||||||
Demonstrates loading and displaying a KML file on top of OpenStreetMap (OSM) data.
|
Demonstrates loading and displaying a KML file on top of OpenStreetMap (OSM) and Google Maps data. Loads data from a KML file of sundials.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div id="map" class="smallmap"></div>
|
<div id="map" class="smallmap"></div>
|
||||||
Reference in New Issue
Block a user