web: don't clutter up web console by default
If one wishes to add debug output, they should use overviewer.utils.debug. To see the output produced by that, set overviewerConfig.map.debug to true. Fixes #1816.
This commit is contained in:
@@ -124,7 +124,7 @@ top-level directory.
|
|||||||
|
|
||||||
dump['worlds'] = worlds
|
dump['worlds'] = worlds
|
||||||
dump['map'] = dict()
|
dump['map'] = dict()
|
||||||
dump['map']['debug'] = True
|
dump['map']['debug'] = False
|
||||||
dump['map']['cacheTag'] = str(int(time.time()))
|
dump['map']['cacheTag'] = str(int(time.time()))
|
||||||
dump['map']['north_direction'] = 'lower-left' # only temporary
|
dump['map']['north_direction'] = 'lower-left' # only temporary
|
||||||
dump['map']['controls'] = {
|
dump['map']['controls'] = {
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ overviewer.util = {
|
|||||||
this.select.appendChild(option);
|
this.select.appendChild(option);
|
||||||
},
|
},
|
||||||
onChange: function(ev) {
|
onChange: function(ev) {
|
||||||
console.log(ev.target);
|
overviewer.util.debug(ev.target);
|
||||||
console.log(ev.target.value);
|
overviewer.util.debug(ev.target.value);
|
||||||
var selected_world = ev.target.value;
|
var selected_world = ev.target.value;
|
||||||
|
|
||||||
|
|
||||||
@@ -204,8 +204,6 @@ overviewer.util = {
|
|||||||
overviewer.map.addLayer(overviewer.collections.mapTypes[selected_world][selected_layer_name]);
|
overviewer.map.addLayer(overviewer.collections.mapTypes[selected_world][selected_layer_name]);
|
||||||
},
|
},
|
||||||
onAdd: function() {
|
onAdd: function() {
|
||||||
console.log("onAdd mycontrol");
|
|
||||||
|
|
||||||
return this.container
|
return this.container
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -290,7 +288,7 @@ overviewer.util = {
|
|||||||
|
|
||||||
// reset the markers control with the markers for this layer
|
// reset the markers control with the markers for this layer
|
||||||
if (ovconf.marker_groups) {
|
if (ovconf.marker_groups) {
|
||||||
console.log("markers for", ovconf.marker_groups);
|
overviewer.util.debug("markers for", ovconf.marker_groups);
|
||||||
ovconf.markerCtrl = L.control.layers(
|
ovconf.markerCtrl = L.control.layers(
|
||||||
[],
|
[],
|
||||||
ovconf.marker_groups, {collapsed: false}).addTo(overviewer.map);
|
ovconf.marker_groups, {collapsed: false}).addTo(overviewer.map);
|
||||||
@@ -376,7 +374,7 @@ overviewer.util = {
|
|||||||
if (overviewer.collections.haveSigns == true) {
|
if (overviewer.collections.haveSigns == true) {
|
||||||
// if there are markers for this tileset, create them now
|
// if there are markers for this tileset, create them now
|
||||||
if ((typeof markers !== 'undefined') && (obj.path in markers)) {
|
if ((typeof markers !== 'undefined') && (obj.path in markers)) {
|
||||||
console.log("this tileset has markers:", obj);
|
overviewer.util.debug("this tileset has markers:", obj);
|
||||||
obj.marker_groups = {};
|
obj.marker_groups = {};
|
||||||
|
|
||||||
// For every group of markers
|
// For every group of markers
|
||||||
@@ -538,9 +536,9 @@ overviewer.util = {
|
|||||||
*
|
*
|
||||||
* @param string msg
|
* @param string msg
|
||||||
*/
|
*/
|
||||||
'debug': function(msg) {
|
'debug': function(...args) {
|
||||||
if (overviewerConfig.map.debug) {
|
if (overviewerConfig.map.debug) {
|
||||||
console.log(msg);
|
console.log(...args);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user