-
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
setTimeRange on a FeatureLayer doesn't works. #1148
Comments
Hi again, I found the "problem". I need to use the "timeField" option when i'm using the method setTimeRange. But when the from and to are used as an options, you don't need to use "timeField" option. If this can help someone. |
nice debugging! this happens because calling when you set the constructor option, we only ever fetch features that match the time filter, so we don't need to know the name of the field that stores the information. all that said, if anyone is keen to make this easier on the next guy or gal in @geocot's shoes, they could insert a console.warn in the block below to let them know that its only possible to manipulate a time filter if a esri-leaflet/src/Layers/FeatureLayer/FeatureManager.js Lines 53 to 55 in bcd44fb
|
Since @gavinr added a warning I'm closing this. |
Thanks for the cleanup @patrickarlt! |
Browser and version: Chrome 73.0.3683.86 and Firefox 66.0.2 (64 bits)
Version of Leaflet (
L.version
):Latest
L.esri.VERSION
):master
Steps to reproduce the error:
I'm using the from and to in the featurelayer option and everything work fine. But I'm trying to use the method setTimeRange with the same date that I used for the options and it doesn't work. I got thise error " FeatureManager.js:365 Uncaught TypeError: Cannot read property 'between' of undefined"
I was expecting: To filter my data by using the time range.
The text was updated successfully, but these errors were encountered: