R Leaflet map - addPolygon geography marks

I work with the card of the booklet R, on this card there are census sections, each of which is associated with a number. Is it possible for the labels to be displayed on the map, either when scrolling, or using the level control switches.

Labels are already in the form files:

map1<-leaflet()%>%
  addTiles()%>%

addPolygons(data = plotMerge,
          fillColor = ~pal(plotMerge$incomePerCapita),
          color = "#000000", #this is an outline color hoping to
          fillOpacity = 0.8, # add the labels inside this outline
          weight = 0.2,
          popup=popup)%>%
addLegend(pal = pal,
            values  = plotMerge$incomePerCapita,
            position = "bottomright",
            title = "State-wide Income Percentiles",
            labFormat = labelFormat(digits=1))

saveas(map1, "map1.html")
map1
+4
source share

All Articles