Skip to content

Commit

Permalink
ensure options are properly set for layer. addresses #31
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Appelhans committed Apr 17, 2024
1 parent 38f40ee commit 805d96f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions inst/htmlwidgets/lib/FlatGeoBuf/fgb.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,19 @@ LeafletWidget.methods.addFlatGeoBuf = function (layerId,
});
}

lyr = L.geoJSON(result.value, {
pointToLayer: function (feature, latlng) {
lyr = L.geoJSON(result.value, Object.assign(
{
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, options);
},
style: function(feature) {
return updateStyle(style, feature, scale, scaleFields);
},
onEachFeature: pop,
pane: pane
},
style: function(feature) {
return updateStyle(style, feature, scale, scaleFields);
},
onEachFeature: pop,
pane: pane
});
options)
);

if (label) {
if (Object.keys(result.value.properties).includes(label)) {
Expand Down

0 comments on commit 805d96f

Please sign in to comment.