Class: Localwiki::Map
Overview
Instance Attribute Summary
Attributes inherited from Resource
#json
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#lat ⇒ Object
54
55
56
|
# File 'lib/localwiki/resource.rb', line 54
def lat
self.points['coordinates'].first[0] if self.single_point?
end
|
#line? ⇒ Boolean
46
47
48
|
# File 'lib/localwiki/resource.rb', line 46
def line?
self.lines
end
|
#long ⇒ Object
58
59
60
|
# File 'lib/localwiki/resource.rb', line 58
def long
self.points['coordinates'].first[1] if self.single_point?
end
|
#poly? ⇒ Boolean
50
51
52
|
# File 'lib/localwiki/resource.rb', line 50
def poly?
self.polys
end
|
#single_point? ⇒ Boolean
42
43
44
|
# File 'lib/localwiki/resource.rb', line 42
def single_point?
self.points && self.points['coordinates'].size == 1
end
|