D
D
Develm2015-10-28 11:02:26
JavaScript
Develm, 2015-10-28 11:02:26

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

1 answer(s)
A
Alexander Aksentiev, 2015-10-28
@Sanasol

Tiled map js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question