Commit Graph
100 Commits
Author SHA1 Message Date
ahocevar 3463defd9c Merge pull request #1707 from ahocevar/css-transform-detection
CSS transform detection when DOM is ready
2014-02-16 02:47:02 +01:00
ahocevar f3c099de8a Simplifying has2d and has3d check 2014-02-16 02:29:14 +01:00
ahocevar 91a736954d Properly cache the css transform support result 2014-02-15 17:37:37 +01:00
ahocevar 81f7ea106b CSS transform detection when DOM is ready
The code to detect CSS transforms requires a DOM to append an
element to. By performing this action when first called instead
of unconditionally upon library load, we can load OpenLayers in
the document's head again.
2014-02-15 10:48:04 +01:00
ahocevar f5c80f40bd Merge pull request #1700 from ahocevar/document-browserfeature
Make ol.BrowserFeature appear in API docs
2014-02-14 11:05:28 +01:00
ahocevar 7c29fe974b Merge pull request #1693 from ahocevar/no-load-on-interacting
Do not load tiles while interacting
2014-02-13 23:29:00 +01:00
ahocevar adad57d481 Make the default effectively truthy 2014-02-13 22:52:48 +01:00
ahocevar aa5a08a377 No typecast needed 2014-02-13 22:29:20 +01:00
ahocevar 3cc1dad2e0 Make loading parameters configurable 2014-02-13 22:08:26 +01:00
ahocevar 877e881a52 Do not load tiles while interacting
Especially on mobile devices, loading just a single tile can
cause major janks. During animations, it is fine to just skip
frames. But during user interaction (e.g. dragging), a more
instant visual feedback is desirable.
2014-02-13 21:03:21 +01:00
ahocevar 0200ee4f48 Make ol.BrowserFeature appear in API docs 2014-02-13 21:00:57 +01:00
ahocevar 4d0d2500a2 Merge pull request #1699 from ahocevar/logo-position
Fix logo position in apps without Bootstrap
2014-02-13 20:54:09 +01:00
ahocevar 672fc681ec Fix logo position in apps without Bootstrap 2014-02-13 18:12:26 +01:00
ahocevar 20402a6e71 Merge pull request #1684 from ahocevar/ie-cursor
Changing pointer cursor in examples is broken
2014-02-12 23:30:06 +01:00
ahocevar e6e8037269 Merge pull request #1685 from ahocevar/google-no-rotation
Turn off rotation because Google does not support it
2014-02-12 12:25:45 +01:00
ahocevar aa8bbe4c7b Turn off rotation because Google does not support it 2014-02-12 12:16:18 +01:00
ahocevar b7757e6a1d Allow application developers to modify cursors
With this change, cursors can be set on the map target again.
2014-02-12 11:09:59 +01:00
ahocevar 43e42d959d Merge pull request #1647 from openlayers/style-
Create styles only once
2014-02-06 08:28:43 +01:00
ahocevar a4101d52cf Create styles only once 2014-02-06 05:47:34 +01:00
ahocevar ef200e8b03 Merge pull request #1421 from ahocevar/google-integration
Example for obtaining a Google base map
2014-02-05 20:14:28 +01:00
ahocevar 0fa60fc0c6 Updating example to use the new vector API 2014-02-05 18:55:55 +01:00
ahocevar 6aef5eed74 Example for obtaining a Google base map
By simply defining the ol3 map as control on a GMaps map, we can
have a Google base map with arbitrary ol3 content on top. This
works with all ol3 renderers.
2014-02-05 17:59:00 +01:00
ahocevar b76289acb8 Merge pull request #1387 from ahocevar/olx-docs
Documentation error
2014-01-10 12:58:55 -08:00
ahocevar 7e0bd6dca1 Make olx types appear in API docs 2014-01-10 20:21:16 +01:00
ahocevar a4083f544e Merge pull request #1373 from ahocevar/rbush-fail
ol.structs.RBush#remove() is unreliable
2013-12-16 05:02:49 -08:00
ahocevar 8bfa0f7ae9 Truthy check is enough 2013-12-16 13:53:55 +01:00
ahocevar 67d2cddb84 Verify that removing random extent nodes also works 2013-12-13 18:27:33 +01:00
ahocevar d3cc822f98 Do not ascend when node has more siblings 2013-12-13 17:30:28 +01:00
ahocevar 95c717ad32 Merge pull request #1370 from ahocevar/unnest-loops
Unnest loops
2013-12-12 15:12:19 -08:00
ahocevar c4ec53bbdb Unnest loops
Reusing the iterator in a nested loop is not a good idea. And in
this case it is better to not have nested loops at all, because
we only have to create one array.
2013-12-12 17:57:14 +01:00
ahocevar 4d03c0bfaa Show an issue with ol.structs.RBush
Note that the same test passes in the original implementation.
2013-12-12 17:03:40 +01:00
ahocevar d147d11b51 Merge pull request #1347 from ahocevar/no-original
Remove original handling on ol.Feature
2013-12-10 00:59:28 -08:00
ahocevar 211e288f33 Remove original handling on ol.Feature
This is another attempt to bring master closer to the
vector-api branch. In anticipation of the ability to keep track
of modifications on ol.Object through a beforechange event
(d7e4be0), we will be able to manage originals on the
application level or in a separate component outside of
ol.Feature.
2013-12-09 18:33:34 +01:00
ahocevar d53ad07279 Merge pull request #1346 from ahocevar/set-srsname
Set the srs name when writing GetFeature
2013-12-09 08:28:14 -08:00
ahocevar 2fc89b967a Define type for applyWriteOptions call 2013-12-09 17:19:03 +01:00
ahocevar 8328db26d4 Set the srs name when writing GetFeature
Also make clear that srsName is only optional for WFS 1.0.0.
2013-12-09 16:57:11 +01:00
ahocevar 7071e6637b Merge pull request #1344 from ahocevar/modify-remove
unable to removeInteration in modify-features example
2013-12-09 07:17:30 -08:00
ahocevar 8d55e14986 Safeguard against the case where no features are modifiable 2013-12-09 13:25:14 +01:00
ahocevar 951e874914 Merge pull request #1339 from ahocevar/wfs-transaction
Transaction handling and exports for the WFS parser
2013-12-06 12:26:12 -08:00
ahocevar 19cb3c5835 Addressing review comments
* Do not write xmlns
* Make @this annotations consistent
* Handle numbers and strings for attribute values
* Fix defaultNamespaceURI scope
2013-12-06 19:15:44 +01:00
ahocevar e49464a573 No native element on GetFeature queries 2013-12-06 16:49:44 +01:00
ahocevar 198b05047e Export the WFS parser and its write methods
For using the WFS parser, users need to be able to write
GetFeature queries and transactions.
2013-12-06 11:06:39 +01:00
ahocevar 35b8fdc00c Export getParser()
This reduces the API footprint of versioned parsers, because
only the base parser needs to be exported as symbol, and
versioned parsers can be accessed using the getParser() method.
2013-12-06 11:06:12 +01:00
ahocevar b3b9add06e Add Insert, Update and Delete writers
This change also adds some type annotations for better type
checking, introduces different write options for writing
transactions and queries, and provides new writeGetFeature and
writeTransaction methods.
2013-12-06 10:57:58 +01:00
ahocevar f539eb140f Use standard x, y axis order if we do not know better 2013-12-06 10:49:24 +01:00
ahocevar 77a8e91a2e Merge pull request #1337 from ahocevar/no-foo
Proper namespace and sub-parser management in OGC parsers
2013-12-06 00:47:59 -08:00
ahocevar fa0cc538f5 Proper namespace and sub-parser management
Instead of setting a dummy namespace, we can have setter methods
for the featureNS property to propagate them to sub-parsers. The
srsName is also a property which needs to be propagated to
sub-parsers.
2013-12-06 01:08:45 +01:00
ahocevar af4308f481 Merge pull request #1336 from ahocevar/fix-writers-typo
Fix a typo - it's writers, not witers
2013-12-05 16:00:13 -08:00
ahocevar 1bf4b9bf49 Fix a typo - it's writers, not witers 2013-12-06 00:53:16 +01:00
ahocevar 1ac93d09c9 Merge pull request #1325 from ahocevar/remove-rtree
Replace RTree with RBush and remove RTree
2013-11-28 08:58:04 -08:00
ahocevar 45d9f6ce0b Rename rbush test to match the naming scheme 2013-11-28 16:17:29 +01:00
ahocevar d4bdac715b Get rid of ol.structs.RTree 2013-11-28 16:17:17 +01:00
ahocevar 92a30bcbf7 Use ol.structs.RBush in ol.source.Vector 2013-11-28 16:16:52 +01:00
ahocevar fab0fe5e7a Merge pull request #1322 from ahocevar/modify-rbush
Use ol.structs.RBush in ol.interaction.Modify
2013-11-27 05:56:13 -08:00
ahocevar 137f797bee Use ol.structs.RBush in ol.interaction.Modify
This is one more step to bring the master and vector-api
branches closer together. I am well aware that the current
Modify interaction will probably be rewritten as part of the
vector-api effort, but with changes like this we will eventually
be able to remove ol.structs.RTree from master.
2013-11-27 14:48:06 +01:00
ahocevar 683b5c34bf Merge pull request #1321 from ahocevar/safe-foreach
Documenting limitations of forEach and forEachInExtent
2013-11-27 05:39:05 -08:00
ahocevar 96c6cd0ab0 Documenting limitations of forEach and forEachInExtent
Because the tree's structure changes when nodes are inserted,
updated or deleted, no modifications are allowed in a forEach
loop.
2013-11-27 14:21:56 +01:00
ahocevar 7ee2646a6b Merge pull request #1311 from ahocevar/modify-points
Segment distance calculation fails when modifying points
2013-11-25 15:36:48 -08:00
ahocevar cf5e9ecd4f Segment distance calculation fails when modifying points
By providing a segment even for points, we have less distinction
points between points and other geometry types, and are able to
do the segment distance calculation also for points.
2013-11-23 11:49:42 +01:00
ahocevar 86a5749b36 Merge pull request #1308 from ahocevar/wms-getfeatureinfo-options
Add missing WMSGetFeatureInfo exports
2013-11-22 08:22:14 -08:00
ahocevar 9d9c91bbf7 Add missing WMSGetFeatureInfo exports 2013-11-22 17:11:44 +01:00
ahocevar 912ac29f31 Merge pull request #1298 from ahocevar/gfi-callback
The source determines who can do GetFeatureInfo
2013-11-20 07:11:51 -08:00
ahocevar b8a9aeb14e Avoid source check in map renderer
By returning true or false from the layer renderer's
getFeatureInfoForPixel method, we know whether the source
supports GetFeatureInfo or not.
2013-11-20 16:05:00 +01:00
ahocevar 0238fa54de The source determines who can do GetFeatureInfo
Now that the ol.renderer.Layer base class has a
getFeatureInfoForPixel method, we have to check whether the
source supports GetFeatureInfo, not the layer renderer.
2013-11-20 13:05:06 +01:00
ahocevar 936f86568e Merge pull request #1284 from ahocevar/null-vertexfeature
Protect from null vertexFeature
2013-11-18 12:23:00 -08:00
ahocevar aa5358203e Protect from null vertexFeature
When dragging the map before a vertexFeature was created, it can
be null, so we cannot get its renderIntent.
2013-11-18 10:43:37 +01:00
ahocevar b2f17f9c62 Merge pull request #1281 from ahocevar/simplify-wmts-from-capabilities
Default projection does not need to be provided
2013-11-14 08:44:04 -08:00
ahocevar d2c5422d09 Default projection does not need to be provided
The wmts-from-capabilities example should focus on creating a
WMTS source from capabilities, so it should not distract by
configuring a projection that does not need to be configured.
2013-11-14 17:29:11 +01:00
ahocevar b670a0d9da Merge pull request #1280 from ahocevar/wmts-vienna
Proj4js no longer needed for wmts-from-capabilities example
2013-11-14 04:02:11 -08:00
ahocevar b5bcaea3a0 Proj4js no longer needed for wmts-from-capabilities example
The WMTS capabilities document of the Vienna map has changed. It
no longer defines a tileset for EPSG:31256, so it can be parsed
without having Proj4js and a projection definition for
EPSG:31256.
2013-11-14 12:48:06 +01:00
ahocevar 0d1533eaca Merge pull request #1269 from ahocevar/modify-interaction
Modify interaction for feature modification
2013-11-12 15:55:23 -08:00
ahocevar f790992a77 Make addLayer and removeLayer methods private 2013-11-13 00:44:39 +01:00
ahocevar b805a76ae1 layerFilter can no longer be undefined here 2013-11-13 00:44:39 +01:00
ahocevar 4e85322abb Minor stylistic clean-ups and more symmetry 2013-11-13 00:44:38 +01:00
ahocevar 9067260a44 Fixing api doc comment 2013-11-13 00:44:38 +01:00
ahocevar 7ae65c32e1 Removing unused method 2013-11-13 00:44:38 +01:00
ahocevar 39a5a8e291 Refactoring for better layer management
The only feature on the temporary layer is now the
vertexFeature, and the temporary layer's style is dynamically
changed to the style of the layer whose segment is being edited
(the topmost layer if more than one segment are being edited).
With this simplification, we can also put all segments on a
single RTree. Finally, we no longer rely on structures set on
layers - all we need is now on the instance itself.

