opengraph image, icon on menu

This commit is contained in:
Tykayn 2024-12-23 00:02:46 +01:00 committed by tykayn
parent 0d940850b5
commit f92721131b
4 changed files with 41 additions and 30 deletions

View file

@ -5,7 +5,7 @@ const config = {
initialZoom : 12,
tileServers:{
osm : 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
cycle : 'https://{s}.tile.opencyclemap.org/{z}/{x}/{y}.png',
cycle : 'https://{s}.tile.thunderforest.org/{z}/{x}/{y}.png',
cartodb : 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png',
stamen : 'https://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
transport : 'https://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png'

View file

@ -12,8 +12,6 @@ console.log('config', config)
let geojsondata
// serveurs de tuiles: https://wiki.openstreetmap.org/wiki/Tile_servers
// https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png
// https://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png
@ -318,10 +316,12 @@ function bindEventsOnJosmRemote() {
}
function displayPointsFromApi(points = geojsondata) {
function displayPointsFromApi(points) {
geojsondata = osmtogeojson(points)
if (points) {
geojsondata = osmtogeojson(points)
}
// console.log('resultAsGeojson', geojsondata)
displayStatsFromGeoJson(geojsondata)
@ -475,7 +475,7 @@ function eachFeature(feature, layer) {
})
if (!outPowerGuessed) {
circle_center.bindTooltip("?" , {
circle_center.bindTooltip("?", {
permanent: true,
className: "my-label",
offset: [0, 0]
@ -526,10 +526,6 @@ function getIconFromTags(tags) {
return iconFileName
}
// $('#toggleMinPower_50').on('click', toggleMinPower(50))
// $('#toggleMinPower_100').on('click', toggleMinPower(100))
// document.getElementById('toggleMinPower_300').addEventListener('click', toggleMinPower(showHighPower))
function toggleMinPower(showHighPower) {
console.log('toggle', showHighPower)
showHighPower = !showHighPower
@ -619,6 +615,7 @@ $(document).ready(function () {
refreshDisplay()
})
showActiveFilter(display_unknown_max_power_station, '#filterUnkown')
})
function showActiveFilter(filterVariableName, selectorId) {