mapserver/static/js/map/SearchControl.js

19 lines
491 B
JavaScript
Raw Normal View History

2019-08-29 11:28:52 +03:00
import SearchMenu from '../search/SearchMenu.js';
import SearchInput from '../search/SearchInput.js';
2019-06-11 15:16:41 +03:00
export default L.Control.extend({
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');
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
});
return div;
}
});