/* * Leaflet Control Search v2.3.6 - 2017-08-29 * * Copyright 2017 Stefano Cudini * stefano.cudini@gmail.com * http://labs.easyblog.it/ * * Licensed under the MIT license. * * Demo: * http://labs.easyblog.it/maps/leaflet-search/ * * Source: * git@github.com:stefanocudini/leaflet-search.git * *//* Name Data passed Description Managed Events: search:locationfound {latlng, title, layer} fired after moved and show markerLocation search:expanded {} fired after control was expanded search:collapsed {} fired after control was collapsed Public methods: setLayer() L.LayerGroup() set layer search at runtime showAlert() 'Text message' show alert message searchText() 'Text searched' search text by external code*///TODO implement can do research on multiple sources layers and remote //TODO history: false, //show latest searches in tooltip //FIXME option condition problem {autoCollapse: true, markerLocation: true} not show location//FIXME option condition problem {autoCollapse: false }////TODO here insert function search inputText FIRST in _recordsCache keys and if not find results.. // run one of callbacks search(sourceData,jsonpUrl or options.layer) and run this.showTooltip////TODO change structure of _recordsCache// like this: _recordsCache = {