diff --git a/CHANGES.md b/CHANGES.md index f9ef67085..b31f38021 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ **Bug fixes** * Show POIs on dive detail page +* Fix POIs and Steps not displayed on sidebar detail page 2.21.1 / 2019-09-11 =================== diff --git a/src/app/map/services.js b/src/app/map/services.js index aa7286e22..260516125 100644 --- a/src/app/map/services.js +++ b/src/app/map/services.js @@ -1051,8 +1051,13 @@ function mapService($rootScope, $q, $state, $resource, $translate, $filter, util }); $q.all(promiseArray).finally(function () { - self._clustersLayer.addLayer(self._treksMarkersLayer); - self._clustersLayer.addLayer(self._touristicsMarkersLayer); + if (self._treksMarkersLayer !== null && typeof self._treksMarkersLayer !== 'undefined') { + self._clustersLayer.addLayer(self._treksMarkersLayer); + } + + if (self._touristicsMarkersLayer !== null && typeof self._touristicsMarkersLayer !== 'undefined') { + self._clustersLayer.addLayer(self._touristicsMarkersLayer); + } self.map.invalidateSize(); @@ -1090,8 +1095,6 @@ function mapService($rootScope, $q, $state, $resource, $translate, $filter, util self.loadingMarkers = true; - this.clearAllLayers(); - if (result.geometry.type !== "Point" && result.geometry.type !== "MultiPoint") { this.createElevation(result); currentLayer = self._treksgeoJsonLayer; @@ -1129,7 +1132,7 @@ function mapService($rootScope, $q, $state, $resource, $translate, $filter, util { self.updateBounds(self._clustersLayer); }, - 200 + 500 ); } }