Commit Graph

119 Commits

Author SHA1 Message Date
ahocevar
97d38820fb Removing no longer used getFeatureWithUid method 2013-11-09 14:44:40 +01:00
ahocevar
9fca2c407d Add a getFeatures method on the vector layer 2013-11-09 14:15:35 +01:00
ahocevar
7cf636147b Call setRenderIntent on the feature, not the layer 2013-11-09 14:15:35 +01:00
Paul Spencer
bada596b45 Add default stability level to docs of exported things. 2013-10-24 18:20:24 -04:00
Tim Schaub
67fab12fef Listen for feature events and fire layer events 2013-10-03 15:51:00 -06:00
Tim Schaub
42115baabb Merge pull request #1092 from tschaub/vector-event
Extend goog.events.Event for custom vector layer events.
2013-10-03 11:23:39 -07:00
ahocevar
41e7a6a059 Marking sort function private 2013-10-03 12:02:29 -06:00
Tim Schaub
64dd5cfc1f Extend goog.events.Event for custom vector layer events
Vector events include features and extents.  In the case of feature change events, the extents array will include old and new extents for features with modified geometries.w
2013-10-03 11:25:30 -06:00
ahocevar
87e755e9e4 Sort symbolizer groups by zIndex
Now rendering order can be controlled by setting the zIndex
symbolizer property.
2013-10-03 09:37:08 -06:00
Tim Schaub
97b56add70 Unique event type value for this target
The goog.events.EventType.CHANGE type is already dispatched because layers are ol.Object instances.  To allow people to register for vector layer specific events without also having listeners get called with more general ol.Object change events, we need to give the types unique values.
2013-10-03 09:20:51 -06:00
ahocevar
dbb9525515 No longer group features by geometry type
With symbolizer literals now being geometry type specific, we no
longer need the overhead to query the RTree separately for each
geometry type and render symbolizer groups by geometry type.

The geometry type index of the FeatureCache is no longer needed.

