-
Notifications
You must be signed in to change notification settings - Fork 801
Open
Description
Describe the bug
If a FeatureLayer is created with FeatureLayerOptions that contains a pointToLayer method when one or more of the items in the layer is of type multilinestring, the _redraw method will throw an error when it tries to construct a LatLng object using an array of arrays.
The problem, here, is that instead of checking types and values, the _redraw method relies on the presence or absence of methods being defined to perform operations and then blindly sends what could be an invalid value to other places.
Reproduction
Something like this:
const options = {
url: <someUrl>,
options.pointToLayer = () => void
};
const layer = esri.featureLayer(options);
...
If a multilinestring happens to be one of the elements returned. It blows up from here:
| latLng(geojson.geometry.coordinates[1], geojson.geometry.coordinates[0]) |
Logs
No response
System Info
leaflet 1.8.0
esri-leaflet 3.0.8Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels