Answer the question
In order to leave comments, you need to log in
How in api map google v3 not to show tiles that fall under mine?
Didn't think of anything better than intercepting getTile completely.
Here is a section of the code of my example converted from code.google.com/intl/ru/apis/maps/documentation/javascript/maptypes.html (section "Base Map Types").
CoordMapType.prototype.getTile = function(coord, zoom, ownerDocument) { var div = ownerDocument.createElement('DIV'); div.style.width = this.tileSize.width + 'px'; div.style.height = this.tileSize.height + 'px'; if(*check for my site or not mine*){ div.innerHTML = "<img src='http://site.ru/"+zoom+"-tile-"+coord.x+"-"+coord.y+".png'>"; } else { div.innerHTML = "<img src='http://mt1.google.com/vt/[email protected]&hl=en&x=" + coord.x + "&y=" + coord.y + "&z=" + zoom + "&s=Gali'>"; } return div; };
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