Closed timelyportfolio closed 7 years ago
Sorry been away on academic duty from my past. I will test this tomorrow and report back
@timelyportfolio this works as expected. Regarding the label position, I think we should change both offset
and position
, my favorite would be to have them on top of the features. What do you think?
Thanks for testing and more importantly the idea. I hope to have something up within an hour.labelOptions
are not accessible with addFeatures
, so I will need to determine a different strategy for changing the offset.
They should be accessible... Are you sure?
leaflet() %>%
addTiles() %>%
addFeatures(franconia, label = as.character(franconia$district),
labelOptions = labelOptions(direction = "top",
offset = c(0, -40)))
works for me
@tim-salabim, struck through my oversight nearly immediately, but chatting over github issues has some latency :) Working on optimizing position for different types of features.
@tim-salabim if you are still on, does offset
work for you?
I cannot get it to have any impact when using with direction="top"
.
yes it does, the -40
in the example above means it is placed above the mouse cursor
✔️ Since the default is 12,-15
I was not using enough to provide easily seen visual change. I think top
with 0,40
is good, but on points doesn't look good. Not sure it is worth burning a lot of time trying to perfect.
I agree, this is a minor aesthetic issue
Ok, then I just added a NEWS item, so I think it should be ready to push the button.
53
selectFeatures
editFeatures
In
editFeatures
, the label will partially cover theLeaflet.draw
instructions. Should we change theoffset
ordirection
withlabelOptions
?