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:
@@ -79,12 +79,15 @@
|
||||
var mapOptions = {
|
||||
zoom: config.defaultZoom,
|
||||
center: new google.maps.LatLng(-45, 90),
|
||||
navigationControl: true,
|
||||
scaleControl: true,
|
||||
mapTypeControl: false,
|
||||
mapTypeId: 'mcmap'
|
||||
};
|
||||
map = new google.maps.Map(document.getElementById("mcmap"), mapOptions);
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user