osm-rb 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/osm.rb +1 -1
- data/lib/osm/calculator.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e2f6455ba370f323495f435a6a7347b1a21747fb52aacfe3642c7505c90bb22
|
4
|
+
data.tar.gz: 88e75136f4e2965ba906e1c211fd7919039d475d16cd03a148be94ebc3be6a36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a508b4159041ae8656e4aca6bcf5ca407d96d35b4a0c8a822e6efe9272290ddeba5d4ab56fef2c7ef23c49533cbb91afcce335b9751560da6a431abe39d919e5
|
7
|
+
data.tar.gz: e617df00d4cda4d34cf9b1c53c924b55562323a0ee12d46f31490af4f5806a1be303a027d05ceb69923e1c4dabc9cf7462cfbe1f247cc6f4b04099e75315b718
|
data/Gemfile.lock
CHANGED
data/lib/osm.rb
CHANGED
data/lib/osm/calculator.rb
CHANGED
@@ -23,10 +23,11 @@ module OSM
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def pixels(path)
|
26
|
+
crop = crop_dimensions(path)
|
26
27
|
top_left = top_left_tile(path)
|
27
28
|
path.map do |point|
|
28
29
|
pixel = lat_lng_to_pixel(point)
|
29
|
-
OpenStruct.new(x: pixel.x - (top_left.x * TILE_SIZE), y: pixel.y - (top_left.y * TILE_SIZE))
|
30
|
+
OpenStruct.new(x: pixel.x - (top_left.x * TILE_SIZE) - crop.x, y: pixel.y - (top_left.y * TILE_SIZE) - crop.y)
|
30
31
|
end
|
31
32
|
end
|
32
33
|
|