mapping-component-package-jp 0.0.32 → 0.0.34

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