mapping-component-package-jp 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -535,6 +535,13 @@ export class MapOverlayManager {
|
|
|
535
535
|
mapListeners = [];
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
_this.mapListeners_clear = function() {
|
|
539
|
+
mapListeners.forEach(function (mapListener) {
|
|
540
|
+
google.maps.event.removeListener(mapListener);
|
|
541
|
+
});
|
|
542
|
+
mapListeners = [];
|
|
543
|
+
}
|
|
544
|
+
|
|
538
545
|
function polyLabels_clear() {
|
|
539
546
|
polyLabels.forEach(function (pl) {
|
|
540
547
|
pl.setMap(null);
|
|
@@ -2101,6 +2108,7 @@ export class MapOverlayManager {
|
|
|
2101
2108
|
var polyPath = null;
|
|
2102
2109
|
var path = null;
|
|
2103
2110
|
fpolies = [];
|
|
2111
|
+
mapListeners = [];
|
|
2104
2112
|
var rbounds = new google.maps.LatLngBounds();
|
|
2105
2113
|
|
|
2106
2114
|
locations.forEach(function (location) {
|
|
@@ -2154,7 +2162,7 @@ export class MapOverlayManager {
|
|
|
2154
2162
|
}
|
|
2155
2163
|
});
|
|
2156
2164
|
|
|
2157
|
-
google.maps.event.addListenerOnce(map, "bounds_changed", function() {
|
|
2165
|
+
var rboundsChangedListener = google.maps.event.addListenerOnce(map, "bounds_changed", function() {
|
|
2158
2166
|
eventHandlers["RegionBoundsChanged"]({
|
|
2159
2167
|
type: 'SUCCESS',
|
|
2160
2168
|
message: 'Region bounds changed',
|
|
@@ -2162,7 +2170,7 @@ export class MapOverlayManager {
|
|
|
2162
2170
|
data: null
|
|
2163
2171
|
});
|
|
2164
2172
|
});
|
|
2165
|
-
|
|
2173
|
+
mapListeners.push(rboundsChangedListener);
|
|
2166
2174
|
|
|
2167
2175
|
map.fitBounds(rbounds);
|
|
2168
2176
|
regions_BindPolyEvents();
|