Commit Graph

3328 Commits

Author SHA1 Message Date
ahocevar
c6e61e2d23 Dynamic layers and lazy selection layer creation
With this change, the user provides a filter function instead of
an array of layers. Selection layers are created lazily, and
addition/removal of layers is not handled by the control to give
the user more options, as suggested by @elemoine.
2013-08-29 16:50:53 +02:00
ahocevar
a417b75c1f Simplifying layer mapping
By making selectionLayer an object keyed by source layer UIDs,
we save some indexOf lookups.
2013-08-29 16:50:53 +02:00
ahocevar
d5c0fdd557 Removing addressed TODOs 2013-08-29 16:50:53 +02:00
ahocevar
0391a028c5 Adding layer visibility/addition/removal handling
The Select control creates a selection layer for each layer it
is configured with. When a configured layer is removed from the
map, the selection layer will be made invisible. For configured
layers on the map, the 'visible' property of the selection layer
is bound to the configured layer.
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
4f2d37b6a3 New ThisIdentifier expression
This allows member expressions to use the 'this' keyword.
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
f05629b3c3 Work with clones rather than the original features 2013-08-29 16:50:51 +02:00
ahocevar
fdd79a385a Making JSDoc happy 2013-08-29 16:50:51 +02:00
ahocevar
d7e277d0f5 Adding exports 2013-08-29 16:50:51 +02:00
ahocevar
414f4828d6 Making Travis happy 2013-08-29 16:50:51 +02:00
ahocevar
3d22ec4ca8 Simplifying clear/append detection 2013-08-29 16:50:51 +02:00
ahocevar
b06526781c Adding change event 2013-08-29 16:50:51 +02:00
ahocevar
6be1ab80d2 Require layers 2013-08-29 16:50:50 +02:00
ahocevar
19a00bbe27 Making the control's button work 2013-08-29 16:50:50 +02:00
ahocevar
871388d2c0 Adding selection layer and implementing basic click selection 2013-08-29 16:50:50 +02:00
ahocevar
e2526621d1 Select example and skeleton with event listeners 2013-08-29 16:50:50 +02:00
Éric Lemoine
561581cf8b Move exports file for proj 2013-08-29 15:38:00 +02:00
Éric Lemoine
a86ea051bf Move and rename exports file for ol.expr 2013-08-29 15:24:52 +02:00
Éric Lemoine
0c091e868c ol.Feature.prototype.get need not be exported
get is not overridden in ol.Feature.prototype, so there's no need for a specific export.
2013-08-29 14:05:25 +02:00
Frédéric Junod
7298cbd119 Merge pull request #926 from fredj/mapbrowserevent_clanup
ol.MapBrowserEvent cleanup
2013-08-28 22:08:34 -07:00
Tim Schaub
7cac81857d Merge pull request #936 from tschaub/geom-exports
Proper geometry exports.
2013-08-28 11:40:14 -07:00
Éric Lemoine
e93383c859 Merge pull request #934 from elemoine/vector-layer
ol.layer.Vector pass original options to parent
2013-08-28 10:19:45 -07:00
Tim Schaub
9ef439ba23 Exports for specific geometry types 2013-08-28 10:41:07 -06: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
Frederic Junod
d091cfd508 Move focus_ position update into handleMapBrowserEvent
Otherwise, the position is only updated on keyboard or mouse wheel events.
2013-08-28 12:39:25 +02:00
Frederic Junod
ecf953a125 Remove pressed_ variable and rely on down_ to check if a mouse button is pressed 2013-08-28 11:28:50 +02:00
Éric Lemoine
c608e15943 Merge pull request #929 from elemoine/collectionevent
Add ol.CollectionEvent#getElement
2013-08-28 02:16:57 -07:00
Frederic Junod
dc5b209f7f Change previous_ local variable type to boolean
And rename it to pressed_ for clarity; the variable represents whether
the mouse button is pressed
2013-08-28 11:16:45 +02:00
Frederic Junod
9306704c1d Add documentation in mapbrowserevent.js 2013-08-28 11:16:44 +02:00
Tim Schaub
e9aa316007 Call getUid once 2013-08-27 16:22:45 -06:00
Tim Schaub
6b625e368b Account for icon offsets when doing feature hit detection 2013-08-27 16:22:45 -06:00
Tim Schaub
efeb00e4a5 Add x/y offset for icon symbolizers 2013-08-27 16:22:45 -06:00
Tim Schaub
6baf5d0b18 Export ol.geom.Geometry.prototype.getCoordinates 2013-08-27 16:22:45 -06:00
Éric Lemoine
9895f879f9 Export ol.CollectionEvent#getElement 2013-08-27 22:08:26 +02:00
Éric Lemoine
9f2c351057 Use ol.CollectionEvent#getElement in LayerGroup 2013-08-27 22:07:45 +02:00
Éric Lemoine
b9f2f7bcb4 Add ol.CollectionEvent#getElement 2013-08-27 22:07:03 +02:00
Tim Schaub
0c555e6e7d Accept null crs 2013-08-27 10:54:00 -06:00
Éric Lemoine
f273be6597 Export ol.source.Source#getExtent 2013-08-27 15:42:55 +02:00
Tim Schaub
e8ddecc8b1 Merge pull request #920 from tschaub/point-examples
Cast to number when creating literals from symbolizers where literal properties must be numeric.
2013-08-26 11:57:09 -07:00
Tim Schaub
ecba1d78c2 Merge pull request #921 from tschaub/geojson-crs
Parse top-level crs member when reading features from GeoJSON.
2013-08-26 10:41:14 -07:00
Tim Schaub
0a3e46b88d Remove unnecessary cast and save 15 bytes using goog.isDef 2013-08-26 09:26:07 -06:00
Tim Schaub
eaf447759f Merge pull request #913 from tschaub/dimension
Allow for vector data with unknown or inconsistent dimension.
2013-08-26 05:59:50 -07:00
Tim Schaub
7e2bd66417 Read crs from top-level object when parsing as features 2013-08-25 12:32:22 -06:00
Tim Schaub
9755240cac Leaving the + operator as a convenience for concatenating strings
When people need to serialize in a format that differentiates string concatenation from addition, they can use the new `concat` function in an expression.  But I don't think we need to throw if people use `+` with strings.
2013-08-23 18:33:52 -04:00
Tim Schaub
3c993168c4 Cast to numbers for literals
There are times when we parse from XML without a schema (e.g. KML).  In these cases, features attributes will always be strings.  We can cast to number when creating literals from symbolizers and then assert `!isNaN` instead of asserting that they are numbers before.
2013-08-23 17:30:24 -04:00
Tim Schaub
43953c8efa Call concat instead of using math op in FE expression parsing 2013-08-23 16:46:33 -04:00
Tim Schaub
3b615fa312 Add a concat function for concatenating strings 2013-08-23 13:05:12 -04:00