This refactoring also changes the way we define layers to
participate in modification - by using an array or a filter
function, or assuming all layers if no layers property is set.
2013-11-13 00:44:38 +01:00
ahocevar 06406d968f Adding equals method for comparing coordinates 2013-11-13 00:44:38 +01:00
ahocevar fe2fbe06c3 Updating header 2013-11-13 00:44:37 +01:00
ahocevar 319f78fb94 Using new squaredDistanceToSegment and closestOnSegment 2013-11-13 00:44:37 +01:00
ahocevar 0e673a492a Use accessor for components 2013-11-13 00:44:37 +01:00
ahocevar c669dda2b1 Do not create a vertexFeature with [NaN, NaN] coordinates
The RTree cannot work with NaN coordinates. So instead of
preparing a vertexFeature before we know a coordinate, we now
lazily create the vertexFeature.
2013-11-13 00:44:37 +01:00
ahocevar 498738d22a Parent information no longer needed
Now that we can do setCoordinates, we no longer need to create
new geometries and assign them to a parent.
2013-11-13 00:44:37 +01:00
ahocevar 1c3b839a6f Use new setCoordinates methods 2013-11-13 00:44:36 +01:00
ahocevar fec638e8be Write modifications back to the original layer
With the feature's getOriginal() and setOriginal() methods, an
undo tree can be maintained now.
2013-11-13 00:44:36 +01:00
ahocevar a3b18bf16e Do not split segments while in the loop
In combination with the additional squaredDistanceToSegment
check we can ensure that a future vertex is only created on one
segment per feature, and only on the segment that it appears on.

