From b2ba653b24cf7ca196b454a144998c542b6e666e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 10 Oct 2016 18:26:10 +0200 Subject: Fix routing panel show/hide --- chimere/static/chimere/js/jquery.chimere.js | 31 ++++++++--------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index 1bece14..38698bc 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -304,6 +304,7 @@ function transformCoordToLonLat(coord) { } settings = $.extend({}, defaults); settings._revision = 0; + if ( options ) $.extend(settings, options); if (settings.controls == null){ @@ -2393,25 +2394,6 @@ function transformCoordToLonLat(coord) { ); settings.routingFeatures.push(feature); - /* - var lonlat = new OpenLayers.LonLat( - feat.geometry.coordinates[0], - feat.geometry.coordinates[1]); - lonlat.transform(EPSG_DISPLAY_PROJECTION, - settings.map.getProjectionObject()); - var icon_height = feat.properties.icon_height; - var icon_width = feat.properties.icon_width; - var marker = new OpenLayers.Marker(lonlat, - new OpenLayers.Icon( - feat.properties.icon_path, - new OpenLayers.Size(icon_width, - icon_height), - new OpenLayers.Pixel( - -(icon_width/2), - -icon_height)) - ); - settings.layerRouteMarker.addMarker(marker); - */ } } if (data.message) methods.displayMessage(data.message); @@ -2432,14 +2414,17 @@ function transformCoordToLonLat(coord) { $('#chimere_itinerary_content').html( data.properties.description); $('#chimere_itinerary').show(); - if(!settings.edition_type_is_route){ + /* + TODO + if(settings.edition_type_is_route){ + methods.updateRoutingInput(); + } else { + */ if (!settings.mobile){ $('#chimere_itinerary_form').hide(); settings.routing_panel_open(); } - } else { - methods.updateRoutingInput(); - } + // } // Added for mobile - START // // iOS methods.connectWebViewJavascriptBridge( -- cgit v1.2.3