mapping-component-package-jp 0.0.31 → 0.0.33

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.0.31",
3
+ "version": "0.0.33",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -2491,8 +2491,8 @@ export class MapOverlayManager {
2491
2491
  console.log('SACadastral_DrawSACadastral before adding map listeners');
2492
2492
 
2493
2493
  var mdeListener = google.maps.event.addListener(map, 'dragend', function() {
2494
- if(map.getZoom() >= 12 && map.getZoom() <= 17) {
2495
- console.log('SACadastral, map on dragend, zoom >= 12 and zoom <= 17');
2494
+ if(map.getZoom() >= 13 && map.getZoom() <= 17) {
2495
+ console.log('SACadastral, map on dragend, zoom >= 13 and zoom <= 17');
2496
2496
  eventHandlers["ReloadCadastralData"]({
2497
2497
  type: 'SUCCESS',
2498
2498
  message: 'Reload cadastral data on dragend',
@@ -2501,12 +2501,18 @@ export class MapOverlayManager {
2501
2501
  });
2502
2502
 
2503
2503
  } else {
2504
- console.log('SACadastral, map on dragend, zoom < 12 or zoom > 17');
2504
+ console.log('SACadastral, map on dragend, zoom < 13 or zoom > 17');
2505
2505
  mapListeners_clear();
2506
2506
  fPolies_clear();
2507
+ if(map.getZoom() < 13) {
2508
+ map.setZoom(13);
2509
+ }
2510
+ if(map.getZoom() > 17) {
2511
+ map.setZoom(17);
2512
+ }
2507
2513
  eventHandlers["ReloadCadastralData"]({
2508
2514
  type: 'SUCCESS',
2509
- message: 'Reload cadastral data on dragend',
2515
+ message: 'Reload cadastral data on dragend, zoom outside range',
2510
2516
  code: 200,
2511
2517
  data: null
2512
2518
  });
@@ -2515,8 +2521,8 @@ export class MapOverlayManager {
2515
2521
  mapListeners.push(mdeListener);
2516
2522
 
2517
2523
  var mzcListener = google.maps.event.addListener(map, 'zoom_changed', function() {
2518
- if(map.getZoom() >= 12 && map.getZoom() <= 17) {
2519
- console.log('SACadastral, map on zoom changed, zoom >= 12 and zoom <= 17');
2524
+ if(map.getZoom() >= 13 && map.getZoom() <= 17) {
2525
+ console.log('SACadastral, map on zoom changed, zoom >= 13 and zoom <= 17');
2520
2526
  eventHandlers["ReloadCadastralData"]({
2521
2527
  type: 'SUCCESS',
2522
2528
  message: 'Reload cadastral data on zoom changed',
@@ -2524,12 +2530,18 @@ export class MapOverlayManager {
2524
2530
  data: null
2525
2531
  });
2526
2532
  } else {
2527
- console.log('SACadastral, map on zoom changed, zoom < 12 or zoom > 17');
2533
+ console.log('SACadastral, map on zoom changed, zoom < 13 or zoom > 17');
2528
2534
  mapListeners_clear();
2529
2535
  fPolies_clear();
2536
+ if(map.getZoom() < 13) {
2537
+ map.setZoom(13);
2538
+ }
2539
+ if(map.getZoom() > 17) {
2540
+ map.setZoom(17);
2541
+ }
2530
2542
  eventHandlers["ReloadCadastralData"]({
2531
2543
  type: 'SUCCESS',
2532
- message: 'Reload cadastral data on zoom changed',
2544
+ message: 'Reload cadastral data on zoom changed, zoom outside range',
2533
2545
  code: 200,
2534
2546
  data: null
2535
2547
  });
@@ -2537,9 +2549,9 @@ export class MapOverlayManager {
2537
2549
  });
2538
2550
  mapListeners.push(mzcListener);
2539
2551
 
2540
- var mbcListener = google.maps.event.addListener(map, 'bounds_changed', function() {
2541
- if(map.getZoom() >= 12 && map.getZoom() <= 17) {
2542
- console.log('SACadastral, map on bounds changed, zoom >= 12 and zoom <= 17');
2552
+ var mbcListener = google.maps.event.addListenerOnce(map, 'bounds_changed', function() {
2553
+ if(map.getZoom() >= 13 && map.getZoom() <= 17) {
2554
+ console.log('SACadastral, map on bounds changed, zoom >= 13 and zoom <= 17');
2543
2555
  eventHandlers["ReloadCadastralData"]({
2544
2556
  type: 'SUCCESS',
2545
2557
  message: 'Reload cadastral data on bounds changed',
@@ -2547,12 +2559,19 @@ export class MapOverlayManager {
2547
2559
  data: null
2548
2560
  });
2549
2561
  } else {
2550
- console.log('SACadastral, map on bounds changed, zoom < 12 or zoom > 17');
2562
+ console.log('SACadastral, map on bounds changed, zoom < 13 or zoom > 17');
2551
2563
  mapListeners_clear();
2552
2564
  fPolies_clear();
2565
+ if(map.getZoom() < 13) {
2566
+ map.setZoom(13);
2567
+ }
2568
+ if(map.getZoom() > 17) {
2569
+ map.setZoom(17);
2570
+ }
2571
+
2553
2572
  eventHandlers["ReloadCadastralData"]({
2554
2573
  type: 'SUCCESS',
2555
- message: 'Reload cadastral data on bounds changed',
2574
+ message: 'Reload cadastral data on bounds changed, zoom outside range',
2556
2575
  code: 200,
2557
2576
  data: null
2558
2577
  });
@@ -2560,7 +2579,9 @@ export class MapOverlayManager {
2560
2579
  });
2561
2580
  mapListeners.push(mbcListener);
2562
2581
 
2563
- Display_SACadastral(saCadastralJson, offsetX, offsetY, vmWidth, isDashboard, fitBounds);
2582
+ if(map.getZoom() >= 13 && map.getZoom() <= 17) {
2583
+ Display_SACadastral(saCadastralJson, offsetX, offsetY, vmWidth, isDashboard, fitBounds);
2584
+ }
2564
2585
  }
2565
2586
 
2566
2587
  function Display_SACadastral(saCadastralJson, offsetX, offsetY, vmWidth, isDashboard, fitBounds) {