Initial work on overpass based query API
This commit is contained in:
parent
0de6885a91
commit
078059b76b
10 changed files with 346 additions and 12 deletions
19
app/assets/javascripts/leaflet.query.js
Normal file
19
app/assets/javascripts/leaflet.query.js
Normal file
|
@ -0,0 +1,19 @@
|
|||
L.OSM.query = function (options) {
|
||||
var control = L.control(options);
|
||||
|
||||
control.onAdd = function (map) {
|
||||
var $container = $('<div>')
|
||||
.attr('class', 'control-query');
|
||||
|
||||
var link = $('<a>')
|
||||
.attr('class', 'control-button')
|
||||
.attr('href', '#')
|
||||
.attr('data-original-title', I18n.t('javascripts.site.queryfeature_tooltip'))
|
||||
.html('<span class="icon query"></span>')
|
||||
.appendTo($container);
|
||||
|
||||
return $container[0];
|
||||
};
|
||||
|
||||
return control;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue