** Use an intelligent algorithm to automatically try (async) updating tiles if they have a certain age
*** If they have changed, possibly also try (async) updates of other cached zoom levels covering this area
** Clear cached tiles option
-* Find the bug that messes up the display when panning on not fully loaded tiles (web connection down)
+** Pre-cache tiles in adjecent areas and possibly zoom levels
* Show a notification when we are loading tiles or saved data
* Display length and duration of track
* Display movement speed
<html manifest="manifest.appcache">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <!-- try to counts default scaling on mobile, see
+ <!-- try to force a 1:1 scaling on mobile, see
https://developer.mozilla.org/en/Mobile/Viewport_meta_tag -->
- <meta name="viewport" content="width=device-width, height=device-height, initial-scale=.6667, maximum-scale=.6667">
+ <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1">
<title>Lantea Maps</title>
<script src="js/map.js" type="application/javascript;version=1.8"></script>
<script src="js/ui.js" type="application/javascript;version=1.8"></script>
onclick="toggleFullscreen();">
</div>
-<p id="debug" class="debugHide"></p>
+<p id="action">
+ <img id="actionimg" src="style/loading_action.png">
+ <span id="actionlabel">Loading</span>…
+</p>
<p id="copyright" class="overlayArea"></p>
<canvas id="map" width="500" height="500">
copyright: 'Map data © <a href="http://www.openstreetmap.org/">OpenStreetMap</a> and contributors (<a href="http://www.openstreetmap.org/copyright">ODbL/CC-BY-SA</a>), tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>.'},
mapquest_aerial:
{name: "MapQuest Open Aerial",
- url: "http://oatile[1-4].mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg",
+ url: "http://otile[1-4].mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg",
copyright: 'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>, portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency.'},
opengeoserver_arial:
{name: "OpenGeoServer Aerial",
for (var x = Math.floor(xMin / size); x < Math.ceil(xMax / size); x++) {
for (var y = Math.floor(yMin / size); y < Math.ceil(yMax / size); y++) { // slow script warnings on the tablet appear here!
// Only go to the drawing step if we need to draw this tile.
- if (x < tiles.left || x > tiles.right || y < tiles.top || y > tiles.bottom) {
+ if (x < tiles.left || x > tiles.right ||
+ y < tiles.top || y > tiles.bottom) {
// Round here is **CRUCIAL** otherwise the images are filtered
// and the performance sucks (more than expected).
var xoff = Math.round((x * size - xMin) / gZoomFactor);
var yoff = Math.round((y * size - yMin) / gZoomFactor);
// Draw placeholder tile unless we overdraw.
- if (!aOverdraw)
+ if (!aOverdraw &&
+ (x < tiles.left -1 || x > tiles.right + 1 ||
+ y < tiles.top -1 || y > tiles.bottom + 1))
gMapContext.drawImage(gLoadingTile, xoff, yoff);
// Initiate loading/drawing of the actual tile.
function startTracking() {
if (gGeolocation) {
+ gActionLabel.textContent = "Establishing Position";
+ gAction.style.display = "block";
gGeoWatchID = gGeolocation.watchPosition(
function(position) {
+ if (gActionLabel.textContent) {
+ gActionLabel.textContent = "";
+ gAction.style.display = "none";
+ }
// Coords spec: https://developer.mozilla.org/en/XPCOM_Interface_Reference/NsIDOMGeoPositionCoords
var tPoint = {time: position.timestamp,
coords: {latitude: position.coords.latitude,
}
function endTracking() {
+ if (gActionLabel.textContent) {
+ gActionLabel.textContent = "";
+ gAction.style.display = "none";
+ }
if (gGeoWatchID) {
gGeolocation.clearWatch(gGeoWatchID);
}
var gUIHideCountdown = 0;
var gWaitCounter = 0;
+var gAction, gActionLabel;
window.onload = function() {
+ gAction = document.getElementById("action");
+ gActionLabel = document.getElementById("actionlabel");
+
var mSel = document.getElementById("mapSelector");
for (var mapStyle in gMapStyles) {
var opt = document.createElement("option");
gMapPrefsLoaded = true;
resizeAndDraw();
+ gActionLabel.textContent = "";
+ gAction.style.display = "none";
setTracking(document.getElementById("trackCheckbox"));
}
else