static-gmaps2 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/LICENSE.txt +1 -1
- data/README.markdown +83 -0
- data/Rakefile +1 -35
- data/lib/{static_gmaps.rb → static_gmaps2.rb} +0 -0
- data/spec/static_gmaps_spec.rb +1 -1
- data/static-gmaps2.gemspec +19 -0
- metadata +15 -26
- data/Manifest.txt +0 -6
data/History.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
=== 0.0.6 / 2010-07-03 by nat.lownes@gmail.com
|
2
|
+
- Renamed some files to not conflict with the original static-gmaps.
|
3
|
+
- Cleanup.
|
1
4
|
=== 0.0.5 / 2010-02-14 by nat.lownes@gmail.com
|
2
5
|
* Updated most all of the Ruby API to match the most recent Google Static Maps API. This includes:
|
3
6
|
- Changed the maximum_url_size to 2048
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License
|
2
2
|
|
3
|
-
Copyright (c)
|
3
|
+
Copyright (c) 2010 Nat Lownes <nat.lownes@gmail.com>
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.markdown
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
= StaticGmaps
|
2
|
+
|
3
|
+
== DESCRIPTION:
|
4
|
+
|
5
|
+
Provides an interface to the Google Static Maps API.
|
6
|
+
Forked from static-gmaps.
|
7
|
+
|
8
|
+
== FEATURES/PROBLEMS:
|
9
|
+
|
10
|
+
* Provides an interface to the Google Static Maps API.
|
11
|
+
|
12
|
+
== SYNOPSIS:
|
13
|
+
|
14
|
+
In environment.rb or initializers you can set default values, for example:
|
15
|
+
|
16
|
+
require 'static_gmaps2'
|
17
|
+
|
18
|
+
StaticGmaps::default_size = [ 170, 200 ]
|
19
|
+
|
20
|
+
map = StaticGmaps::Map.new :center => [ 40.714728, -73.998672 ],
|
21
|
+
:zoom => 5,
|
22
|
+
:size => [ 500, 400 ],
|
23
|
+
:map_type => :roadmap
|
24
|
+
|
25
|
+
map.markers << StaticGmaps::Marker.new(:latitude => 40,
|
26
|
+
:longitude => -73,
|
27
|
+
:color => :blue,
|
28
|
+
:label => "B")
|
29
|
+
map.url => 'http://maps.google.com/maps/api/staticmap?center=40.714728,-73.998672&map_type=roadmap&markers=color:blue|label:B|40,-73&sensor=false&size=500x400&zoom=5'
|
30
|
+
|
31
|
+
The main feature that differentiates this project from static-gmaps is that both Map and Marker can also use an address or an array of coordinates (as seen above). Example:
|
32
|
+
|
33
|
+
map = StaticGmaps::Map.new do |m|
|
34
|
+
m.center = "1234 Market St.; Phila, PA"
|
35
|
+
m.zoom = 13
|
36
|
+
end
|
37
|
+
|
38
|
+
map.markers << StaticGmaps::Marker.new do |m|
|
39
|
+
m.location = "412 W. Girard Ave; Phila, PA"
|
40
|
+
m.color = "yellow"
|
41
|
+
m.label = "F"
|
42
|
+
end
|
43
|
+
|
44
|
+
map.markers << StaticGmaps::Marker.new do |m|
|
45
|
+
m.location = "1356 N. Front St; Phila, PA"
|
46
|
+
m.color = "orange"
|
47
|
+
m.label = "E"
|
48
|
+
end
|
49
|
+
|
50
|
+
== REQUIREMENTS:
|
51
|
+
|
52
|
+
* None.
|
53
|
+
|
54
|
+
== INSTALL:
|
55
|
+
|
56
|
+
* sudo gem install static-gmaps2
|
57
|
+
|
58
|
+
== CONTACT:
|
59
|
+
|
60
|
+
* nat.lownes@gmail.com
|
61
|
+
|
62
|
+
== LICENSE:
|
63
|
+
|
64
|
+
(The MIT License)
|
65
|
+
|
66
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
67
|
+
a copy of this software and associated documentation files (the
|
68
|
+
'Software'), to deal in the Software without restriction, including
|
69
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
70
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
71
|
+
permit persons to whom the Software is furnished to do so, subject to
|
72
|
+
the following conditions:
|
73
|
+
|
74
|
+
The above copyright notice and this permission notice shall be
|
75
|
+
included in all copies or substantial portions of the Software.
|
76
|
+
|
77
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
78
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
79
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
80
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
81
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
82
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
83
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,28 +1,5 @@
|
|
1
|
-
# The MIT License
|
2
|
-
#
|
3
|
-
# Copyright (c) 2008 John Wulff <johnwulff@gmail.com>
|
4
|
-
#
|
5
|
-
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
# of this software and associated documentation files (the "Software"), to deal
|
7
|
-
# in the Software without restriction, including without limitation the rights
|
8
|
-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
# copies of the Software, and to permit persons to whom the Software is
|
10
|
-
# furnished to do so, subject to the following conditions:
|
11
|
-
#
|
12
|
-
# The above copyright notice and this permission notice shall be included in
|
13
|
-
# all copies or substantial portions of the Software.
|
14
|
-
#
|
15
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
# THE SOFTWARE.
|
22
|
-
|
23
1
|
require 'rubygems'
|
24
|
-
require '
|
25
|
-
require './lib/static_gmaps.rb'
|
2
|
+
require 'lib/static_gmaps2'
|
26
3
|
begin
|
27
4
|
require 'spec/rake/spectask'
|
28
5
|
rescue LoadError
|
@@ -31,17 +8,6 @@ rescue LoadError
|
|
31
8
|
exit
|
32
9
|
end
|
33
10
|
|
34
|
-
Hoe.new('static-gmaps', StaticGmaps::version) do |p|
|
35
|
-
p.rubyforge_name = 'static-gmaps'
|
36
|
-
p.author = 'Daniel Mattes'
|
37
|
-
p.email = 'daniel.mattes@gmx.de'
|
38
|
-
p.summary = 'Provides an interface to the Google Static Maps API.'
|
39
|
-
p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
|
40
|
-
p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
|
41
|
-
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
|
42
|
-
p.remote_rdoc_dir = ''
|
43
|
-
end
|
44
|
-
|
45
11
|
desc "Run all examples"
|
46
12
|
Spec::Rake::SpecTask.new('spec') do |t|
|
47
13
|
t.spec_files = FileList['spec/*.rb']
|
File without changes
|
data/spec/static_gmaps_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'spec'
|
3
|
-
require File.join(File.dirname(__FILE__), '..', 'lib', '
|
3
|
+
require File.join(File.dirname(__FILE__), '..', 'lib', 'static_gmaps2')
|
4
4
|
include StaticGmaps
|
5
5
|
|
6
6
|
STATIC_GOOGLE_MAP_DEFAULT_PARAMETERS_TEST_IMAGE_PATH = File.join File.dirname(__FILE__), 'test_image.gif'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = %q{static-gmaps2}
|
3
|
+
s.version = "0.0.6"
|
4
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
5
|
+
s.authors = ["John Wulff", "Daniel Mattes", "Nat Lownes"]
|
6
|
+
s.date = %q{2010-06-30}
|
7
|
+
s.description = %q{== DESCRIPTION: Provides an interface to the Google Static Maps API V3. Based on static-gmaps
|
8
|
+
== FEATURES/PROBLEMS: * Provides an interface to the Google Static Maps API.}
|
9
|
+
s.email = %q{nat.lownes@gmail.com}
|
10
|
+
s.extra_rdoc_files = ['README.markdown', "History.txt", "LICENSE.txt"]
|
11
|
+
s.files = Dir['**/**']
|
12
|
+
s.has_rdoc = true
|
13
|
+
s.rdoc_options = ['--title', 'static-gmaps2', "--main", "README.markdown", '--line-numbers']
|
14
|
+
s.homepage = 'http://github.com/natlownes/static-gmaps/'
|
15
|
+
s.require_paths = ["lib"]
|
16
|
+
s.rubyforge_project = %q{static-gmaps2}
|
17
|
+
s.rubygems_version = %q{1.3.1}
|
18
|
+
s.summary = %q{Provides an interface to the Google Static Maps API.}
|
19
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: static-gmaps2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Wulff
|
@@ -19,23 +19,8 @@ cert_chain: []
|
|
19
19
|
|
20
20
|
date: 2010-06-30 00:00:00 -04:00
|
21
21
|
default_executable:
|
22
|
-
dependencies:
|
23
|
-
|
24
|
-
name: hoe
|
25
|
-
prerelease: false
|
26
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
|
-
requirements:
|
29
|
-
- - ">="
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
hash: 49
|
32
|
-
segments:
|
33
|
-
- 1
|
34
|
-
- 8
|
35
|
-
- 3
|
36
|
-
version: 1.8.3
|
37
|
-
type: :development
|
38
|
-
version_requirements: *id001
|
22
|
+
dependencies: []
|
23
|
+
|
39
24
|
description: |-
|
40
25
|
== DESCRIPTION: Provides an interface to the Google Static Maps API V3. Based on static-gmaps
|
41
26
|
== FEATURES/PROBLEMS: * Provides an interface to the Google Static Maps API.
|
@@ -45,24 +30,28 @@ executables: []
|
|
45
30
|
extensions: []
|
46
31
|
|
47
32
|
extra_rdoc_files:
|
33
|
+
- README.markdown
|
48
34
|
- History.txt
|
49
35
|
- LICENSE.txt
|
50
|
-
- Manifest.txt
|
51
36
|
files:
|
52
37
|
- History.txt
|
38
|
+
- lib/static_gmaps2.rb
|
53
39
|
- LICENSE.txt
|
54
|
-
- Manifest.txt
|
55
40
|
- Rakefile
|
56
|
-
-
|
41
|
+
- README.markdown
|
57
42
|
- spec/static_gmaps_spec.rb
|
43
|
+
- static-gmaps2.gemspec
|
58
44
|
has_rdoc: true
|
59
45
|
homepage: http://github.com/natlownes/static-gmaps/
|
60
46
|
licenses: []
|
61
47
|
|
62
48
|
post_install_message:
|
63
49
|
rdoc_options:
|
50
|
+
- --title
|
51
|
+
- static-gmaps2
|
64
52
|
- --main
|
65
|
-
-
|
53
|
+
- README.markdown
|
54
|
+
- --line-numbers
|
66
55
|
require_paths:
|
67
56
|
- lib
|
68
57
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -85,10 +74,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
74
|
version: "0"
|
86
75
|
requirements: []
|
87
76
|
|
88
|
-
rubyforge_project: static-
|
77
|
+
rubyforge_project: static-gmaps2
|
89
78
|
rubygems_version: 1.3.7
|
90
79
|
signing_key:
|
91
|
-
specification_version:
|
80
|
+
specification_version: 3
|
92
81
|
summary: Provides an interface to the Google Static Maps API.
|
93
82
|
test_files: []
|
94
83
|
|