- var copyright = I18n.t('javascripts.map.copyright', {copyright_url: '/copyright'});
- var donate = I18n.t('javascripts.map.donate_link_text', {donate_url: 'http://donate.openstreetmap.org'});
+ var copyright = I18n.t("javascripts.map.copyright", { copyright_url: "/copyright" });
+ var donate = I18n.t("javascripts.map.donate_link_text", { donate_url: "https://donate.openstreetmap.org" });
+ var terms = I18n.t("javascripts.map.terms", { terms_url: "https://wiki.osmfoundation.org/wiki/Terms_of_Use" });
- for (var i in this._layers) { // TODO: map.eachLayer
- var layer = this._layers[i];
- if (layer.options && layer.options.keyid) return layer.options.keyid;
- }
+ var baseLayerId;
+ this.eachLayer(function (layer) {
+ if (layer.options && layer.options.keyid) baseLayerId = layer.options.keyid;
+ });
+ return baseLayerId;
query = querystring.stringify(params),
hash = OSM.formatHash(this);
query = querystring.stringify(params),
hash = OSM.formatHash(this);
var zoom = this.getZoom(),
latLng = marker && this.hasLayer(marker) ? marker.getLatLng().wrap() : this.getCenter().wrap(),
str = window.location.hostname.match(/^www\.openstreetmap\.org/i) ?
var zoom = this.getZoom(),
latLng = marker && this.hasLayer(marker) ? marker.getLatLng().wrap() : this.getCenter().wrap(),
str = window.location.hostname.match(/^www\.openstreetmap\.org/i) ?
- window.location.protocol + '//osm.org/go/' :
- window.location.protocol + '//' + window.location.hostname + '/go/',
+ window.location.protocol + "//osm.org/go/" :
+ window.location.protocol + "//" + window.location.hostname + "/go/",
char_array = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_~",
x = Math.round((latLng.lng + 180.0) * ((1 << 30) / 90.0)),
y = Math.round((latLng.lat + 90.0) * ((1 << 30) / 45.0)),
char_array = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_~",
x = Math.round((latLng.lng + 180.0) * ((1 << 30) / 90.0)),
y = Math.round((latLng.lat + 90.0) * ((1 << 30) / 45.0)),
// done in two parts. each of the parts c1/c2 has 30 bits of the total in it
// and drops the last 4 bits of the full 64 bit Morton code.
c1 = interlace(x >>> 17, y >>> 17), c2 = interlace((x >>> 2) & 0x7fff, (y >>> 2) & 0x7fff),
// done in two parts. each of the parts c1/c2 has 30 bits of the total in it
// and drops the last 4 bits of the full 64 bit Morton code.
c1 = interlace(x >>> 17, y >>> 17), c2 = interlace((x >>> 2) & 0x7fff, (y >>> 2) & 0x7fff),
- for (var i = 0; i < Math.ceil((zoom + 8) / 3.0) && i < 5; ++i) {
- digit = (c1 >> (24 - 6 * i)) & 0x3f;
+ for (i = 0; i < Math.ceil((zoom + 8) / 3.0) && i < 5; ++i) {
+ digit = (c1 >> (24 - (6 * i))) & 0x3f;
this._object = null;
if (this._objectLoader) this._objectLoader.abort();
if (this._objectLayer) this.removeLayer(this._objectLayer);
},
this._object = null;
if (this._objectLoader) this._objectLoader.abort();
if (this._objectLayer) this.removeLayer(this._objectLayer);
},
if (state.center) this.setView(state.center, state.zoom, options);
if (state.layers) this.updateLayers(state.layers);
},
if (state.center) this.setView(state.center, state.zoom, options);
if (state.layers) this.updateLayers(state.layers);
},
if (overlaid && !$("#content").hasClass("overlay-sidebar")) {
$("#content").addClass("overlay-sidebar");
if (overlaid && !$("#content").hasClass("overlay-sidebar")) {
$("#content").addClass("overlay-sidebar");
- this.invalidateSize({pan: false})
- .panBy([-350, 0], {animate: false});
+ this.invalidateSize({ pan: false })
+ .panBy([-350, 0], { animate: false });
L.extend(L.Icon.Default.prototype, {
_oldGetIconUrl: L.Icon.Default.prototype._getIconUrl,
L.extend(L.Icon.Default.prototype, {
_oldGetIconUrl: L.Icon.Default.prototype._getIconUrl,