Updated Use Cases (markdown)

tschaub
2013-03-23 13:06:32 -07:00
parent f01d0ab77d
commit 45e47eff9d

@@ -32,7 +32,7 @@ var map = new ol.Map({
});
```
This alternative can be implemented if the layer knows the map projection. The vector layer is responsible for calling `source.protocol.read({success: callback})` where the callback calls `source.parser.parseFeatures(data, {projection: projection})` (`data` is supplied to the callback and `projection` comes from the map's view). The layer maintains a cache of features in the map view's projection, and these are on demand to layer's the renderer.
This alternative can be implemented if the layer knows the map projection. The vector layer is responsible for calling `source.protocol.read({success: callback})` where the callback calls `source.parser.parseFeatures(data, {projection: projection})` (`data` is supplied to the callback and `projection` comes from the map's view). The layer maintains a cache of features in the map view's projection, and these are supplied on demand to layer's the renderer.
### Generate features in app and add to a layer
@@ -82,8 +82,8 @@ User has a service that provides vector features for requests with an arbitrary
```js
var vector = new ol.layer.WFS({
featureNS: 'http://opengeo.org/#osm'
featureType: 'roads'
namespace: 'http://example.org/#osm'
type: 'roads'
});
var map = new ol.Map({