if (layerParam.indexOf(this.baseLayers[i].options.code) >= 0) {
this.addLayer(this.baseLayers[i]);
layersAdded = layersAdded + this.baseLayers[i].options.code;
- } else if (i == 0 && layersAdded == "") {
+ } else if (i === 0 && layersAdded === "") {
this.addLayer(this.baseLayers[i]);
} else {
this.removeLayer(this.baseLayers[i]);
return true;
} else if (object.type === "relation") {
for (var i = 0; i < relations.length; i++)
- if (relations[i].members.indexOf(node) != -1)
+ if (relations[i].members.indexOf(node) !== -1)
return true;
} else {
return false;
center: this.getCenter().wrap(),
zoom: this.getZoom(),
layers: this.getLayersCode()
- }
+ };
},
setState: function(state, options) {
}
});
-function getUserIcon(url) {
+OSM.getUserIcon = function (url) {
return L.icon({
iconUrl: url || OSM.MARKER_RED,
iconSize: [25, 41],
shadowUrl: OSM.MARKER_SHADOW,
shadowSize: [41, 41]
});
-}
+};