Removed mobile-scroll example, as it's not an example but a page to reproduce the bugs

This commit is contained in:
Gregers Gram Rygg
2012-11-02 15:38:33 +01:00
parent a2a391d3b5
commit 9ac758ae86
2 changed files with 0 additions and 95 deletions

View File

@@ -1,55 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>OpenLayers Mobile</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<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">
<link rel="stylesheet" href="../theme/default/style.mobile.css" type="text/css">
<script src="../lib/OpenLayers.js?mobile"></script>
<script src="mobile-scroll.js"></script>
<style>
html, body {
margin : 0;
padding : 0;
height : 100%;
width : 100%;
}
@media only screen and (max-width: 600px) {
html, body {
height : 117%;
}
}
#map {
width : 100%;
position : absolute;
height : 70%;
top : 500px;
}
.olControlAttribution {
position : absolute;
font-size : 10px;
bottom : 0 !important;
right : 0 !important;
background : rgba(0,0,0,0.1);
font-family : Arial;
padding : 2px 4px;
border-radius : 5px 0 0 0;
}
</style>
</head>
<body>
<h1 id="title">Scroll down to the map</h1>
<div id="tags">
mobile
</div>
<p id="shortdesc">
A basic full-screen map for mobile devices.
</p>
<div id="map"></div>
<script>
init();
</script>
</body>
</html>

View File

@@ -1,40 +0,0 @@
// initialize map when page ready
var map;
var init = function () {
// create map
console.log("Initialize MAP!!!");
map = new OpenLayers.Map({
div: "map",
theme: null,
controls: [
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.TouchNavigation({
dragPanOptions: {
enableKinetic: true
},
defaultClick: addPin
}),
new OpenLayers.Control.Zoom()
],
layers: [
new OpenLayers.Layer.OSM("OpenStreetMap", null, {
transitionEffect: 'resize'
})
],
center: new OpenLayers.LonLat(742000, 5861000),
zoom: 3
});
var markers = new OpenLayers.Layer.Markers( "Markers" );
map.addLayer(markers);
var size = new OpenLayers.Size(21,25);
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
var icon = new OpenLayers.Icon('http://www.openlayers.org/dev/img/marker.png',size,offset);
function addPin(e) {
var pointMapProj = map.getLonLatFromViewPortPx(e.xy);
markers.addMarker(new OpenLayers.Marker(pointMapProj,icon));
}
};