So modifizieren Sie die Skala -Balken -Schriftgröße in der Blattkarte

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: So modifizieren Sie die Skala -Balken -Schriftgröße in der Blattkarte

by Anonymous » 17 Apr 2025, 23:37

Wie kann die Schriftart des Maßstabs in der Flugblatt modifiziert werden? Beispiel unten von dem, was ich ohne Erfolg versucht habe: < /p>

Code: Select all

 library(leaflet)
library(htmltools)

# Create a basic Leaflet map
map %
addTiles() %>%
setView(lng = -121.2722, lat = 38.1341, zoom = 10)

# Add a scale bar to the map
map %
addScaleBar() %>%
onRender("
function(el, x) {
var map = this;
L.control.scale({
position: 'bottomleft',
imperial: false,
onRender: function(options) {
var scaleContainer = this._container;
scaleContainer.style.fontSize = '30px' !important;
}
}).addTo(map);
}
")
map

Top