You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a time-based layerGroup with several feature layers from https://wildfire.cr.usgs.gov/arcgis/rest/services/geomac_dyn/MapServer. Whenever the date range is updated by the user I want to only show features within that time range based on datetime properties of the features themselves. Upon adding the layer and changing date ranges the features loaded properly, but when zooming or panning on the map, all features in a given feature layer would then be added to the map. The images below show what the view looked like before and after zooming.
I found in my testing that the createLayers function did not check to see if the feature was within the set time range. By slightly altering the code to match the if statement later in the same function I was able to get the layers to function as I wanted.
The text was updated successfully, but these errors were encountered:
I hadn't realized before, but I also added the same code into the if statement of the addLayers function of the Feature Management Methods to get the featureLayers to function properly. Basically just adding a check for the time range before any feature is added to the map.
Browser and version: Chrome Version 75.0.3770.100
Version of Leaflet (
L.version
): 1.3.4Version of esri Leaflet (
L.esri.VERSION
): 2.0.8Description:
I am creating a time-based layerGroup with several feature layers from https://wildfire.cr.usgs.gov/arcgis/rest/services/geomac_dyn/MapServer. Whenever the date range is updated by the user I want to only show features within that time range based on datetime properties of the features themselves. Upon adding the layer and changing date ranges the features loaded properly, but when zooming or panning on the map, all features in a given feature layer would then be added to the map. The images below show what the view looked like before and after zooming.
I found in my testing that the
createLayers
function did not check to see if the feature was within the set time range. By slightly altering the code to match the if statement later in the same function I was able to get the layers to function as I wanted.The text was updated successfully, but these errors were encountered: