Class: CustomMarker

Inherits:
AbstractMarker show all
Defined in:
lib/mapbox/custom_marker.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractMarker

#latitude, #longitude

Instance Method Summary collapse

Methods inherited from AbstractMarker

#lat, #lat=, #lon, #lon=

Constructor Details

#initialize(latitude, longitude, url) ⇒ CustomMarker

Returns a new instance of CustomMarker.



4
5
6
7
8
# File 'lib/mapbox/custom_marker.rb', line 4

def initialize(latitude, longitude, url)
  self.latitude = latitude
  self.longitude = longitude
  self.url = url
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



2
3
4
# File 'lib/mapbox/custom_marker.rb', line 2

def url
  @url
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/mapbox/custom_marker.rb', line 14

def to_s
  "url-#{self.url}(#{self.lon},#{self.lat})"
end