Closed patrickarlt closed 10 years ago
FeatureManager
will extend or encapsulate L.Grid
and manage the loading and filtering. Subclasses are responsible for implimenting method for adding. Subclasses can
Internally this class will listen for tileload
events and request more features from the Feature Layer process them and pass them off to the addFeatures
method. When visible features change from the result of changing time ranges or where clauses FeatureManager
will pass features that need to be hidden to the hideFeatures
method. Also passes the new list of visible features to the overrideFeatures
method for layers where clearing and redrawing is more efficent.
where
from
to
fields
token
setWhere
- sets the where
option and refreshes the layergetWhere
- returns the where
optionsetTimeRange
- sets the starting and ending time range and refreshes the layergetTimeRange
- returns the starting and ending time rangesetFields
- sets the fields
optiongetFields
- return the fields
optionquery
- query the feature service with latlng distance, bounds and an optional where clause. Callback will return an array of Feature
objectsFeatureLayer
will extend FeatureManager
and impliment its own client side index based on RBush to manage drawing features on the client side which will hide features on the tileunload
event from FeatureManager
addFeatures
- Adds the passed array of Feature
objects to the layerWrapper around Leaflet.markercluster
that clusters point features on the fly.
addFeatures
Wrapper around Leaflet.heat
that generates on the fly heatmaps from feautres. This is a non-interactive layer so pointer-events
should be set to none.
addFeatures
The biggest challenge right now is how to handle when time ranges and where clauses change and filtering the data down dynamically and making transitions smooth.
Next would be to figure out how to propagate events from things encapsulated classes like Leaflet.markercluster
up to the main class.
Ill be able to do more work on this post Dev Summit.
Done in beta 5.
Its becoming really clear to me that the current way
FeatureLayer
works is going to be unacceptably complicated very soon. There are a lot of features left to implement including...The main issue is there a lot of mixins that get included inside a larger class like L.GeoJSON which makes stuff get fairly complicated quickly. I want this to be more Leaflety and use inheritance.
Will keep this updated with what I find.