Skip to content

Commit e38c948

Browse files
bhaskarvkjcheng5
authored andcommitted
Fixes #309 (#310)
1 parent fc22f96 commit e38c948

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

R/layers.R

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -551,18 +551,19 @@ addLabelOnlyMarkers = function(
551551
clusterId = NULL,
552552
data = getMapData(map)
553553
) {
554-
addMarkers(map = map, lng = lng, lat = lat, layerId = layerId,
555-
group = group,
556-
icon = makeIcon(iconUrl =
557-
system.file('htmlwidgets/lib/leaflet/images/1px.png',
558-
package='leaflet'),
559-
iconWidth = 1, iconHeight = 1),
560-
label = label,
561-
labelOptions = labelOptions,
562-
options = options,
563-
clusterOptions = clusterOptions,
564-
clusterId = clusterId,
565-
data = data)
554+
do.call(addMarkers, filterNULL(list(
555+
map = map, lng = lng, lat = lat, layerId = layerId,
556+
group = group,
557+
icon = makeIcon(
558+
iconUrl = system.file('htmlwidgets/lib/leaflet/images/1px.png', package='leaflet'),
559+
iconWidth = 1, iconHeight = 1),
560+
label = label,
561+
labelOptions = labelOptions,
562+
options = options,
563+
clusterOptions = clusterOptions,
564+
clusterId = clusterId,
565+
data = data
566+
)))
566567
}
567568

568569
#' Adds marker-cluster-plugin HTML dependency

0 commit comments

Comments
 (0)