Commit Graph
100 Commits
Author SHA1 Message Date
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
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
ahocevar 5c1502effb Merge pull request #1246 from ahocevar/fix-travis
Use a released version of jsdoc. Fixes #1245.
2013-11-06 10:21:00 -08:00
ahocevar d524973fd3 Use a released version of jsdoc 2013-11-06 19:11:21 +01:00
ahocevar 32bf851957 Merge pull request #1225 from ahocevar/closest-on-segment
squaredDistanceToSegment and footOfPerpendicularToSegment
2013-11-04 13:43:42 -08:00
ahocevar f317016505 Add tests 2013-11-04 22:14:34 +01:00
ahocevar e9b934d041 Let closestOnSegment return nothing more than a coordinate
Since we do not use the 'along' property anywhere, and the
resulting array returned by closestOnSegment could cause trouble
when working with 3d coodinates, now only the closest point is
returned, and the squared distance to the segment is calculated
by squaredDistanceToSegment instead.
2013-11-04 20:54:07 +01:00
ahocevar 1670b31142 Moving squaredDistanceToSegment to the coordinate package 2013-11-04 19:19:54 +01:00
ahocevar 5b9bcbac1c Merge pull request #1197 from ahocevar/handledragend
Handle dragend after resetting view hint and dragging flag
2013-10-30 03:59:43 -07:00
ahocevar 4b7b95fc2f Handle dragend after resetting view hint and dragging flag
When we start dragging, we first handle dragstart and then set
the INTERACTING view hint and the dragging flag. To end dragging
in a symmetric manner, we have to first reset the INTERACTING
hint and dragging flag, and then handle dragend.

