custom GPS button styling

This commit is contained in:
2026-04-20 14:38:14 +02:00
parent d3cfcbab25
commit 391cec07c8
2 changed files with 14 additions and 7 deletions

View File

@@ -167,16 +167,10 @@ var GpsControl = L.Control.extend({
onAdd: function () { onAdd: function () {
var container = L.DomUtil.create('div', 'leaflet-bar leaflet-control'); var container = L.DomUtil.create('div', 'leaflet-bar leaflet-control');
var button = L.DomUtil.create('a', '', container); var button = L.DomUtil.create('a', 'gps-control-button', container);
button.href = '#'; button.href = '#';
button.title = 'Mein Standort'; button.title = 'Mein Standort';
button.innerHTML = '<i class="fa-solid fa-location-crosshairs"></i>'; button.innerHTML = '<i class="fa-solid fa-location-crosshairs"></i>';
button.style.fontSize = '16px';
button.style.display = 'flex';
button.style.alignItems = 'center';
button.style.justifyContent = 'center';
button.style.width = '30px';
button.style.height = '30px';
L.DomEvent.on(button, 'click', function (e) { L.DomEvent.on(button, 'click', function (e) {
L.DomEvent.preventDefault(e); L.DomEvent.preventDefault(e);

View File

@@ -211,6 +211,19 @@ html, body {
} }
/* -----------------------------------------------------------------
GPS Control Button
----------------------------------------------------------------- */
.gps-control-button {
display: flex;
align-items: center;
justify-content: center;
width: 30px;
height: 30px;
font-size: 16px;
}
/* ----------------------------------------------------------------- /* -----------------------------------------------------------------
Sidebar Overrides Sidebar Overrides
----------------------------------------------------------------- */ ----------------------------------------------------------------- */