diff --git a/docs/changelog.md b/docs/changelog.md index 584eb651..77fe4c29 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -72,7 +72,8 @@ COMMIT; - allow to clone also markers - only list https ready tilerlayers when page is in https (#567) - allow to use an unicode character as Marker symbol (#527) - +- add `{rank}` as dynamic feature property (to be used in popup or icon symbol) +- add an explicit button to attach a owner to an anonyous map (#568) ## 0.8.0 diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 27f3aeed..21da48d6 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -292,7 +292,9 @@ L.U.Map.include({ }, initDatalayers: function () { - var toload = 0, datalayer, seen = 0, self = this; + var toload = this.options.datalayers.length, + datalayer, seen = this.options.datalayers.length, + self = this; var loaded = function () { self.datalayersLoaded = true; self.fire('datalayersloaded'); @@ -302,8 +304,6 @@ L.U.Map.include({ if (toload === 0) loaded(); }; for (var j = 0; j < this.options.datalayers.length; j++) { - toload++; - seen++; datalayer = this.createDataLayer(this.options.datalayers[j]); if (datalayer.displayedOnLoad()) datalayer.onceLoaded(decrementToLoad); else decrementToLoad();