The filtering functionality of the FeatureCache's
getFeaturesObject method can be removed because it is no longer
used.
2013-10-03 08:35:11 -06:00
Tim Schaub
0b5058f72e Remove shared vertex handling from vector layer 2013-09-27 23:18:34 +01:00
Tim Schaub
bbef15e50e Consider resolution when applying rules 2013-09-27 11:46:48 +02:00
Tim Schaub
3b20cc7b53 Rename ol.Projection to ol.proj.Projection 2013-09-15 22:01:56 -06:00
Tim Schaub
e806f51b3d Changing extent structure back to single array: [minX, minY, maxX, maxY]
This means we'll have to have a new structure and new methods for 3D envelopes.
2013-09-15 00:31:32 -06:00
Tim Schaub
511e5ad5e8 Vector layer updates for new extent structure 2013-09-14 21:13:46 -06:00
Tim Schaub
13a937fad7 Lazily create default style 2013-09-07 09:19:11 -06:00
ahocevar
83720975f8 More specific INTENTCHANGE instead of SYMBOLIZER event 2013-08-30 12:10:55 +02:00
ahocevar
e5b095bfdf Simplifying setRenderIntent API for bulk changing all features 2013-08-29 16:50:53 +02:00
ahocevar
56c228d009 Removing option for temporary layer
Instead, adding setter and getter for a private temp_ property,
as suggested by @elemoine.
2013-08-29 16:50:52 +02:00
ahocevar
3a50a754aa Implementing renderIntent handling 2013-08-29 16:50:52 +02:00
ahocevar
14b69d15f1 One selection layer per source layer
This way all styles can be defined on the source layer, by
defining a rule with a select renderIntent. It also will make
addition and removal of layers easier while the select control
is active.
2013-08-29 16:50:52 +02:00
ahocevar
760694582e Adding missing @requires 2013-08-29 16:50:52 +02:00
ahocevar
fdd79a385a Making JSDoc happy 2013-08-29 16:50:51 +02:00
ahocevar
871388d2c0 Adding selection layer and implementing basic click selection 2013-08-29 16:50:50 +02:00
Éric Lemoine
3deeaa21c7 ol.layer.Vector pass original options to parent
This makes it possible to pass arbitrary property to ol.layer.Vector and use layer.get('property_name') to get the value of properties.
2013-08-28 14:13:37 +02:00
Tim Schaub
a5991aee03 Remove applyDefaultStyle method 2013-08-15 10:37:18 -04:00
Tim Schaub
a670e225cd Clearer naming of method to create symbolizer literals 2013-08-15 10:37:18 -04:00
Tim Schaub
d5d0262b4c Create literal with feature or geometry type 2013-08-15 10:37:18 -04:00
Tim Schaub
c36ceab2a0 Separate stroke and fill 2013-08-15 10:37:18 -04:00
Tim Schaub
90fb37c220 Rename ol.style.SymbolizerLiteral to ol.style.Literal 2013-08-15 10:37:18 -04:00
Bruno Binet
3ecb5b89ff Create a custom event type for vector layers
Vector layers will now dispatch ol.layer.VectorLayerEventType.ADD and
ol.layer.VectorLayerEventType.REMOVE event types instead of the generic
goog.events.EventType.CHANGE event type.
This will fix a maximum call stack size exceeded javascript error.
2013-08-13 12:27:38 +02:00
ahocevar
9578da0cfb Renaming readFeaturesWithMetadata* back to readFeatures*
Since this is not exported and we do not have a counterpart that
does not return the metadata, it should be fine to use a shorter
name.
2013-08-04 15:10:11 +02:00
ahocevar
109ec71877 Using single argument for callback and string for projection
This makes the asynchronous and synchronous versions of
readFeatures work with the same data structures, and leaves
projection handling outside the parsers.
2013-08-04 15:10:09 +02:00
Bart van den Eijnden
7b31ec26ea fix up build 2013-08-04 15:10:08 +02:00
ahocevar
0168c2e46f Better interface for passing projection and other metadata 2013-08-04 15:10:08 +02:00
ahocevar
55697dea28 getProjection method on parsers
With this, vector sources/layers do not need to make
assumptions on the data projection.
2013-08-04 15:10:08 +02:00
ahocevar
ac67c10acd Add and remove features with meaningful events
This adds a removeFeatures method, and makes the CHANGE event
more useful by adding information about changed features and
extent.
2013-07-19 14:07:15 +02:00
ahocevar
9095032014 Removing unused methods and changing getFeaturesObjectForExtent
With this change, getFeaturesObjectForExtent may return null if
the source does not have data loaded for the provided extent.
A callback can be passed to getFeaturesObjectForExtent to get
notified when the requested data is available.
2013-07-17 11:28:48 +02:00
Tim Schaub
1eaf82ead5 Enum for checking built-in lib functions internally 2013-06-25 12:15:34 -06:00
Tim Schaub
2577d3f7d6 Rename ol.expression to ol.expr 2013-06-25 12:15:34 -06:00
Tim Schaub
b04a36ede7 Replace use of filter with expressions
The canvas vector layer still has the (API candidate) `getFeatures` method that accepts an arbitrary expression (was filter).  This, and the `getFeaturesObject` method under it are only used in the tests.  The rendering code that was using filters is now calling `layer.getFeaturesObjectForExtent` with an explicit extent and optional geometry type.
2013-06-25 12:15:33 -06:00
Tim Schaub
91a8703852 Correct typo in geometry type (thanks @jystic)
Previously read 'multilinstring' instead of 'multilinestring'.  Letting the compiler check for typos instead now.
2013-06-20 17:57:29 -06:00
ahocevar
cb9f4972df Use 'text' instead of 'name' for the label text 2013-06-19 22:10:44 +02:00
ahocevar
c17424deec Basic support for text symbolizers
This adds basic label rendering for points and polygons to the
canvas renderer, and a text symbolizer to the style package.
2013-06-19 22:01:51 +02:00
ahocevar
3a6c7cf204 Renaming featureInfoFunction to transformFeatureInfo 2013-06-07 15:34:13 +02:00
ahocevar
77d22c4038 getFeatures method and featureInfo templates
To avoid surprises for application developers, this change
creates a new getFeatures method. So it is clear now beforehand
whether features or feature info markup is returned. The result
is now also grouped by layer, so application developers always
have a link between a layer and the feature info it returns.

To make getFeatureInfo return markup for vector layers, this
change also adds a featureInfoFunction property to the vector
layer, which gives developers full control over how features are
rendered to feature info markup.
2013-06-07 15:34:13 +02:00
Tom Payne
46553c719c Rename ol.projection to ol.proj 2013-05-30 18:55:58 +02:00
ahocevar
10e3a16f40 RTree API improvements and more tests
This change reverts the RTree API back to the original one (i.e.
insert() instead of put(), search() instead of find()), and
creates a new searchReturningObject() method that returns an
object keyed by UIDs.

It also adds missing tests for type restricted search and
searchReturningObject().
2013-05-22 18:25:40 -05:00
ahocevar
2ff2e85fbb Only query RTree if requested geometryType is used 2013-05-19 11:16:02 +02:00