mapping-component-package-jp 0.0.42 → 0.0.43
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
|
@@ -23,7 +23,9 @@ export class MapOverlayManager {
|
|
|
23
23
|
RenderBackgroundFields(locations: any[], properties: any): void;
|
|
24
24
|
RenderSAAdministrative(saAdministrativeJson: any[], selectedSAProvince: number, selectedSADM: number, selectedSALM: number, selectedSAWard: number, offsetX: number, offsetY: number, vMapWidth: number, isDashboard: boolean): void;
|
|
25
25
|
RenderSACadastral(saCadastralJson: any, offsetX: number, offsetY: number, vmWidth: number, isDashboard: boolean, fitBounds: boolean): void;
|
|
26
|
-
|
|
26
|
+
RenderGSGPRegions(gpRegionsJson: any[], gsByRegionJson: any[], selectedRegion: number, offsetX: number, offsetY: number, vMapWidth: number, isDashboard: boolean): void;
|
|
27
|
+
RenderGSProvinces(provincesJson: any[], gsByProvinceJson: any[], selectedProvince: number, offsetX: number, offsetY: number, vMapWidth: number, isDashboard: boolean): void;
|
|
28
|
+
|
|
27
29
|
// Shape Selection and Management
|
|
28
30
|
selectShape(shapeId: string | number, selectedStyle: any, unselectedStyle: any): void;
|
|
29
31
|
isShapeInLocPolygons(shapeId: string | number): boolean;
|
|
@@ -2845,7 +2845,41 @@ export class MapOverlayManager {
|
|
|
2845
2845
|
});
|
|
2846
2846
|
}
|
|
2847
2847
|
|
|
2848
|
-
function
|
|
2848
|
+
function Display_DrawGSProvinces(locationsJson, selectedProvince, offsetX, offsetY) {
|
|
2849
|
+
var polygon = null;
|
|
2850
|
+
var locations = locationsJson;
|
|
2851
|
+
var dp, paths;
|
|
2852
|
+
|
|
2853
|
+
locations.forEach(function (location) {
|
|
2854
|
+
if(location.id == selectedProvince || selectedProvince === 0) {
|
|
2855
|
+
if (location && location.poly && location.poly.length > 0) {
|
|
2856
|
+
|
|
2857
|
+
paths = [];
|
|
2858
|
+
var spolies = location.poly.split(',');
|
|
2859
|
+
spolies.forEach(function(poly) {
|
|
2860
|
+
dp = google.maps.geometry.encoding.decodePath(location.poly, 5);
|
|
2861
|
+
paths.push(dp);
|
|
2862
|
+
});
|
|
2863
|
+
|
|
2864
|
+
polygon = new google.maps.Polygon({
|
|
2865
|
+
map: map,
|
|
2866
|
+
paths: paths,
|
|
2867
|
+
strokeColor: '#000000',
|
|
2868
|
+
strokeOpacity: 1,
|
|
2869
|
+
strokeWeight: 3,
|
|
2870
|
+
fillColor: '#000000',
|
|
2871
|
+
fillOpacity: 0.3,
|
|
2872
|
+
id: location.id,
|
|
2873
|
+
content: location.name,
|
|
2874
|
+
zIndex: 10000
|
|
2875
|
+
});
|
|
2876
|
+
fpolies.push(polygon);
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
});
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
function Display_DrawGS(locationsJson, offsetX, offsetY, vMapWidth) {
|
|
2849
2883
|
|
|
2850
2884
|
var locations = locationsJson;
|
|
2851
2885
|
bounds = new google.maps.LatLngBounds();
|
|
@@ -2902,7 +2936,6 @@ export class MapOverlayManager {
|
|
|
2902
2936
|
|
|
2903
2937
|
} else if(locations.length == 1) {
|
|
2904
2938
|
|
|
2905
|
-
|
|
2906
2939
|
var boundsChangedListener = google.maps.event.addListenerOnce(map, 'bounds_changed', function () {
|
|
2907
2940
|
if(!mapPanned) {
|
|
2908
2941
|
|
|
@@ -2919,7 +2952,7 @@ export class MapOverlayManager {
|
|
|
2919
2952
|
//map.fitBounds(bounds);
|
|
2920
2953
|
}
|
|
2921
2954
|
|
|
2922
|
-
function
|
|
2955
|
+
function GSGPRegions_DrawProductionRegions(gpRegionsJson, gsJson, selectedRegion, offsetX, offsetY, vMapWidth, isDashboard) {
|
|
2923
2956
|
|
|
2924
2957
|
mapListeners_clear();
|
|
2925
2958
|
polygonListeners_clear();
|
|
@@ -2930,8 +2963,22 @@ export class MapOverlayManager {
|
|
|
2930
2963
|
Display_DrawGPRegions(gpRegionsJson, selectedRegion, offsetX, offsetY);
|
|
2931
2964
|
GPRegions_BindPolyEvents(isDashboard);
|
|
2932
2965
|
|
|
2933
|
-
|
|
2934
|
-
|
|
2966
|
+
Display_DrawGS(gsJson, offsetX, offsetY, vMapWidth);
|
|
2967
|
+
GS_BindPolyEvents(isDashboard);
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2970
|
+
function GSProvinces_DrawProvinces(provincesJson, gsJson, selectedProvince, offsetX, offsetY, vMapWidth, isDashboard) {
|
|
2971
|
+
mapListeners_clear();
|
|
2972
|
+
polygonListeners_clear();
|
|
2973
|
+
markerListeners_clear();
|
|
2974
|
+
fmarkers_clear();
|
|
2975
|
+
fPolies_clear();
|
|
2976
|
+
|
|
2977
|
+
Display_DrawGSProvinces(provincesJson, selectedProvince, offsetX, offsetY);
|
|
2978
|
+
GSProvinces_BindPolyEvents(isDashboard);
|
|
2979
|
+
|
|
2980
|
+
Display_DrawGS(gsJson, offsetX, offsetY, vMapWidth);
|
|
2981
|
+
GS_BindPolyEvents(isDashboard);
|
|
2935
2982
|
}
|
|
2936
2983
|
|
|
2937
2984
|
function GPRegions_BindPolyEvents(isDashboard) {
|
|
@@ -2962,7 +3009,35 @@ export class MapOverlayManager {
|
|
|
2962
3009
|
});
|
|
2963
3010
|
}
|
|
2964
3011
|
|
|
2965
|
-
function
|
|
3012
|
+
function GSProvinces_BindPolyEvents(isDashboard) {
|
|
3013
|
+
deleteTooltip();
|
|
3014
|
+
|
|
3015
|
+
fpolies.forEach(function (poly) {
|
|
3016
|
+
polygonListeners.push(google.maps.event.addListener(poly, 'mouseover', function (event) {
|
|
3017
|
+
poly.setOptions({strokeColor: '#f1a81e', strokeWeight: 3, zIndex: 10012});
|
|
3018
|
+
deleteTooltip();
|
|
3019
|
+
injectTooltip(event, poly.content);
|
|
3020
|
+
}));
|
|
3021
|
+
polygonListeners.push(google.maps.event.addListener(poly, 'mousemove', moveTooltip));
|
|
3022
|
+
polygonListeners.push(google.maps.event.addListener(poly, 'mouseout', function(event) {
|
|
3023
|
+
poly.setOptions({strokeColor: '#000000', strokeWeight: 3, zIndex: 10002});
|
|
3024
|
+
deleteTooltip();
|
|
3025
|
+
}));
|
|
3026
|
+
if(!isDashboard) {
|
|
3027
|
+
polygonListeners.push(google.maps.event.addListener(poly, 'click', function (event) {
|
|
3028
|
+
deleteTooltip();
|
|
3029
|
+
eventHandlers["CSProvincePolyOnClick"]({
|
|
3030
|
+
type: 'SUCCESS',
|
|
3031
|
+
message: 'CSProvincePoly clicked',
|
|
3032
|
+
code: 200,
|
|
3033
|
+
data: poly.id,
|
|
3034
|
+
});
|
|
3035
|
+
}));
|
|
3036
|
+
}
|
|
3037
|
+
});
|
|
3038
|
+
}
|
|
3039
|
+
|
|
3040
|
+
function GS_BindPolyEvents(isDashboard) {
|
|
2966
3041
|
|
|
2967
3042
|
deleteTooltip();
|
|
2968
3043
|
|
|
@@ -2986,7 +3061,7 @@ export class MapOverlayManager {
|
|
|
2986
3061
|
type: 'SUCCESS',
|
|
2987
3062
|
message: 'GSMarker clicked',
|
|
2988
3063
|
code: 200,
|
|
2989
|
-
data: ttc[0],
|
|
3064
|
+
data: parseInt(ttc[0]),
|
|
2990
3065
|
});
|
|
2991
3066
|
});
|
|
2992
3067
|
markerListeners.push(mclickListener);
|
|
@@ -3009,9 +3084,13 @@ export class MapOverlayManager {
|
|
|
3009
3084
|
});
|
|
3010
3085
|
}
|
|
3011
3086
|
|
|
3012
|
-
_this.
|
|
3013
|
-
|
|
3087
|
+
_this.RenderGSGPRegions = function(gpRegionsJson, gsJson, selectedRegion, offsetX, offsetY, vMapWidth, isDashboard) {
|
|
3088
|
+
GSGPRegions_DrawProductionRegions(gpRegionsJson, gsJson, selectedRegion, offsetX, offsetY, vMapWidth, isDashboard);
|
|
3014
3089
|
}
|
|
3090
|
+
|
|
3091
|
+
_this.RenderGSProvinces = function(provincesJson, gsJson, selectedProvince, offsetX, offsetY, vMapWidth, isDashboard) {
|
|
3092
|
+
GSProvinces_DrawProvinces(provincesJson, gsJson, selectedProvince, offsetX, offsetY, vMapWidth, isDashboard);
|
|
3093
|
+
}
|
|
3015
3094
|
|
|
3016
3095
|
_this.NDVI_AddOverlay_DEA = function (locationJson, ndviTileURL, validGMTiles, eosLocationCropperRefId, eosViewId, spinnerURL, spinnerLat, spinnerLon, paletteId, colorMapTypeIdValue, isFullView, onComplete) {
|
|
3017
3096
|
|