Merge pull request #1617 from phl0/tileUrl

Use globally configured tile URL from DB options
pull/1619/head
Peter Goodhall 2022-09-23 17:26:22 +01:00 zatwierdzone przez GitHub
commit 442c8ff328
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 8 dodań i 7 usunięć

Wyświetl plik

@ -562,7 +562,7 @@ function newpath(latlng1, latlng2, locator1, locator2) {
var maidenhead = L.maidenheadqrb().addTo(map);
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmUrl='<?php echo $this->optionslib->get_option('option_map_tile_server');?>';
var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {minZoom: 1, maxZoom: 9, attribution: osmAttrib});
@ -615,7 +615,7 @@ function showActivatorsMap(call, count, grids) {
var maidenhead = new L.maidenheadactivators(grid_four).addTo(map);
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmUrl='<?php echo $this->optionslib->get_option('option_map_tile_server');?>';
var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {minZoom: 1, maxZoom: 9, attribution: osmAttrib});
@ -713,7 +713,7 @@ function getLookupResult() {
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/moment.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/tempusdominus-bootstrap-4.min.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js"></script>
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"></script>
<script type="text/javascript">
$(function () {
$('[data-toggle="tooltip"]').tooltip()
@ -744,7 +744,7 @@ function getLookupResult() {
<?php if ($this->uri->segment(1) == "map" && $this->uri->segment(2) == "") { ?>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js"></script>
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"></script>
<script type="text/javascript">
$(function () {
$('[data-toggle="tooltip"]').tooltip()
@ -775,7 +775,7 @@ function getLookupResult() {
<?php if ($this->uri->segment(1) == "" || $this->uri->segment(1) == "dashboard" ) { ?>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js"></script>
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"></script>
<script type="text/javascript">
$(function () {
$('[data-toggle="tooltip"]').tooltip()
@ -871,7 +871,7 @@ $(document).on('keypress',function(e) {
<?php if ($this->uri->segment(1) == "logbook" && $this->uri->segment(2) != "view") { ?>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/L.Maidenhead.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js"></script>
<script id="leafembed" type="text/javascript" src="<?php echo base_url();?>assets/js/leaflet/leafembed.js" tileUrl="<?php echo $this->optionslib->get_option('option_map_tile_server');?>"></script>
<script type="text/javascript">
$(function () {
$('[data-toggle="tooltip"]').tooltip()

Wyświetl plik

@ -10,6 +10,8 @@ var greenIcon = L.icon({
iconSize: [10, 10], // size of the icon
});
var osmUrl = $('#leafembed').attr("tileUrl");
function initmap(ShowGrid = 'No', MapTag = 'map') {
// set up AJAX request
ajaxRequest=getXmlHttpObject();
@ -22,7 +24,6 @@ function initmap(ShowGrid = 'No', MapTag = 'map') {
map = new L.Map(MapTag);
// create the tile layer with correct attribution
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});