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

@ -3,12 +3,20 @@
<head> <head>
<title>LibreChargeMap - OSM Bliss</title> <title>LibreChargeMap - OSM Bliss</title>
<meta charset='utf-8'> <meta charset='utf-8'>
<meta property="og:type" content="website">
<meta property="og:title" content="LibreChargeMap - OSM Bliss">
<meta property="og:description" content="Carte mondiale visualisant les bornes de recharges pour véhicule électrique à partir des données OpenStreetMap.">
<meta property="og:image" content="https://libre-charge-map.cipherbliss.com/libre-charge-map_overview.jpg">
<meta property="og:image:width" content="3436">
<meta property="og:image:height" content="1086">
<meta <meta
name='viewport' name='viewport'
content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'> content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'>
<link <link
rel='stylesheet' rel='stylesheet'
href='styles/leaflet.css'/> href='styles/leaflet.css'/>
<link rel="stylesheet" href="https://unpkg.com/leaflet-geosearch@3.1.0/dist/geosearch.css"/>
<link <link
rel='stylesheet' rel='stylesheet'
href='styles/style.css'/> href='styles/style.css'/>
@ -168,11 +176,13 @@
</div> </div>
<script src='js/leaflet.js'></script> <script src='js/leaflet.js'></script>
<script src='js/jquery-3.2.1.min.js'></script> <script src='js/jquery-3.2.1.min.js'></script>
<script src="https://unpkg.com/leaflet-geosearch@3.1.0/dist/bundle.min.js"></script>
<script src='js/osmtogeojson.js'></script> <script src='js/osmtogeojson.js'></script>
<script <script
type='module' type='module'
src='js/main.js'></script> src='js/main.js'></script>
<script> <script>

View File

@ -5,7 +5,7 @@ const config = {
initialZoom : 12, initialZoom : 12,
tileServers:{ tileServers:{
osm : 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', 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', 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', stamen : 'https://a.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
transport : '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 let geojsondata
// serveurs de tuiles: https://wiki.openstreetmap.org/wiki/Tile_servers // serveurs de tuiles: https://wiki.openstreetmap.org/wiki/Tile_servers
// https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png // https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png
// https://a.tile.openstreetmap.fr/osmfr/{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) {
if (points) {
geojsondata = osmtogeojson(points) geojsondata = osmtogeojson(points)
}
// console.log('resultAsGeojson', geojsondata) // console.log('resultAsGeojson', geojsondata)
displayStatsFromGeoJson(geojsondata) displayStatsFromGeoJson(geojsondata)
@ -526,10 +526,6 @@ function getIconFromTags(tags) {
return iconFileName 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) { function toggleMinPower(showHighPower) {
console.log('toggle', showHighPower) console.log('toggle', showHighPower)
showHighPower = !showHighPower showHighPower = !showHighPower
@ -619,6 +615,7 @@ $(document).ready(function () {
refreshDisplay() refreshDisplay()
}) })
showActiveFilter(display_unknown_max_power_station, '#filterUnkown') showActiveFilter(display_unknown_max_power_station, '#filterUnkown')
}) })
function showActiveFilter(filterVariableName, selectorId) { function showActiveFilter(filterVariableName, selectorId) {

View File

@ -330,7 +330,7 @@ button {
.socket-counter { .socket-counter {
background: #dedede; background: #dedede;
margin-top: 1rem; margin-top: 1rem;
margin-left: -1rem; margin-left: -0.25rem;
border-radius: 1rem; border-radius: 1rem;
padding: 0.25rem; padding: 0.25rem;
} }
@ -378,3 +378,7 @@ button {
color: orange; color: orange;
/*background: #96b1ea;*/ /*background: #96b1ea;*/
} }
.leaflet-control-layers-toggle{
background-size:contain;
}