0

Fixed the debug overlay to properly use config.tileSize instead of a hard-coded 384, also explicitly set which map controls will be displayed so that the map type controls allowing the user to switch back to the default google maps don't appear.

This commit is contained in:
Gregory Short
2010-09-12 14:12:49 -05:00
parent 70805f3a67
commit 768a82cc13

View File

@@ -79,12 +79,15 @@
var mapOptions = { var mapOptions = {
zoom: config.defaultZoom, zoom: config.defaultZoom,
center: new google.maps.LatLng(-45, 90), center: new google.maps.LatLng(-45, 90),
navigationControl: true,
scaleControl: true,
mapTypeControl: false,
mapTypeId: 'mcmap' mapTypeId: 'mcmap'
}; };
map = new google.maps.Map(document.getElementById("mcmap"), mapOptions); map = new google.maps.Map(document.getElementById("mcmap"), mapOptions);
if(config.debug) { if(config.debug) {
map.overlayMapTypes.insertAt(0, new CoordMapType(new google.maps.Size(384, 384))); map.overlayMapTypes.insertAt(0, new CoordMapType(new google.maps.Size(config.tileSize, config.tileSize)));
} }
// Now attach the coordinate map type to the map's registry // Now attach the coordinate map type to the map's registry