API do Google Maps V3 - blocos personalizados
Atualmente, estou trabalhando na API do Google Maps V3 sobreaqui
Se você aumentar o zoom entre 21 e 23, haverá uma sobreposição de imagem no mapa. A imagem leva muito tempo para carregar e eu decidi dividi-la em blocos diferentes para facilitar o carregamento. Estou usando o cortador de azulejo automático para cortar a imagem em ladrilhos.
Eu tenho problemas com o script;
var OrgX = 31551; // the Google Maps X value of the tile at the top left corner of your Photoshop document
var OrgY = 50899; // the Google Maps Y value of the tile at the top left corner of your Photoshop document
Primeira pergunta Como você encontra os valores de X e Y no documento do photoshop?
Digamos que se eu conseguir resolver a primeira pergunta.
Segunda questão O código abaixo está correto para exibir os blocos, dependendo do nível de zoom? Ou estou faltando algum código?
var BuildingsLayer = new google.maps.ImageMapType({
getTileUrl: function(coord, zoom) {
return "http://search.missouristate.edu/map/tilesets/baselayer/" + zoom + "_" + coord.x + "_" + coord.y + ".png";
},
tileSize: new google.maps.Size(256, 256),
isPng: true
});
map.overlayMapTypes.push(BuildingsLayer);