I am working on my first custom tile overlay and could use some help figuring out why I'm not seeing my custom tiles.
Here's what I've done: I have created custom tiles and verified that the tiles are correct in their extents for the zoom level and tile number. ie. my tiles show the same exact region as the google map images at each zoom level. I have verified that I can access the images on the webserver, like this: http://www.cityofprescott.net/_i/trails/bikemap_tiles/11_384_814.jpg Here's my code: function init() { map = new GMap2(document.getElementById("map_canvas")); var mt = map.getMapTypes(); var myTiles = new GTileLayer(new GCopyrightCollection(""), 10, 15); myTiles.getTileUrl = CustomGetTileUrl; function CustomGetTileUrl(a,b) { var f = "http://www.cityofprescott.net/_i/trails/bikemap_tiles/"+ b +'_'+ a.x +'_'+ a.y + '.jpg'; return f; }; var custommap = new GMapType(myTiles, new GMercatorProjection(18), "bikemap", {errorMessage:"No data available"}); map.addControl(new GLargeMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(34.5409, -112.4694), 14); map.addMapType(custommap); } Here's where I'm stuck: I am getting the Map Type selector (custommap) on the top right, but it doesn't seem like I'm ever actually getting the function CustomGetTileUrl to build the tile values and return f. I also haven't figured out a way to debug inside that function- any alerts or a GLog.write inside of that function never happen. Here's the map URL: http://www.cityofprescott.net/services/gis/coptrails/ Thanks for any help you can provide, Cat --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
