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

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

Post by Anonymous »

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

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post