Commit Graph

16 Commits

Author SHA1 Message Date
Tim Schaub
1072f6dfa7 Use style option in vector layer examples
Providing a styleFunction option still works because the layer property is still named styleFunction.
2014-02-13 10:25:16 -07:00
Tom Payne
a58aa0a40d Use string instead of ol.RendererHint enum in examples 2014-02-06 22:33:25 +01:00
Frederic Junod
ff4b85811d Minor draw-features cleanup 2014-01-22 14:12:32 +01:00
oterral
1333c733e0 Fix drawinteraction example 2014-01-21 15:58:42 +01:00
Tom Payne
7ce7bb2187 Merge remote-tracking branch 'openlayers/master' into vector-api 2014-01-09 11:42:14 +01:00
oterral
e3810b5027 Add draw features example 2014-01-08 16:40:14 +01:00
Bart van den Eijnden
78d20056f5 update all the other examples that used MapQuest 2014-01-08 13:36:35 +01:00
Tim Schaub
8cc4ae8dbd Separate load requests from feature requests
This separates the action of requesting an extent to be loaded from the action of requesting cached features.  The renderer (or any other consumer of a vector source) calls load to request a data extent.  A `featureload` event fires when new features are loaded.  The renderer (or any other consumer) separately asks for cached features given an extent.  This vector source only loads features once, but this separation will also work with sources that make multiple requests for data in different extents.

This also removes the `data` option from the vector source in favor of a `features` option.  Since we no longer have shared data structures for geometries, people can manually create features and pass them to a vector source.  The `addFeatures` method is exported as well.  This is used to add features to a source that don't have a representation on the "remote" (or server).
2013-11-27 12:22:32 -07:00
Tom Payne
4e65fefc00 Move vector code out of the way 2013-11-20 11:39:21 +01:00
Tim Schaub
5a898884ec Use geometry type enum for configuring draw interaction
This allows us to cast single-part geometries to multi-part types before adding features to the target layer.  This doesn't yet allow for drawing multi-part geometries with multiple parts.  That can be handled separately.
2013-11-12 11:51:41 -07:00
Tim Schaub
8194ba9f0a Remove setMode method from interaction in favor of add/removeInteraction
This makes the example a bit more awkward, but eventually adding and removing interactions will be the job of an editing control.
2013-11-12 10:30:37 -07:00
Tim Schaub
dbcfdbc76f Updated style for draw example 2013-11-12 10:30:37 -07:00
Tim Schaub
2f07433593 Allow user to set drawing mode 2013-11-12 10:30:37 -07:00
Tim Schaub
048dec1644 Updated sketch style 2013-11-12 10:30:36 -07:00
Tim Schaub
d821f227ba Add point at head of drawing 2013-11-12 10:29:29 -07:00
Tim Schaub
b3487ad30e Draw interaction 2013-11-12 10:29:21 -07:00