Delete not needed ajax stuff and debug output
这个提交包含在:
父节点
ea6e7f20f6
当前提交
9846a19617
共有 2 个文件被更改,包括 16 次插入 和 25 次删除
|
|
@ -589,39 +589,31 @@ function showActivatorsMap(call, count, grids) {
|
|||
|
||||
let re = /,/g;
|
||||
grids = grids.replace(re, ', ');
|
||||
$.ajax({
|
||||
url: base_url+'index.php/qrbcalc/calculate',
|
||||
type: 'post',
|
||||
data: {'grids': "test"},
|
||||
success: function (html) {
|
||||
|
||||
var result = "Callsign: "+call+"<br />";
|
||||
result += "Count: "+count+"<br/>";
|
||||
result += "Grids: "+grids+"<br/><br />";
|
||||
var result = "Callsign: "+call+"<br />";
|
||||
result += "Count: "+count+"<br/>";
|
||||
result += "Grids: "+grids+"<br/><br />";
|
||||
|
||||
$(".activatorsmapResult").html(result);
|
||||
$(".activatorsmapResult").html(result);
|
||||
|
||||
// If map is already initialized
|
||||
var container = L.DomUtil.get('mapactivators');
|
||||
// If map is already initialized
|
||||
var container = L.DomUtil.get('mapactivators');
|
||||
|
||||
if(container != null){
|
||||
container._leaflet_id = null;
|
||||
}
|
||||
if(container != null){
|
||||
container._leaflet_id = null;
|
||||
}
|
||||
|
||||
const map = new L.map('mapactivators').setView([30, 0], 1.5);
|
||||
const map = new L.map('mapactivators').setView([30, 0], 1.5);
|
||||
|
||||
var grid_four = grids.split(', ');
|
||||
var grid_four = grids.split(', ');
|
||||
|
||||
var maidenhead = new L.maidenheadactivators(grid_four).addTo(map);
|
||||
var maidenhead = new L.maidenheadactivators(grid_four).addTo(map);
|
||||
|
||||
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
|
||||
var osm = new L.TileLayer(osmUrl, {minZoom: 1, maxZoom: 9, attribution: osmAttrib});
|
||||
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
|
||||
var osm = new L.TileLayer(osmUrl, {minZoom: 1, maxZoom: 9, attribution: osmAttrib});
|
||||
|
||||
map.addLayer(osm);
|
||||
|
||||
}
|
||||
});
|
||||
map.addLayer(osm);
|
||||
}
|
||||
|
||||
// This displays the dialog with the form and it's where the resulttable is displayed
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ L.MaidenheadActivators = L.LayerGroup.extend({
|
|||
if(grid_four.includes(this._getLocator(lon,lat,map))) {
|
||||
this.addLayer(L.rectangle(bounds, {className: 'grid-rectangle grid-confirmed', color: 'rgba(144,238,144, 0.6)', weight: 1, fillOpacity: 1, fill:true, interactive: false}));
|
||||
}
|
||||
console.log('Zoom: '+zoom);
|
||||
|
||||
if (zoom < 2 || zoom > 4) {
|
||||
this.addLayer(this._getLabel(lon+unit-(unit/lcor),lat+(unit/2)+(unit/lcor*c), map));
|
||||
|
|
|
|||
正在加载…
在新工单中引用