lib/jekyll-maps/location_finder.rb in jekyll-maps-2.2.0 vs lib/jekyll-maps/location_finder.rb in jekyll-maps-2.3.0
- old
+ new
@@ -87,11 +87,13 @@
def documents_to_locations
locations = []
@documents.each do |document|
if document["location"].is_a?(Array)
document["location"].each do |location|
- locations.push(convert(document, location))
+ point = convert(document, location)
+ point[:url] = "" if point[:url] == fetch_url(document)
+ locations.push(point)
end
else
locations.push(convert(document, document["location"]))
end
end
@@ -104,9 +106,10 @@
:latitude => location["latitude"],
:longitude => location["longitude"],
:title => location["title"] || document["title"],
:icon => location["marker_icon"] || document["marker_icon"],
:url => location["url"] || fetch_url(document),
+ :url_text => location["url_text"],
:image => location["image"] || document["image"] || ""
}
end
private