mapping-component-package-jp 0.0.19 → 0.0.20
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
|
@@ -21,6 +21,7 @@ export class MapOverlayManager {
|
|
|
21
21
|
RenderRegionFarms(locationsJson: any, icon: any, fitBounds: boolean): void;
|
|
22
22
|
RenderRegions(regionLocations: any[], properties: any, farmLocations: any[], icon: any): void;
|
|
23
23
|
RenderBackgroundFields(locations: any[], properties: any): void;
|
|
24
|
+
RenderSAAdministrative = function (saAdministrativeJson: any[], selectedSAProvince: number, selectedSADM: number, selectedSALM: number, selectedSAWard: number, offsetX: number, offsetY: number, vMapWidth: number, isDashboard: boolean);
|
|
24
25
|
|
|
25
26
|
// Shape Selection and Management
|
|
26
27
|
selectShape(shapeId: string | number, selectedStyle: any, unselectedStyle: any): void;
|
|
@@ -2383,6 +2383,91 @@ export class MapOverlayManager {
|
|
|
2383
2383
|
return true;
|
|
2384
2384
|
};
|
|
2385
2385
|
|
|
2386
|
+
function SAAdministrative_DrawSAAdministrative(saAdministrativeJson, selectedSAProvince, selectedSADM, selectedSALM, selectedSAWard, offsetX, offsetY, vMapWidth, isDashboard) {
|
|
2387
|
+
//console.log('SAAdministrative_DrawSAAdministrative');
|
|
2388
|
+
//console.log(saAdministrativeJson);
|
|
2389
|
+
|
|
2390
|
+
mapListeners_clear();
|
|
2391
|
+
polygonListeners_clear();
|
|
2392
|
+
markerListeners_clear();
|
|
2393
|
+
fmarkers_clear();
|
|
2394
|
+
fPolies_clear();
|
|
2395
|
+
|
|
2396
|
+
Display_SAAdministrative(saAdministrativeJson, selectedSAProvince, selectedSADM, selectedSALM, selectedSAWard, offsetX, offsetY, vMapWidth, isDashboard);
|
|
2397
|
+
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
function Display_SAAdministrative(saAdministrativeJson, selectedSAProvince, selectedSADM, selectedSALM, selectedSAWard, offsetX, offsetY, vmWidth, isDashboard) {
|
|
2401
|
+
//console.log('Display_SAAdministrative');
|
|
2402
|
+
//console.log(saAdministrativeJson);
|
|
2403
|
+
|
|
2404
|
+
locations = JSON.parse(saAdministrativeJson, true);
|
|
2405
|
+
|
|
2406
|
+
var polygon = null;
|
|
2407
|
+
var path = null;
|
|
2408
|
+
var spolies, paths;
|
|
2409
|
+
bounds = new google.maps.LatLngBounds();
|
|
2410
|
+
|
|
2411
|
+
locations.forEach(function(v) {
|
|
2412
|
+
|
|
2413
|
+
spolies = v.poly.split(',');
|
|
2414
|
+
paths = [];
|
|
2415
|
+
spolies.forEach(function(p) {
|
|
2416
|
+
var sp = polyline.decode(p);
|
|
2417
|
+
path = [];
|
|
2418
|
+
sp.forEach(function(c) {
|
|
2419
|
+
path.push(new google.maps.LatLng(parseFloat(c[0]),parseFloat(c[1])));
|
|
2420
|
+
bounds.extend(new google.maps.LatLng(parseFloat(c[0]),parseFloat(c[1])));
|
|
2421
|
+
});
|
|
2422
|
+
paths.push(path);
|
|
2423
|
+
});
|
|
2424
|
+
|
|
2425
|
+
var pcontent = v.name;
|
|
2426
|
+
if(v.type == 'Ward') {
|
|
2427
|
+
pcontent = 'Ward '+v.name;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
polygon = new google.maps.Polygon({
|
|
2431
|
+
paths: paths,
|
|
2432
|
+
strokeColor: '#9ACD32',
|
|
2433
|
+
strokeOpacity: 1,
|
|
2434
|
+
strokeWeight: 3,
|
|
2435
|
+
fillColor: '#ffffff',
|
|
2436
|
+
fillOpacity: 0.3,
|
|
2437
|
+
zIndex: 10000,
|
|
2438
|
+
id: v.id,
|
|
2439
|
+
content: pcontent,
|
|
2440
|
+
type: v.type,
|
|
2441
|
+
map: map
|
|
2442
|
+
});
|
|
2443
|
+
fpolies.push(polygon);
|
|
2444
|
+
});
|
|
2445
|
+
/*
|
|
2446
|
+
if(selectedSAProvince === 0 && selectedSADM === 0 && selectedSALM === 0 && selectedSAWard === 0) {
|
|
2447
|
+
SAProvinces_BindPolyEvents(isDashboard);
|
|
2448
|
+
} else if(selectedSAProvince !== 0 && selectedSADM === 0 && selectedSALM === 0 && selectedSAWard === 0) {
|
|
2449
|
+
SADMs_BindPolyEvents(isDashboard);
|
|
2450
|
+
} else if(selectedSAProvince !== 0 && selectedSADM !== 0 && selectedSALM === 0 && selectedSAWard === 0) {
|
|
2451
|
+
SALMs_BindPolyEvents(isDashboard);
|
|
2452
|
+
} else if(selectedSAProvince !== 0 && selectedSADM !== 0 && selectedSALM !== 0 && selectedSAWard === 0) {
|
|
2453
|
+
SAWards_BindPolyEvents(isDashboard);
|
|
2454
|
+
} else if(selectedSAProvince !== 0 && selectedSADM !== 0 && selectedSALM !== 0 && selectedSAWard !== 0) {
|
|
2455
|
+
SAWards_BindPolyEvents(isDashboard);
|
|
2456
|
+
}
|
|
2457
|
+
*/
|
|
2458
|
+
var boundsChangedListener = google.maps.event.addListenerOnce(map, 'bounds_changed', function () {
|
|
2459
|
+
offsetCenter(map.getCenter(), offsetX, offsetY);
|
|
2460
|
+
});
|
|
2461
|
+
mapListeners.push(boundsChangedListener);
|
|
2462
|
+
|
|
2463
|
+
map.fitBounds(bounds);
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2466
|
+
_this.RenderSAAdministrative = function (saAdministrativeJson, selectedSAProvince, selectedSADM, selectedSALM, selectedSAWard, offsetX, offsetY, vMapWidth, isDashboard) {
|
|
2467
|
+
SAAdministrative_DrawSAAdministrative(saAdministrativeJson, selectedSAProvince, selectedSADM, selectedSALM, selectedSAWard, offsetX, offsetY, vMapWidth, isDashboard);
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
|
|
2386
2471
|
_this.NDVI_AddOverlay_DEA = function (locationJson, ndviTileURL, validGMTiles, eosLocationCropperRefId, eosViewId, spinnerURL, spinnerLat, spinnerLon, paletteId, colorMapTypeIdValue, isFullView, onComplete) {
|
|
2387
2472
|
|
|
2388
2473
|
//console.log('_this.NDVI_AddOverlay_DEA');
|