Class: AbstractMarker
- Inherits:
-
Object
show all
- Defined in:
- lib/mapbox/abstract_marker.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of AbstractMarker.
4
5
6
7
|
# File 'lib/mapbox/abstract_marker.rb', line 4
def initialize(args=nil)
raise "Cannot directly instantiate a SimpleMarker" if self.class == AbstractMarker
super
end
|
Instance Attribute Details
#latitude ⇒ Object
Returns the value of attribute latitude.
2
3
4
|
# File 'lib/mapbox/abstract_marker.rb', line 2
def latitude
@latitude
end
|
#longitude ⇒ Object
Returns the value of attribute longitude.
2
3
4
|
# File 'lib/mapbox/abstract_marker.rb', line 2
def longitude
@longitude
end
|
Instance Method Details
#lat ⇒ Object
9
10
11
|
# File 'lib/mapbox/abstract_marker.rb', line 9
def lat
self.latitude
end
|
#lat=(latitude) ⇒ Object
17
18
19
|
# File 'lib/mapbox/abstract_marker.rb', line 17
def lat=(latitude)
self.latitude = latitude
end
|
#lon ⇒ Object
13
14
15
|
# File 'lib/mapbox/abstract_marker.rb', line 13
def lon
self.longitude
end
|
#lon=(longitude) ⇒ Object
21
22
23
|
# File 'lib/mapbox/abstract_marker.rb', line 21
def lon=(longitude)
self.longitude = longitude
end
|
#to_s ⇒ Object
36
37
38
|
# File 'lib/mapbox/abstract_marker.rb', line 36
def to_s
"(#{self.lon},#{self.lat})"
end
|