class CustomMarker
Attributes
url[RW]
Public Class Methods
new(latitude, longitude, url)
click to toggle source
# File lib/mapbox/custom_marker.rb, line 4 def initialize(latitude, longitude, url) self.latitude = latitude self.longitude = longitude self.url = url end
Private Class Methods
encode_url(url)
click to toggle source
# File lib/mapbox/custom_marker.rb, line 20 def self.encode_url(url) url.sub!(/^http[s]?\:\/\//, '') MapboxUtils.encode_url(url) end
Public Instance Methods
to_s()
click to toggle source
# File lib/mapbox/custom_marker.rb, line 14 def to_s "url-#{self.url}(#{self.lon},#{self.lat})" end
url=(url)
click to toggle source
# File lib/mapbox/custom_marker.rb, line 10 def url=(url) @url = CustomMarker.encode_url(url) unless url.nil? end