Hello everyone.
First of all, thanks for reading; and please forgive my bad English
level.
I'm using a custom map, with some custom tile layers that I have on a
public server; creating this custom map this way.
copyRight : new GCopyrightCollection('Callejero').addCopyright(new
GCopyright(1, new GLatLngBounds(new GLatLng(-90, -180), new GLatLng
(90, 180)), 0," 2008 Digio S.L."));
_customGetTileUrl = function(a,b){
var f;
switch(b) {
case 13 : if (a.x == 4069 && a.y == 3159) f =
_imageRoute+a.x+"_"+a.y
+"_"+b+".jpg";
else f =
G_NORMAL_MAP.getTileLayers()[0].getTileUrl(a,b);
break;
case 14 : if (a.x == 8138 && a.y == 6319) f =
_imageRoute+a.x+"_"+a.y
+"_"+b+".jpg";
else f =
G_NORMAL_MAP.getTileLayers()[0].getTileUrl(a,b);
break;
case 15 : if ( ((a.x >= 16276) && (a.x <= 16277)) && ((a.y >=
12636)
&& (a.y <= 12638)) ) f = _imageRoute+a.x+"_"+a.y+"_"+b+".jpg";
else f =
G_NORMAL_MAP.getTileLayers()[0].getTileUrl(a,b);
break;
case 16 : if ( ((a.x >= 32552) && (a.x <= 32555)) && ((a.y >=
25272)
&& (a.y <= 25276)) ) f = _imageRoute+a.x+"_"+a.y+"_"+b+".jpg";
else f =
G_NORMAL_MAP.getTileLayers()[0].getTileUrl(a,b);
break;
case 17 : if ((a.x >= 65106 && a.x <= 65112) && (a.y >= 50545
&& a.y
<= 50553)) f = _imageRoute+a.x+"_"+a.y+"_"+b+".jpg";
else f =
G_NORMAL_MAP.getTileLayers()[0].getTileUrl(a,b);
break;
default: f = G_NORMAL_MAP.getTileLayers()[0].getTileUrl(a,b);
}
return f;
}
var tileLayers = [new GTileLayer(this.copyRight , 1, 17)];
init_layers = function(map){
tileLayers[0].getTileUrl =_customGetTileUrl;
var custommap = new GMapType(tileLayers, new GMercatorProjection(18),
"Callejero", {errorMessage:"No data available"});
map.addMapType(custommap);
map.setMapType(custommap);
}
Then I can see my custom map.
When I add this line:
map.addOverlay(new GLayer("com.panoramio.all"));
I can see the GLayer correctly but, when I click on a picture I get
this error:
d is undefined
http://maps.gstatic.com/intl/es_ALL/mapfiles/176c/maps2.api/main.js
Line 584
I have read something about this tiles and the GMercatorProjection
( X ), everyone talks about the X must be +17, becouse the mercator
uses zoom 17 to use the latlngtopixel method. But I got the X equal to
18.
If I remove the custom map the tiles start to work ok.
Can anyone help me with this ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---