Answer the question
In order to leave comments, you need to log in
How is image loading implemented in Google Maps?
Prompt or give a link to the material, see examples of implementation. Namely, when you move the map and you can see how the tablets are loaded, I would like to do the same.
Who will have options? Implementation via Canvas.
var array = [];
for (var a = 1; a < 9; a++) {
for (var i = 1; i < 6; i++) {
var img = new Image();
img.src="max/section"+a+"/"+i+".jpg";
array[i] = img;
}
var canvas = document.getElementById('canvas');
var context2D = canvas.getContext('2d');
for (var i = 1; i < array.length; i++) {
array[i].onload = function(n){
context2D.drawImage(array[n],(i-1)*1348,(a-1)*1112,1348,1112);
}(i);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question