smappy 0.0.3 → 0.0.4
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.
- data/lib/smappy.rb +1 -1
- data/lib/smappy/marker.rb +1 -1
- data/markers/marker.png +0 -0
- data/spec/smappy/marker_spec.rb +5 -5
- metadata +7 -7
- data/markers/information_marker.png +0 -0
data/lib/smappy.rb
CHANGED
data/lib/smappy/marker.rb
CHANGED
data/markers/marker.png
ADDED
Binary file
|
data/spec/smappy/marker_spec.rb
CHANGED
@@ -5,23 +5,23 @@ describe Smappy::Marker do
|
|
5
5
|
|
6
6
|
describe '#initialize' do
|
7
7
|
it 'sets a default image' do
|
8
|
-
marker.image.should == File.expand_path('../../../markers/
|
8
|
+
marker.image.should == File.expand_path('../../../markers/marker.png', __FILE__)
|
9
9
|
end
|
10
10
|
|
11
11
|
it 'sets a default offset' do
|
12
|
-
marker.offset.should == [-
|
12
|
+
marker.offset.should == [-12, -41]
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
16
|
describe '#width' do
|
17
17
|
it 'returns the width of the marker image' do
|
18
|
-
marker.width.should ==
|
18
|
+
marker.width.should == 25
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
describe '#height' do
|
23
23
|
it 'returns the height of the marker image' do
|
24
|
-
marker.height.should ==
|
24
|
+
marker.height.should == 41
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -29,7 +29,7 @@ describe Smappy::Marker do
|
|
29
29
|
let(:map) { Smappy::StaticMap.new(center: [50.9985099, 5.857652], zoomlevel: 15) }
|
30
30
|
|
31
31
|
it 'returns the coordinates of the marker on the given map' do
|
32
|
-
marker.position_on_map(map).should == [
|
32
|
+
marker.position_on_map(map).should == [238, 134]
|
33
33
|
end
|
34
34
|
|
35
35
|
it 'returns the coordinates of the marker on the given map offset by the specified offset' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smappy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-01-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chunky_png
|
16
|
-
requirement: &
|
16
|
+
requirement: &70280798132040 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70280798132040
|
25
25
|
description: Generate static maps of map tiles.
|
26
26
|
email: tomeric@eet.nu
|
27
27
|
executables: []
|
@@ -33,7 +33,7 @@ files:
|
|
33
33
|
- lib/smappy/static_map.rb
|
34
34
|
- lib/smappy/tile.rb
|
35
35
|
- lib/smappy.rb
|
36
|
-
- markers/
|
36
|
+
- markers/marker.png
|
37
37
|
- spec/fixtures/cassettes/StaticMap_to_image.yml
|
38
38
|
- spec/fixtures/cassettes/Tile_to_image.yml
|
39
39
|
- spec/smappy/location_spec.rb
|
@@ -59,7 +59,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
59
|
version: '0'
|
60
60
|
segments:
|
61
61
|
- 0
|
62
|
-
hash:
|
62
|
+
hash: -823974385858967659
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
65
65
|
requirements:
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
version: '0'
|
69
69
|
segments:
|
70
70
|
- 0
|
71
|
-
hash:
|
71
|
+
hash: -823974385858967659
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
74
|
rubygems_version: 1.8.10
|
Binary file
|