This change also renames the misleading dragVertices_ member to
dragSegments_.
2013-11-13 00:44:36 +01:00
ahocevar ff17eb53d4 Separate add listener from method that adds index 2013-11-13 00:44:36 +01:00
ahocevar 292b851a74 Adding ModifyFeature interaction
This is a first draft. The way geometry changes are handled for
now is a bit clumsy. Both updating the feature cache RTree and
making the layer aware of feature and geometry changes could be
handled in a smarter way if these changes would be made through
the layer instead of directly on the geometry or feature.
2013-11-13 00:44:36 +01:00
ahocevar 076f1ac194 Merge pull request #1265 from ahocevar/set-style
Allow to set the layer style
2013-11-12 09:15:08 -08:00
ahocevar 16ef1c5b8a Merge pull request #1267 from ahocevar/geom-clone
Deep clone geometry coordinates
2013-11-12 09:08:33 -08:00
ahocevar ed09173730 Deep clone geometry coordinates
Our geometries are mutable, so they can be modified without
creating garbage by changing coordinates in place and calling
setGeometry afterwards. But this also means that we need to
create a deep clone of the coordinates.
2013-11-12 11:36:40 +01:00
ahocevar 1d23229d98 Allow to set the layer style
By firing a simple CHANGE event, we can redraw the layer when
a style is assigned.
2013-11-12 01:47:43 +01:00
ahocevar 382b2707df Merge pull request #1256 from ahocevar/simplify-select
Simplify Select interaction and prepare for programmatic feature selection without interaction
2013-11-11 13:19:57 -08:00
ahocevar 0ed208b710 Make renderIntent private and add a getter 2013-11-11 22:07:18 +01:00
ahocevar 299d729936 Make filter optional 2013-11-11 21:52:19 +01:00
ahocevar 467bcc8b62 Protect from features without geometry 2013-11-11 21:51:58 +01:00
ahocevar 03e20ce6f1 Do not fail on non-vector layers 2013-11-09 16:12:13 +01:00
ahocevar 26c8c954c3 Make selectedFeaturesFilter available to other components 2013-11-09 16:03:30 +01:00
ahocevar 97d38820fb Removing no longer used getFeatureWithUid method 2013-11-09 14:44:40 +01:00
ahocevar d9fd459654 Do not use a temporary layer for selected features 2013-11-09 14:15:35 +01:00