mapkick-rb 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5af8b1f85970b613f96f189922c9be421f657e9c56d3986976ae3cdf366a9f2b
4
- data.tar.gz: 4de73c3a4b3d91dc42b93a607cec9daa8a26adfbdba99a70bad660d38a0037dc
3
+ metadata.gz: f5a2b37b33ecba167e0844af635b9a87a3afad84eb92b06e19cd3db6ecf6ceb8
4
+ data.tar.gz: db38e21238698891fa79c21dfcafddba4b97fe3e4b31a91083871279a90836bb
5
5
  SHA512:
6
- metadata.gz: d3c4f0f38d8039fb1caf42fd5e45fd3abd5051ed90411ed38ee5a237b89cd3728fcfecef2189887e2649ad7397e20f49a984935567e8a7e0873ade87de5509fd
7
- data.tar.gz: bc67f76b17cf72d8e2ad6f2a23408ca06c84c6fc06a118dedccd930b8a60838ac4a0e5ba013c6205a17155b6aaf6d79322cf9af7b03e82c0211a7cfbbd368fe9
6
+ metadata.gz: 54729a215c5960c9b73395d98a395941231fa76b6e7b8c9c4d85364f5299e6c4032ac66d08988b236a4fe06a0f40018be997eb53822d44c11003671c4143e43b
7
+ data.tar.gz: 303226c8be546b020ff81054559f8cff01560ac5a1c26f30f97b1931e1990dcb9186db4a6a885530b80714e89db3de92881f554253ec6c164a47794a3b787034
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.4 (2023-03-11)
2
+
3
+ - Updated Mapkick.js to 0.2.5
4
+
1
5
  ## 0.1.3 (2023-02-13)
2
6
 
3
7
  - Updated Mapkick.js to 0.2.4
data/README.md CHANGED
@@ -196,10 +196,6 @@ Download [mapkick.bundle.js](https://raw.githubusercontent.com/ankane/mapkick/ma
196
196
  <script src="mapkick.bundle.js"></script>
197
197
  ```
198
198
 
199
- ## No Ruby? No Problem
200
-
201
- Check out [mapkick.js](https://github.com/ankane/mapkick.js)
202
-
203
199
  ## History
204
200
 
205
201
  View the [changelog](CHANGELOG.md)
@@ -1,3 +1,3 @@
1
1
  module Mapkick
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  ================================================================================
2
- Mapkick.js 0.2.4
2
+ Mapkick.js 0.2.5
3
3
  ================================================================================
4
4
 
5
5
  Copyright (c) 2017-2023 Andrew Kane
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * This bundle includes:
3
3
  *
4
- * Mapkick.js v0.2.4
4
+ * Mapkick.js v0.2.5
5
5
  * https://github.com/ankane/mapkick.js
6
6
  * MIT License
7
7
  *
@@ -876,13 +876,26 @@
876
876
  }
877
877
  }
878
878
 
879
+ var zoom = options.zoom;
880
+ var center = options.center;
881
+ if (!center) {
882
+ if (!bounds.isEmpty()) {
883
+ center = bounds.getCenter();
884
+ } else {
885
+ center = [0, 0];
886
+ if (!zoom) {
887
+ zoom = 1;
888
+ }
889
+ }
890
+ }
891
+
879
892
  var mapOptions = {
880
893
  container: element,
881
894
  style: style,
882
895
  dragRotate: false,
883
896
  touchZoomRotate: false,
884
- center: options.center || bounds.getCenter(),
885
- zoom: options.zoom || 15
897
+ center: center,
898
+ zoom: zoom || 15
886
899
  };
887
900
  if (!options.style) {
888
901
  mapOptions.projection = "mercator";
@@ -901,7 +914,10 @@
901
914
  if (!map.style.stylesheet) {
902
915
  map.style.stylesheet = {};
903
916
  }
904
- map.fitBounds(bounds, {padding: 40, animate: false, maxZoom: 15});
917
+
918
+ if (!bounds.isEmpty()) {
919
+ map.fitBounds(bounds, {padding: 40, animate: false, maxZoom: 15});
920
+ }
905
921
  }
906
922
 
907
923
  this$1$1.map = map;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mapkick-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-13 00:00:00.000000000 Z
11
+ date: 2023-03-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org