-
Notifications
You must be signed in to change notification settings - Fork 799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FeatureLayer _redraw method throws error if defined for a multilinestring #1341
Comments
@mcalmus Can you give me a more detailed reproduction case here? I'm guessing your doing something like trying to convert a bunch of points to a multiline string on the fly which isn't really what this was intended to do but I can try to help if you provide a more detailed use case. |
We are using
There are several sets of layers available for the user to select from what is effectively a third-party service. Some of these layers have roads that include When it's included for one of these items,
|
@mcalmus I'm having a hard time finding a public layer service that has those types of items - do you have the URL to a public service that we can use to create a replication case to see the issue? Thanks! |
@mcalmus so you want to be able to do this:
And have it work? So we ignore |
Yes. That's the idea.
I'm not suggesting it should "ignore" |
Describe the bug
If a
FeatureLayer
is created withFeatureLayerOptions
that contains apointToLayer
method when one or more of the items in the layer is of typemultilinestring
, the_redraw
method will throw an error when it tries to construct aLatLng
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:
If a
multilinestring
happens to be one of the elements returned. It blows up from here:esri-leaflet/src/Layers/FeatureLayer/FeatureLayer.js
Line 402 in 7ee4b61
Logs
No response
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: