projects
/
lantea.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add more debug comments around image loading
[lantea.git]
/
js
/
map.js
diff --git
a/js/map.js
b/js/map.js
index 043da92e0ae7a3d1c110d3705b018da6630ef08d..b734113d1cec49c88f95ed76bf2bb60ac36a20a3 100644
(file)
--- a/
js/map.js
+++ b/
js/map.js
@@
-121,15
+121,19
@@
function loadPrefs(aEvent) {
document.getElementById("body").addEventListener("keydown", mapEvHandler, false);
document.getElementById("body").addEventListener("keydown", mapEvHandler, false);
+ console.log("Events added.");
document.getElementById("copyright").innerHTML =
gMapStyles[gMap.activeMap].copyright;
document.getElementById("copyright").innerHTML =
gMapStyles[gMap.activeMap].copyright;
+ console.log("Init loading tile...");
gLoadingTile = new Image();
gLoadingTile = new Image();
- gLoadingTile.src = "style/loading.png";
gLoadingTile.onload = function() {
gLoadingTile.onload = function() {
+ console.log("Loading tile loaded.");
var throwEv = new CustomEvent("prefload-done");
gAction.dispatchEvent(throwEv);
};
var throwEv = new CustomEvent("prefload-done");
gAction.dispatchEvent(throwEv);
};
+ console.log("Set loading tile...");
+ gLoadingTile.src = "style/loading.png";
}
}
else {
}
}
else {
@@
-235,7
+239,7
@@
var gMap = {
' gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);\n' +
' vTextureCoord = aTextureCoord;\n' +
'}'; },
' gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1);\n' +
' vTextureCoord = aTextureCoord;\n' +
'}'; },
- getFragShaderSource:function() {
+ getFragShaderSource:
function() {
return 'varying highp vec2 vTextureCoord;\n\n' +
'uniform sampler2D uImage;\n\n' +
'void main(void) {\n' +
return 'varying highp vec2 vTextureCoord;\n\n' +
'uniform sampler2D uImage;\n\n' +
'void main(void) {\n' +