Skip to content

Commit b8b86e6

Browse files
prushforprushfor
authored andcommitted
Remove console spam. Change typeof this._map === "undefined" to !this._map which works better for reasons beyond me.
1 parent 055a47a commit b8b86e6

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

web-map.html

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@
190190
},
191191
attached: function() {
192192
this.async( function () {
193-
console.log(this.localName + '#' + this.id + ' was attached');
194193

195194
// the dimension attributes win, if they're there. A map does not
196195
// have an intrinsic size, unlike an image or video, and so must
@@ -219,7 +218,7 @@
219218
}
220219

221220
// create the Leaflet map if this is the first time attached is called
222-
if (typeof this._map === "undefined") {
221+
if (!this._map) {
223222
this._map = L.map(this.$.map, {
224223
center: new L.LatLng(this.lat, this.lon),
225224
projection: this.projection,
@@ -258,17 +257,6 @@
258257
this.poster.style.display = 'none';
259258
}
260259
}
261-
// log map dimensions. If things go wrong with setup, this may be useful
262-
console.log("map center: "+this._map.getCenter());
263-
var west = this._map.getBounds().getWest(),
264-
south = this._map.getBounds().getSouth(),
265-
east = this._map.getBounds().getEast(),
266-
north = this._map.getBounds().getNorth();
267-
268-
if (west === east || south === north) {
269-
console.log('ERROR: BAD EXTENT');
270-
}
271-
console.log("map bounds bbox=" + this._map.getBounds().toBBoxString());
272260
this._setUpEvents();
273261
}
274262

0 commit comments

Comments
 (0)