This flaw becomes obvious when using an interaction where no
animation is performed after the interaction. This can be seen
in the style-rules example when using the dragzoom interaction
(i.e. zoom using a drag box): the vector renderer will not
render the new resolution, because the INTERACTING view hint is
still set when the zoom box dragend is handled.
2013-10-30 11:45:34 +01:00
ahocevar 33f426fd85 Merge pull request #1135 from ahocevar/no-blur
Use integers when positioning on the target canvas
2013-10-16 09:03:08 -07:00
ahocevar 386fac2429 Use integers when positioning on the target canvas
This avoids blurred images after view center changes (dx, dy)
and at fractional zoom levels (dw, dh).
2013-10-16 16:39:45 +02:00
ahocevar 37a7ac1f5b Merge pull request #1097 from ahocevar/multi-geometry-events
Fire change events in multi-part geometries
2013-10-05 10:07:26 -07:00
ahocevar 4b934c03ba We want to create a deep clone, not a shallow one 2013-10-05 08:42:21 -06:00
ahocevar b40124b2bc Fixing doc comment 2013-10-05 08:41:49 -06:00
ahocevar 52552c9b18 Fire change events for multi-part geometries 2013-10-04 23:36:16 -06:00
ahocevar 48421083ba Merge pull request #1095 from ahocevar/master
More test fixes (see #1093)
2013-10-03 13:39:52 -07:00
ahocevar 00a73a6188 More test fixes (see #1093) 2013-10-03 14:39:30 -06:00
ahocevar 9a9085d716 Merge pull request #1094 from ahocevar/master
Fixing tests (see #1093)
2013-10-03 13:37:56 -07:00
ahocevar 62134f6ee2 Fixing tests (see #1093) 2013-10-03 14:37:02 -06:00
ahocevar de999b9463 Merge pull request #1093 from ahocevar/symbolizer-id
Adding counter expression function
2013-10-03 12:16:02 -07:00
ahocevar 32f8826622 Minor doc change 2013-10-03 13:16:03 -06:00
ahocevar f2a9c45447 Merge pull request #1091 from ahocevar/render-zindex
Sort symbolizer groups by zIndex
2013-10-03 11:02:29 -07:00
ahocevar 41e7a6a059 Marking sort function private 2013-10-03 12:02:29 -06:00
ahocevar 4937f08971 Adding counter expression function
This function can e.g. be used to get a symbolizer literal with
an ever increasing zIndex.
2013-10-03 11:41:02 -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
ahocevar c03e690882 Merge pull request #1089 from ahocevar/no-geometry-type-groups
No longer group features by geometry type
2013-10-03 07:35:14 -07: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
ahocevar 5dbd200e2b Merge pull request #1088 from ahocevar/rename-vectorrenderer
Rename ol.renderer.canvas.VectorRenderer
2013-10-02 15:55:21 -07:00
ahocevar adc1d130c8 Rename ol.renderer.canvas.VectorRenderer
To be consistent with our naming convention, this one should be
renamed to ol.renderer.canvas.Vector.
2013-10-02 15:58:27 -06:00
ahocevar 3349bded1c Merge pull request #1065 from ahocevar/skip-hidden
Select interaction does not work with shape symbolizers and canvas renderer
2013-09-27 05:45:50 -07:00
ahocevar 6c6f9a3ef5 Doc improvements
Thanks @tschaub for suggesting these.
2013-09-27 12:11:41 +02:00
ahocevar f8e891ff15 Making the condition for adding to selection configurable 2013-09-27 11:45:15 +02:00
ahocevar c556ddd593 Skip hidden features for hit detection 2013-09-26 12:56:49 +02:00
ahocevar 79750c662c Merge pull request #1056 from openlayers/doc
Basic docs
2013-09-24 07:21:43 -07:00
ahocevar 9e274a61db Fixing typo 2013-09-24 15:06:22 +02:00
ahocevar 860735d7e4 Nicer search box position 2013-09-24 14:56:25 +02:00
ahocevar b80022036f ol3 logo for examples and apidoc header 2013-09-24 14:42:04 +02:00
ahocevar d1c0665926 Adding heading 2013-09-24 13:46:14 +02:00
ahocevar 3adc46ae4a Adding basic concepts tutorial 2013-09-24 13:28:42 +02:00
ahocevar 5ab7803402 New font and header background color
With this change, API docs and examples match the website design
of the new-build branch of openlayers.github.io better.
2013-09-24 10:50:27 +02:00
ahocevar 94942e636c Merge pull request #969 from ahocevar/master
WMS getFeatureInfoOptions ignored in minified build
2013-09-03 12:57:09 -07:00
ahocevar 3bce782943 Making sure that options are not renamed 2013-09-03 20:02:49 +02:00
ahocevar 39b4da5ca2 Merge pull request #945 from ahocevar/select-followup
Follow-up improvements for #897
2013-09-02 06:47:01 -07:00
ahocevar d8bc769758 Do not delete from oldFeatureMap 2013-08-30 23:18:59 +02:00
ahocevar cbf7f91cfb instanceof check to avoid ducktyping 2013-08-30 23:18:17 +02:00
ahocevar 9dfbfab648 Follow-up improvements for #897
* Interaction is no goog.Disposable any more.
* Permanent cleanup during selection instead of disposeInternal.
* Moved selectionLayers creation outside feature loop.
* Maintain selectedFeatures and unselectedFeatures only for
  layers that have a setRenderIntent method.
2013-08-30 16:26:49 +02:00
ahocevar 29317c3316 Merge pull request #897 from ahocevar/select
Select control
2013-08-30 06:25:14 -07:00
ahocevar 643eb5c4cc Better initial extent 2013-08-30 14:46:32 +02:00
ahocevar 9dae49dc18 Symbolizer defaults for the select renderIntent 2013-08-30 13:47:43 +02:00
ahocevar 83720975f8 More specific INTENTCHANGE instead of SYMBOLIZER event 2013-08-30 12:10:55 +02:00
ahocevar e2c4fec253 Let's at least be disposable, so we can clean up after ourselves 2013-08-30 12:00:06 +02:00
ahocevar 2a4aef0b58 THIS_IDENTIFIER no longer needed 2013-08-30 11:44:52 +02:00
ahocevar 6bb23cdda5 No longer inheriting from EventTarget 2013-08-30 11:43:35 +02:00
ahocevar 8a180e63b2 Filter layer by id 2013-08-29 16:50:55 +02:00
ahocevar 43c67ba09f Do not dispatch selection events for now 2013-08-29 16:50:55 +02:00
ahocevar 95cf0e1264 Less closures 2013-08-29 16:50:55 +02:00
ahocevar 0c1f2328f9 Do not implement a specific clone method
What we need here is a mix of deep and shallow cloning, and we
do not want to do this in a generic ol.Feature#clone() method.
2013-08-29 16:50:55 +02:00
ahocevar 2394b39f6f Use select as keyword 2013-08-29 16:50:54 +02:00