diff options
| author | Marc Florisson | 2012-09-19 12:04:29 +0200 |
|---|---|---|
| committer | Marc Florisson | 2012-09-19 12:04:29 +0200 |
| commit | 629ebdfafc4ac8fa0bc65a1dd93b1e21b985d162 (patch) | |
| tree | 28e5eec26a063891be3d0828f24e14518abba742 /app/maps/application_map.rb | |
| parent | 7cdfab565d89ebcf88c4e04912bd55b430dafa80 (diff) | |
| parent | 307254776caa2aa353422b8a489ab804d18e1cbc (diff) | |
| download | chouette-core-629ebdfafc4ac8fa0bc65a1dd93b1e21b985d162.tar.bz2 | |
merge branch master
Diffstat (limited to 'app/maps/application_map.rb')
| -rw-r--r-- | app/maps/application_map.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/app/maps/application_map.rb b/app/maps/application_map.rb index 1fd2326c7..618ca0db2 100644 --- a/app/maps/application_map.rb +++ b/app/maps/application_map.rb @@ -7,7 +7,7 @@ class ApplicationMap cattr_accessor :ign_api_key def helpers - @helper ||= Helpers.new + @helpers ||= Helpers.new end # For example, in a controller : @@ -136,11 +136,6 @@ class ApplicationMap "#{relative_url_root}/assets/openlayers/" end - def polymorphic_path_patch( source) - relative_url_root = Rails.application.config.relative_url_root - relative_url_root && !source.starts_with?("#{relative_url_root}/") ? "#{relative_url_root}#{source}" : source - end - def kml_layer(url_or_object, options_or_url_options = {}, options = nil) unless options url_options = {} @@ -156,9 +151,9 @@ class ApplicationMap when String url_or_object when Array - polymorphic_path_patch( helpers.polymorphic_path(url_or_object, url_options)) + helpers.polymorphic_path_patch( helpers.polymorphic_path(url_or_object, url_options)) else - polymorphic_path_patch( helpers.polymorphic_path([url_or_object.referential, url_or_object], url_options)) + helpers.polymorphic_path_patch( helpers.polymorphic_path([url_or_object.referential, url_or_object], url_options)) end protocol = OpenLayers::Protocol::HTTP.new :url => url, :format => kml |
