ajax - Help me understand how google maps show images? -


With the Firebugs Net tab I zoomed in and out in Google Map and I got a request to make it for PGG images.

Okay with this, I understood that we can request images using Ajax. but wait ? I always request html, jsox, txt and xml image ........ Is this weird for me? Can anyone expand on this?

Besides, I would like to know that when the text is downloaded, we add it to some DOM elements and it is shown. How can recovered images from Ajax be accessed?

Any help or indicators will be very helpful :)

GMaps XMLHttpRequests images Does not have to get. Instead of a normal & lt; Img / & gt; element that is injected through javascript

Then they can use the "Onload" and "Onner" incidents to detect if the image was correctly filled or not .

They repeatedly try to retrieve a download of the image. It is obtained by setting the timer and once the image's SRT property is finished resetting it.

  var tile = document.createElement ('img'); Var url = 'http: //sometilehost/X.Y.Z.png'; Var downloadTimeout = 10000; // Try again in 10 seconds / Tile successfully downloaded tile.onload = function (e) {window.clearTimeout (tile.downloadTimer); Warning ('tile download'); }; // tile could not be downloaded 404, 503 ... tile Panic = function (e) {window.clearTimeout (tile.download timer); Warning ('tile not downloaded'); }; // This avoiding time will not download in the tile if the fire will. Download timer = window.setTimeout (function () {tile src = url; // resume download}, downloadTimeout); Tile src = url;  

Comments