addLabelgun {leaflet.extras2} | R Documentation |
Add addLabelgun Plugin
Description
The plugin allows to avoid cluttering in marker labels and gives priority to labels of your choice (with higher weight).
Usage
addLabelgun(map, group = NULL, weight = NULL, entries = NULL)
Arguments
map |
A map widget object created from |
group |
The group name of the layer/s for which label collisions are
to be avoided.
To see the effects of this plugin the |
weight |
An optional weight for markers. If a vector is given, the length should match the number of all markers in the corresponding groups. If a numeric value is specified, it is used for each marker and thus no prioritization of the labels takes place. In all other cases a random integer is calculated. |
entries |
A numeric value, a higher value relates to faster insertion and slower search, and vice versa. The default is 10 |
Value
A leaflet map object
Note
It is important to invoke the function after the markers have been added to the map. Otherwise nothing will happen.
References
https://github.com/Geovation/labelgun