diff options
| author | Marc Florisson | 2014-10-03 09:39:22 +0200 | 
|---|---|---|
| committer | Marc Florisson | 2014-10-03 09:39:22 +0200 | 
| commit | 6a11b1c4057f828bbb98b53dde27a346b794bd3f (patch) | |
| tree | b14a7c19e971afc606406afda94e58e514b7a1f7 | |
| parent | 5e79dbe396a2e0cebca960b7f540fc14011263b0 (diff) | |
| download | chouette-core-6a11b1c4057f828bbb98b53dde27a346b794bd3f.tar.bz2 | |
fix popup on maps
| -rw-r--r-- | app/maps/application_map.rb | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/app/maps/application_map.rb b/app/maps/application_map.rb index 78141b535..662e7b941 100644 --- a/app/maps/application_map.rb +++ b/app/maps/application_map.rb @@ -56,11 +56,11 @@ class ApplicationMap        end        page << map.add_layer(MapLayers::OSM_MAPNIK) -      #page << map.add_layers([geoportail_scans, geoportail_ortho])  -      page << map.add_layer(google_physical)  -      page << map.add_layer(google_streets)  -      page << map.add_layer(google_hybrid)  -      page << map.add_layer(google_satellite)  +      #page << map.add_layers([geoportail_scans, geoportail_ortho]) +      page << map.add_layer(google_physical) +      page << map.add_layer(google_streets) +      page << map.add_layer(google_hybrid) +      page << map.add_layer(google_satellite)        customize_map(map,page) if respond_to?( :customize_map)      end @@ -121,13 +121,13 @@ class ApplicationMap    def google_hybrid      OpenLayers::Layer::Google.new I18n.t("maps.google_hybrid"), :type => :"google.maps.MapTypeId.HYBRID", :numZoomLevels => 20    end -   +    def google_satellite      OpenLayers::Layer::Google.new I18n.t("maps.google_satellite"), :type => :"google.maps.MapTypeId.SATELLITE", :numZoomLevels => 22    end    def hover_control_display_name(layer) -    OpenLayers::Control::SelectFeature.new( layer, {  +    OpenLayers::Control::SelectFeature.new( layer, {                                                :autoActivate => true,                                                :hover => true,                                                :renderIntent => "temporary", @@ -136,7 +136,7 @@ class ApplicationMap            var feature = e.feature ;            if (feature.attributes.inactive != undefined)              return; -          var popup = new OpenLayers.Popup.AnchoredBubble('chicken',  +          var popup = new OpenLayers.Popup.Anchored('chicken',                                                   new OpenLayers.LonLat(feature.geometry.x, feature.geometry.y),                                                   null,                                                   \"<div class='popup_hover'><b>\" + feature.attributes.name +\"</b></div> \", null, false, null); @@ -152,12 +152,12 @@ class ApplicationMap              return;            map.removePopup(feature.popup);            feature.popup.destroy(); -          feature.popup = null;   +          feature.popup = null;          }")                                                } } )    end -  def kml_layer(url_or_object, options_or_url_options = {}, options = nil)    +  def kml_layer(url_or_object, options_or_url_options = {}, options = nil)      unless options        url_options = {}        options = options_or_url_options @@ -176,7 +176,7 @@ class ApplicationMap        else          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      OpenLayers::Layer::Vector.new name, {:projection => projection("EPSG:4326"), :strategies => [strategy_fixed], :protocol => protocol, :displayInLayerSwitcher => false}.merge(options)    end | 
