2019-08-29 11:28:52 +03:00
|
|
|
import SearchMenu from '../search/SearchMenu.js';
|
|
|
|
import SearchInput from '../search/SearchInput.js';
|
2019-04-14 20:17:43 +03:00
|
|
|
|
2019-06-11 15:16:41 +03:00
|
|
|
export default L.Control.extend({
|
2019-04-14 20:17:43 +03:00
|
|
|
initialize: function(wsChannel, opts) {
|
|
|
|
L.Control.prototype.initialize.call(this, opts);
|
|
|
|
},
|
|
|
|
|
2019-04-20 18:59:22 +03:00
|
|
|
onAdd: function(map) {
|
2019-04-14 20:51:31 +03:00
|
|
|
var div = L.DomUtil.create('div');
|
2019-04-14 20:17:43 +03:00
|
|
|
m.mount(div, SearchInput);
|
2019-04-20 18:59:22 +03:00
|
|
|
m.mount(document.getElementById("search-content"), {
|
2019-06-11 16:01:16 +03:00
|
|
|
view: () => m(SearchMenu, {map: map})
|
2019-04-20 18:59:22 +03:00
|
|
|
});
|
2019-04-14 20:17:43 +03:00
|
|
|
|
|
|
|
return div;
|
|
|
|
}
|
|
|
|
});
|