Skip to content

Commit

Permalink
maplibre#3102 use css
Browse files Browse the repository at this point in the history
  • Loading branch information
smellman committed May 19, 2024
1 parent 0cc84f6 commit c04562d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/css/maplibre-gl.css
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,10 @@
animation: maplibregl-spin 2s infinite linear;
}

.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-hidden {
display: none;
}

@media (-ms-high-contrast: active) {
.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon {
background-image: svg-inline(ctrl-geolocate-white);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/control/geolocate_control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ export class GeolocateControl extends Evented implements IControl {

// if showButton is false, don't add the button to the map
if (!this.options.showButton) {
this._geolocateButton.style.display = 'none';
this._geolocateButton.classList.add('maplibregl-ctrl-geolocate-hidden');
}

if (supported === false) {
Expand Down

0 comments on commit c04562d

Please sign in to comment.