mapping-component-package-jp 0.0.47 → 0.0.49
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
|
@@ -63,6 +63,11 @@ export class MapOverlayManager {
|
|
|
63
63
|
NDVI_RemoveOverlay(): void;
|
|
64
64
|
NDVI_DrawLocation(locationJson: any[], offsetX: number, offsetY: number, vMapWidth: number, showTooltip: boolean): void;
|
|
65
65
|
|
|
66
|
+
//Other tiles
|
|
67
|
+
NLC_AddOverlay(tileURL: string, offsetX: number, offsetY: number): void;
|
|
68
|
+
NLC_RemoveOverlay(): void;
|
|
69
|
+
|
|
70
|
+
|
|
66
71
|
// Cleanup Methods
|
|
67
72
|
destroy(): void;
|
|
68
73
|
map_clear(): void;
|
|
@@ -3037,7 +3037,7 @@ export class MapOverlayManager {
|
|
|
3037
3037
|
paths = [];
|
|
3038
3038
|
var spolies = location.poly.split(',');
|
|
3039
3039
|
spolies.forEach(function(poly) {
|
|
3040
|
-
dp = google.maps.geometry.encoding.decodePath(
|
|
3040
|
+
dp = google.maps.geometry.encoding.decodePath(poly, 5);
|
|
3041
3041
|
paths.push(dp);
|
|
3042
3042
|
});
|
|
3043
3043
|
|
|
@@ -3724,5 +3724,69 @@ export class MapOverlayManager {
|
|
|
3724
3724
|
});
|
|
3725
3725
|
mapListeners.push(zoomChangedListener);
|
|
3726
3726
|
}
|
|
3727
|
+
|
|
3728
|
+
|
|
3729
|
+
_this.NLC_AddOverlay = function (tileURL, offsetX, offsetY) {
|
|
3730
|
+
|
|
3731
|
+
bounds = map.getBounds();
|
|
3732
|
+
offsetCenter(bounds.getCenter(), offsetX, offsetY);
|
|
3733
|
+
|
|
3734
|
+
if (map.getZoom() > 14) {
|
|
3735
|
+
|
|
3736
|
+
//console.log('zoom > 14');
|
|
3737
|
+
|
|
3738
|
+
var zoomOnAddOverlayChangedListener = google.maps.event.addListenerOnce(map, 'zoom_changed', function () {
|
|
3739
|
+
var vdiMapType = new google.maps.ImageMapType({
|
|
3740
|
+
getTileUrl: function (coord, zoom) {
|
|
3741
|
+
return [tileURL.replace(/{z}/,zoom).replace(/{x}/,coord.x).replace(/{y}/,coord.y)].join('');
|
|
3742
|
+
},
|
|
3743
|
+
tileSize: new google.maps.Size(256, 256),
|
|
3744
|
+
minZoom: 5,
|
|
3745
|
+
maxZoom: 14
|
|
3746
|
+
});
|
|
3747
|
+
map.overlayMapTypes.push(vdiMapType);
|
|
3748
|
+
});
|
|
3749
|
+
mapListeners.push(zoomOnAddOverlayChangedListener);
|
|
3750
|
+
|
|
3751
|
+
map.setZoom(14);
|
|
3752
|
+
|
|
3753
|
+
} else if (map.getZoom() < 5) {
|
|
3754
|
+
|
|
3755
|
+
//console.log('zoom < 5');
|
|
3756
|
+
|
|
3757
|
+
var zoomOnAddOverlayChangedListener = google.maps.event.addListenerOnce(map, 'zoom_changed', function () {
|
|
3758
|
+
var vdiMapType = new google.maps.ImageMapType({
|
|
3759
|
+
getTileUrl: function (coord, zoom) {
|
|
3760
|
+
return [tileURL.replace(/{z}/,zoom).replace(/{x}/,coord.x).replace(/{y}/,coord.y)].join('');
|
|
3761
|
+
},
|
|
3762
|
+
tileSize: new google.maps.Size(256, 256),
|
|
3763
|
+
minZoom: 5,
|
|
3764
|
+
maxZoom: 14
|
|
3765
|
+
});
|
|
3766
|
+
map.overlayMapTypes.push(vdiMapType);
|
|
3767
|
+
});
|
|
3768
|
+
mapListeners.push(zoomOnAddOverlayChangedListener);
|
|
3769
|
+
|
|
3770
|
+
map.setZoom(5);
|
|
3771
|
+
|
|
3772
|
+
} else {
|
|
3773
|
+
|
|
3774
|
+
var vdiMapType = new google.maps.ImageMapType({
|
|
3775
|
+
getTileUrl: function (coord, zoom) {
|
|
3776
|
+
return [tileURL.replace(/{z}/,zoom).replace(/{x}/,coord.x).replace(/{y}/,coord.y)].join('');
|
|
3777
|
+
},
|
|
3778
|
+
tileSize: new google.maps.Size(256, 256),
|
|
3779
|
+
minZoom: 5,
|
|
3780
|
+
maxZoom: 14
|
|
3781
|
+
});
|
|
3782
|
+
map.overlayMapTypes.push(vdiMapType);
|
|
3783
|
+
}
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
_this.NLC_RemoveOverlay = function () {
|
|
3787
|
+
map.overlayMapTypes.clear();
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3790
|
+
|
|
3727
3791
|
}
|
|
3728
3792
|
}
|