Updated Use Cases (markdown)

twpayne
2013-03-23 12:13:51 -07:00
parent 415e8cbf3e
commit 9c5d3cf13d

@@ -99,3 +99,15 @@ var map = new ol.Map({
```
This alternative can be implemented if the layer knows about the map. The WFS layer creates a WFS protocol, a GML parser, a BBOX strategy by default. The layer creates a vector source with the protocol and the parser (these are the two things associated with the data source). The bbox strategy listens for changes in map extent. When the previous data bounds become invalid, the bbox strategy notifies the layer that new data is needed, and the layer calls `source.protocol.read({success: callback})`. The provided callback would call `source.parser.readFeatures(data, {projection: projection})` with the provided data and the map view's projection. The resulting features would replace the existing features (or new ones would be added and features outside the data bounds would be removed).
### Edit existing features and synchronize them with a server
The user loads a vector layer with a very large number of features. He then modifies a few of them, and saves the modified features back to the server. The feature currently being edited should be on top, and the system should maintain good performance even if the underlying layer contains a very large number of features. Only the modified features should be sent back to the server. Example case: editing OSM building outlines.
### Pure vector layers
Some data are represented most compactly as vector features. It should be possible to include them as first-class layers. Example: overlaying roads on satellite imagery.
### Markers and labels maintain orientation even when the map is rotated
Map rotation is useful, for example so that "up" corresponds to the direction in which the user is moving. However, labels and markers should not rotate with the map, and should instead always be aligned horizontally.