Skip to content

Commit

Permalink
ISSUE-4 - Fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
vasile committed Dec 14, 2015
1 parent b71f6a2 commit efd7798
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/gtfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def self.geojson_to_kml(feature_name)

kml_placemarks = []
geojson['features'].each do |f|
kml_placemark = File.open("#{APP_INC_PATH}/inc/templates/kml_placemark_#{feature_name}.xml", "r").read
kml_placemark = File.open("#{APP_INC_PATH}/templates/kml_placemark_#{feature_name}.xml", "r").read
f['properties'].each do |key, value|
kml_placemark.gsub!("{#{key}}", value.nil? ? '' : value)
end
Expand All @@ -195,7 +195,7 @@ def self.geojson_to_kml(feature_name)
kml_placemarks.push(kml_placemark)
end

kml_content = File.open("#{APP_INC_PATH}/inc/templates/kml_document.xml", "r").read
kml_content = File.open("#{APP_INC_PATH}/templates/kml_document.xml", "r").read
kml_content.gsub!('{feature_name}', feature_name)
kml_content.sub!('{placemarks}', kml_placemarks.join("\n"))

Expand Down

0 comments on commit efd7798

Please sign in to comment.