[OpenLayers-Commits] r11532 - sandbox/marcjansen/openlayers/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Fri Feb 25 11:48:09 EST 2011
Author: marcjansen
Date: 2011-02-25 08:48:09 -0800 (Fri, 25 Feb 2011)
New Revision: 11532
Modified:
sandbox/marcjansen/openlayers/examples/lausanne.html
Log:
mobile improvements
Modified: sandbox/marcjansen/openlayers/examples/lausanne.html
===================================================================
--- sandbox/marcjansen/openlayers/examples/lausanne.html 2011-02-25 16:44:40 UTC (rev 11531)
+++ sandbox/marcjansen/openlayers/examples/lausanne.html 2011-02-25 16:48:09 UTC (rev 11532)
@@ -3,17 +3,31 @@
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>OpenLayers Image Layer Example</title>
- <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <link rel="stylesheet" href="style.css" type="text/css" />
+ <link rel="stylesheet" href="style.mobile.css" type="text/css">
<style type="text/css">
- html, body, #map {
- margin: 0;
- width: 100%;
- height: 100%;
- }
+ html, body, #map {
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ }
+ a,
+ a:link,
+ a:visited,
+ a:hover,
+ a:active {
+ color: black
+ }
+ .olControlAttribution {
+ position: absolute;
+ font-size: 10px;
+ bottom: 0;
+ right: 0;
+ text-shadow: 1px 1px white;
+ font-family: Arial;
+ padding: 2px 4px;
+ }
+
</style>
- <script src="../lib/Firebug/firebug.js">
- </script>
<script src="../lib/OpenLayers.js">
</script>
<script type="text/javascript">
@@ -21,22 +35,33 @@
function init(){
map = new OpenLayers.Map('map', {
fractionalZoom: true,
- restrictedExtent: new OpenLayers.Bounds(0, 0, 3069, 1988)
+ restrictedExtent: new OpenLayers.Bounds(0, 0, 3069, 1988),
+ theme: null,
+ layers: [
+ new OpenLayers.Layer.Image(
+ 'Lausanne',
+ 'img/sprinters-lausanne-impr.jpg',
+ new OpenLayers.Bounds(0, 0, 3069, 1988),
+ new OpenLayers.Size(512, 331),
+ {
+ attribution: 'Sprinters at the <a href="http://wiki.osgeo.org/wiki/Lausanne_Code_Sprint_2011">OpenLayers Mobile Code Sprint</a> in Lausanne, Switzerland'
+ }
+ )
+ ],
+ controls: [
+ /*
+ new OpenLayers.Control.TouchNavigation({
+ dragPanOptions: {
+ interval: 100,
+ enableKinetic: true
+ }
+ }),
+ */
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.ZoomPanel(),
+ new OpenLayers.Control.Attribution()
+ ]
});
-
- var graphic = new OpenLayers.Layer.Image('Lausanne', 'img/sprinters-lausanne-impr.jpg', new OpenLayers.Bounds(0, 0, 3069, 1988), new OpenLayers.Size(512, 331), {});
-
- graphic.events.on({
- loadstart: function(){
- OpenLayers.Console.log("loadstart");
- },
- loadend: function(){
- OpenLayers.Console.log("loadend");
- }
- });
-
- map.addLayers([graphic]);
-
map.zoomToMaxExtent();
}
</script>
More information about the Commits
mailing list