mapping-component-package-jp 0.2.30 → 0.4.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapping-component-package-jp",
3
- "version": "0.2.30",
3
+ "version": "0.4.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -42,8 +42,8 @@ export class MapOverlayManager {
42
42
  RenderSAAdministrative(saAdministrativeJson: any[], selectedSAProvince: number, selectedSADM: number, selectedSALM: number, selectedSAWard: number, offsetX: number, offsetY: number, vMapWidth: number, isDashboard: boolean): void;
43
43
  RenderSACadastral(saCadastralJson: any, offsetX: number, offsetY: number, vmWidth: number, isDashboard: boolean, fitBounds: boolean): void;
44
44
  RenderSADelineatedFields(saDelineatedFieldsJson: any, offsetX: number, offsetY: number, vmWidth: number, isDashboard: boolean, fitBounds: boolean): void;
45
- RenderGSGPRegions(gpRegionsJson: any[], gsByRegionJson: any[], selectedRegion: number, offsetX: number, offsetY: number, vMapWidth: number, isDashboard: boolean): void;
46
- RenderGSProvinces(provincesJson: any[], gsByProvinceJson: any[], selectedProvince: number, offsetX: number, offsetY: number, vMapWidth: number, isDashboard: boolean): void;
45
+ RenderGSGPRegions(gpRegionsJson: any[], gsByRegionJson: any[], selectedRegion: number, offsetX: number, offsetY: number, vMapWidth: number, isDashboard: boolean, countryIso2: string): void;
46
+ RenderGSProvinces(provincesJson: any[], gsByProvinceJson: any[], selectedProvince: number, offsetX: number, offsetY: number, vMapWidth: number, isDashboard: boolean, countryIso2: string): void;
47
47
  RenderGSWithinRadius(gsJson: any[], fieldLat: number, fieldLng: number, offsetX: number, offsetY: number, radius: number): void;
48
48
 
49
49
  // Shape Selection and Management
@@ -3822,7 +3822,7 @@ export class MapOverlayManager {
3822
3822
  }
3823
3823
 
3824
3824
 
3825
- function GSGPRegions_DrawProductionRegions(gpRegionsJson, gsJson, selectedRegion, offsetX, offsetY, vMapWidth, isDashboard) {
3825
+ function GSGPRegions_DrawProductionRegions(gpRegionsJson, gsJson, selectedRegion, offsetX, offsetY, vMapWidth, isDashboard, countryIso2) {
3826
3826
 
3827
3827
  mapListeners_clear();
3828
3828
  polygonListeners_clear();
@@ -3834,10 +3834,10 @@ export class MapOverlayManager {
3834
3834
  GPRegions_BindPolyEvents(isDashboard);
3835
3835
 
3836
3836
  Display_DrawGS(gsJson, offsetX, offsetY, vMapWidth);
3837
- GS_BindPolyEvents(isDashboard);
3837
+ GS_BindPolyEvents(isDashboard, countryIso2);
3838
3838
  }
3839
3839
 
3840
- function GSProvinces_DrawProvinces(provincesJson, gsJson, selectedProvince, offsetX, offsetY, vMapWidth, isDashboard) {
3840
+ function GSProvinces_DrawProvinces(provincesJson, gsJson, selectedProvince, offsetX, offsetY, vMapWidth, isDashboard, countryIso2) {
3841
3841
  mapListeners_clear();
3842
3842
  polygonListeners_clear();
3843
3843
  markerListeners_clear();
@@ -3848,7 +3848,7 @@ export class MapOverlayManager {
3848
3848
  GSProvinces_BindPolyEvents(isDashboard);
3849
3849
 
3850
3850
  Display_DrawGS(gsJson, offsetX, offsetY, vMapWidth);
3851
- GS_BindPolyEvents(isDashboard);
3851
+ GS_BindPolyEvents(isDashboard, countryIso2);
3852
3852
  }
3853
3853
 
3854
3854
  function GS_DrawGSWithinRadius(gsJson, fieldLat, fieldLng, offsetX, offsetY, radius) {
@@ -3919,24 +3919,29 @@ export class MapOverlayManager {
3919
3919
  });
3920
3920
  }
3921
3921
 
3922
- function GS_BindPolyEvents(isDashboard) {
3922
+ function GS_BindPolyEvents(isDashboard, countryIso2) {
3923
3923
 
3924
3924
  deleteTooltip();
3925
3925
 
3926
3926
  fmarkers.forEach(function (marker) {
3927
3927
  var ttc = marker.id.split('|');
3928
+
3928
3929
  var ttdata = '<b>'+ttc[1]+'</b><br>';
3929
- ttdata += 'Company: '+ttc[2]+' ('+ttc[3]+')<br>';
3930
+ if(countryIso2 == 'ZA') {
3931
+ ttdata += 'Company: '+ttc[2]+' ('+ttc[3]+')<br>';
3932
+ } else {
3933
+ ttdata += 'Company: '+ttc[2]+'<br>';
3934
+ }
3930
3935
  ttdata += 'Type: '+ttc[4]+'<br>';
3931
3936
  if(parseInt(ttc[5]) > 0) {
3932
3937
  ttdata += 'Capacity: '+ttc[5]+'t<br>';
3933
3938
  } else {
3934
3939
  ttdata += 'Capacity: n/a<br>';
3935
3940
  }
3936
- if(parseInt(ttc[6]) > 0) {
3941
+ if(parseInt(ttc[6]) > 0 && countryIso2 == 'ZA') {
3937
3942
  ttdata += 'Sagis Code: '+ttc[6];
3938
3943
  } else {
3939
- ttdata += 'Sagis Code: n/a';
3944
+ ttdata += 'Sagis Code: n/a';
3940
3945
  }
3941
3946
  var mclickListener = marker.addListener('click', function (event) {
3942
3947
  eventHandlers["GSMarkerOnClick"]({
@@ -3995,12 +4000,12 @@ export class MapOverlayManager {
3995
4000
  });
3996
4001
  }
3997
4002
 
3998
- _this.RenderGSGPRegions = function(gpRegionsJson, gsJson, selectedRegion, offsetX, offsetY, vMapWidth, isDashboard) {
3999
- GSGPRegions_DrawProductionRegions(gpRegionsJson, gsJson, selectedRegion, offsetX, offsetY, vMapWidth, isDashboard);
4003
+ _this.RenderGSGPRegions = function(gpRegionsJson, gsJson, selectedRegion, offsetX, offsetY, vMapWidth, isDashboard, countryIso2) {
4004
+ GSGPRegions_DrawProductionRegions(gpRegionsJson, gsJson, selectedRegion, offsetX, offsetY, vMapWidth, isDashboard, countryIso2);
4000
4005
  }
4001
4006
 
4002
- _this.RenderGSProvinces = function(provincesJson, gsJson, selectedProvince, offsetX, offsetY, vMapWidth, isDashboard) {
4003
- GSProvinces_DrawProvinces(provincesJson, gsJson, selectedProvince, offsetX, offsetY, vMapWidth, isDashboard);
4007
+ _this.RenderGSProvinces = function(provincesJson, gsJson, selectedProvince, offsetX, offsetY, vMapWidth, isDashboard, countryIso2) {
4008
+ GSProvinces_DrawProvinces(provincesJson, gsJson, selectedProvince, offsetX, offsetY, vMapWidth, isDashboard, countryIso2);
4004
4009
  }
4005
4010
 
4006
4011
  _this.RenderGSWithinRadius = function(gsJson, fieldLat, fieldLng, offsetX, offsetY, radius) {