reenabled features;
removed no longer needed custom initialization of Control.Layers
This commit is contained in:
parent
f004a65db1
commit
d9b0ab3d2e
@ -80,13 +80,13 @@ initPosition: function() {
|
|||||||
|
|
||||||
// map event handlers
|
// map event handlers
|
||||||
zoomed: function(e) {
|
zoomed: function(e) {
|
||||||
/*if(OSRM.G.dragging)
|
if(OSRM.G.dragging)
|
||||||
OSRM.Routing.getRoute_Dragging();
|
OSRM.Routing.getRoute_Dragging();
|
||||||
else
|
else
|
||||||
OSRM.Routing.getRoute_Redraw({keepAlternative:true});*/
|
OSRM.Routing.getRoute_Redraw({keepAlternative:true});
|
||||||
},
|
},
|
||||||
contextmenu: function(e) {;},
|
contextmenu: function(e) {;},
|
||||||
mousemove: function(e) { },//OSRM.Via.drawDragMarker(e); },
|
mousemove: function(e) { OSRM.Via.drawDragMarker(e); },
|
||||||
click: function(e) {
|
click: function(e) {
|
||||||
OSRM.GUI.deactivateTooltip( "CLICKING" );
|
OSRM.GUI.deactivateTooltip( "CLICKING" );
|
||||||
if( !OSRM.G.markers.hasSource() ) {
|
if( !OSRM.G.markers.hasSource() ) {
|
||||||
|
@ -16,45 +16,9 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// queryable Layers control
|
// queryable Layers control
|
||||||
// [simply Control.Layers extended by query functions and some fixes for touch screens]
|
// [simply Control.Layers extended by query functions]
|
||||||
L.Control.QueryableLayers = L.Control.Layers.extend({
|
L.Control.QueryableLayers = L.Control.Layers.extend({
|
||||||
|
|
||||||
// changes to leaflet behaviour
|
|
||||||
_initLayout: function () {
|
|
||||||
this._container = L.DomUtil.create('div', 'leaflet-control-layers');
|
|
||||||
L.DomEvent.disableClickPropagation(this._container); // change to Leaflet: always disable click propagation
|
|
||||||
|
|
||||||
this._form = L.DomUtil.create('form', 'leaflet-control-layers-list');
|
|
||||||
|
|
||||||
if (this.options.collapsed) {
|
|
||||||
L.DomEvent.addListener(this._container, 'mouseover', this._expand, this);
|
|
||||||
L.DomEvent.addListener(this._container, 'mouseout', this._collapse, this);
|
|
||||||
|
|
||||||
var link = this._layersLink = L.DomUtil.create('a', 'leaflet-control-layers-toggle');
|
|
||||||
link.href = '#';
|
|
||||||
link.title = 'Layers';
|
|
||||||
|
|
||||||
if (L.Browser.touch) {
|
|
||||||
L.DomEvent.addListener(link, 'click', this._expand, this);
|
|
||||||
L.DomEvent.disableClickPropagation(link); // change to Leaflet: disable click propagation
|
|
||||||
} else {
|
|
||||||
L.DomEvent.addListener(link, 'focus', this._expand, this);
|
|
||||||
}
|
|
||||||
this._map.on('movestart', this._collapse, this);
|
|
||||||
// TODO keyboard accessibility
|
|
||||||
|
|
||||||
this._container.appendChild(link);
|
|
||||||
} else {
|
|
||||||
this._expand();
|
|
||||||
}
|
|
||||||
|
|
||||||
this._baseLayersList = L.DomUtil.create('div', 'leaflet-control-layers-base', this._form);
|
|
||||||
this._separator = L.DomUtil.create('div', 'leaflet-control-layers-separator', this._form);
|
|
||||||
this._overlaysList = L.DomUtil.create('div', 'leaflet-control-layers-overlays', this._form);
|
|
||||||
|
|
||||||
this._container.appendChild(this._form);
|
|
||||||
},
|
|
||||||
|
|
||||||
// new query functionality
|
// new query functionality
|
||||||
getActiveLayerName: function () {
|
getActiveLayerName: function () {
|
||||||
var i, input, obj,
|
var i, input, obj,
|
||||||
|
@ -28,7 +28,7 @@ OSRM.init = function() {
|
|||||||
OSRM.GUI.init();
|
OSRM.GUI.init();
|
||||||
OSRM.Map.init();
|
OSRM.Map.init();
|
||||||
OSRM.Printing.init();
|
OSRM.Printing.init();
|
||||||
// OSRM.Routing.init();
|
OSRM.Routing.init();
|
||||||
// OSRM.RoutingAlternatives.init();
|
// OSRM.RoutingAlternatives.init();
|
||||||
OSRM.Localization.init();
|
OSRM.Localization.init();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user