openwebrx-clone/htdocs/settings.js

27 lines
901 B
JavaScript
Raw Normal View History

$(function(){
$(".map-input").each(function(el) {
var $el = $(this);
var field_id = $el.attr("for");
var $lat = $('#' + field_id + '-lat');
var $lon = $('#' + field_id + '-lon');
$.getScript("https://maps.googleapis.com/maps/api/js?key=" + $el.data("key")).done(function(){
$el.css("height", "200px");
var lp = new locationPicker($el.get(0), {
lat: parseFloat($lat.val()),
lng: parseFloat($lon.val())
}, {
zoom: 7
});
google.maps.event.addListener(lp.map, 'idle', function(event){
var pos = lp.getMarkerPosition();
$lat.val(pos.lat);
$lon.val(pos.lng);
});
});
2020-05-10 18:18:42 +00:00
});
2020-05-10 20:42:09 +00:00
$(".sdrdevice").sdrdevice();
2021-02-08 22:29:24 +00:00
$(".imageupload").imageUpload();
2021-02-14 15:21:09 +00:00
$(".bookmarks").bookmarktable();
});