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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +0 -4
- data/lib/mapkick/version.rb +1 -1
- data/licenses/LICENSE-mapkick-bundle.txt +1 -1
- data/vendor/assets/javascripts/mapkick.bundle.js +20 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5a2b37b33ecba167e0844af635b9a87a3afad84eb92b06e19cd3db6ecf6ceb8
|
4
|
+
data.tar.gz: db38e21238698891fa79c21dfcafddba4b97fe3e4b31a91083871279a90836bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54729a215c5960c9b73395d98a395941231fa76b6e7b8c9c4d85364f5299e6c4032ac66d08988b236a4fe06a0f40018be997eb53822d44c11003671c4143e43b
|
7
|
+
data.tar.gz: 303226c8be546b020ff81054559f8cff01560ac5a1c26f30f97b1931e1990dcb9186db4a6a885530b80714e89db3de92881f554253ec6c164a47794a3b787034
|
data/CHANGELOG.md
CHANGED
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)
|
data/lib/mapkick/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* This bundle includes:
|
3
3
|
*
|
4
|
-
* Mapkick.js v0.2.
|
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:
|
885
|
-
zoom:
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2023-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: andrew@ankane.org
|