Commit Graph

2291 Commits

Author SHA1 Message Date
ahocevar 958ee7af51 Use strings, like with other indices 2013-05-19 11:16:24 +02:00
ahocevar 2ff2e85fbb Only query RTree if requested geometryType is used 2013-05-19 11:16:02 +02:00
ahocevar 79e4ee2717 More sophisticated RTree implementation
This new implementation is based on
http://github.com/imbcmdth/RTree/, with only a few modifications
to add the optional type and provide the API of the previous
implementation.

There is still room for optimization, but this is such an
improvement over the previous RTree already that it's worth
bringing it in now.
2013-05-19 01:47:21 +02:00
Tim Schaub dc4ca15430 Merge pull request #718 from tschaub/dirty-frame
Properly reset the dirty flag
2013-05-18 09:27:33 -07:00
Tim Schaub 38752f4700 Properly reset the dirty flag
Currently, the dirty flag is never reset (to false).  This is a bug.  Because renderFrame is called very often (every layer render gets called when every other layer needs to re-render), it is criticial to know when we can bail out early.  The dirty flag is currently the way that the vector layer renderer knows that it needs to do more work.  On an empty cache, the renderFrame method of the vector layer renderer is called ~30 times for a single zoom in the vector layer example (due to tiles loading on other layers).  Without this change, we miss the fast path out and clear/re-render the canvas all 30 times.  With this change, we are only clear the canvas and redraw 6 times in a typical zoom animation.
2013-05-17 23:22:07 -06:00
ahocevar 02ba8a86e6 Merge pull request #715 from ahocevar/rtree-performance
Making RTree's find more efficient. r=@bartvde
2013-05-17 04:06:20 -07:00
ahocevar ecea771801 Making RTree's find more efficient
By doing the type check before the intersection check, we can
save he intersection check for cases where we don't care about
type or have the specified type in a node.
2013-05-17 12:54:06 +02:00
Bart van den Eijnden b3ad00da13 Merge pull request #714 from bartvde/gmloptions
GML options not always applied (=r@ahocevar)
2013-05-17 03:51:06 -07:00
Bart van den Eijnden 0aa4fe258e GML options not always applied.
This is a follow-up for https://github.com/openlayers/ol3/pull/711
for the GML parser. Also use goog.array.map instead of map as was
pointed out by @twpayne on the WKT review and update the example data
to use all US states as pointed out by @tschaub on the Google hangout.
2013-05-17 11:48:05 +02:00
Bart van den Eijnden 921aa28b42 Merge pull request #712 from bartvde/wkt
Add WKT parser (r=@ahocevar,@twpayne,@tschaub)
2013-05-17 01:55:42 -07:00
Bart van den Eijnden 3e3b5ab02d move last RegExp into constant 2013-05-17 10:15:22 +02:00
Bart van den Eijnden 585887b04e address review comments by @twpayne 2013-05-17 10:09:40 +02:00
ahocevar 5d7cdd2646 Use goog.isString() instad of typeof check 2013-05-16 21:20:34 +02:00
ahocevar 22c4508c27 Don't rely on responseXML, also use responseText
On servers that report an incorrect content type for XML
documents, responseXML will be empty. In these cases we need to
use responseText instead. This change also prevents readNode
calls with empty data.
2013-05-16 21:11:32 +02:00
Bart van den Eijnden bb16820ab0 add exports for WKT 2013-05-16 15:44:31 +02:00
Bart van den Eijnden bf8c12d9f7 Add WKT parser.
Add a parser (read/write) for OGC Well-Known-Text (WKT). It deals with
geometries only, not with features, mostly because WKT can only contain a
single geometry (or geometry collection). This can later on be used to
serialize and deserialize geometries in ol3.
2013-05-16 15:29:39 +02:00
ahocevar 3e6cdf8901 trackAttributes is optional 2013-05-16 15:26:54 +02:00
ahocevar cde4ef435c Adding another option 2013-05-16 15:14:38 +02:00
ahocevar 1929403cda Do not extend the instance with options 2013-05-16 14:37:40 +02:00
ahocevar c245794e56 Sorting properties 2013-05-16 14:37:27 +02:00
ahocevar 8084e20e64 Fixing typo 2013-05-16 10:45:25 +02:00
ahocevar 7a800068ed Fixing typedef 2013-05-16 10:44:22 +02:00
ahocevar 824397e6ba Do not change ol.extent.containsCoordinate 2013-05-16 10:42:28 +02:00
ahocevar 2d5c0df7cd More verbose variable names 2013-05-16 10:14:56 +02:00
ahocevar 4e7ffc2711 Store symbol sizes by tile
The reason for this change is that symbolSizes and maxSymbolSize
on the instance will be wrong as soon as the resolution changes
and cached tiles are used. It turned out that the approach used
now has several advantages: smaller symbolSizes objects, no need
to merge symbolSizes objects, and cache management for free (no
risk of memory leaks). Note that the symbolSizes and
maxSymbolSize for each tile are not strictly tile specific -
they represent the rendering pass that created the tile. This
has no negative side effects, and it has the advantage that
there is not a single additional loop needed to create these
structures.
2013-05-16 09:57:26 +02:00
ahocevar 037e44e084 Accurate hit detection
With this change, hit detection for lines and points gets very
accurate, because the vector renderer instance keeps track of
line widths and point symbol sizes. After doing a bbox query in
the RTree, returned lines and points are evaluated against the
thresholds of their line width or symbol size. The KML example
with its different symbolizers now has getFeatureInfo too to
show this in action.
2013-05-15 23:44:22 +02:00
Bart van den Eijnden e8ed1674ea do not specify the source projection in ol.parser.ReadFeaturesOptions anymore 2013-05-15 15:34:11 +02:00
Bart van den Eijnden 2ad3ee6f99 incorporate review from @ahocevar 2013-05-15 14:50:37 +02:00
Bart van den Eijnden 5ad4734c24 GML parser.
This adds a parser (read/write) for GML v2 and v3. GML v3 is limited to the
simple features profile of GML 3.1.1, just like OpenLayers 2 was. This will
be the basis for the WFS parser, but it only makes sense to continue this work
once feature modification (insert, update, delete) is in place in ol3. So the
WFS parser will be another pull request.
2013-05-14 20:12:05 +02:00
Éric Lemoine 42cc4d7683 Merge pull request #706 from elemoine/user-extensions
Custom control framework
2013-05-10 04:47:39 -07:00
Éric Lemoine 4c144c3d5c Merge pull request #700 from elemoine/calculate-extent
Add and export View2D.calculateExtent
2013-05-10 03:57:24 -07:00
ahocevar 72fce33956 Merge pull request #703 from ahocevar/getfeatureinfo-async
Asynchronous API for map#getFeatureInfo. r=@elemoine
2013-05-10 02:50:11 -07:00
Éric Lemoine 3a4fc2a99a Use our own null function for handleMapPostrender
If we use ol.control.Control.prototype.handleMapPostrender = goog.nullFunction the API doc doesn't show the mapEvent parameter of the handleMapPostRender function.
2013-05-10 10:56:39 +02:00
Éric Lemoine 88352092ee Externalize Control.handleMapPostrender 2013-05-10 10:45:24 +02:00
Éric Lemoine c845682ecb Export Control.getMap 2013-05-10 10:24:11 +02:00
Éric Lemoine 9685c87bc9 Create ol.inherits alias, and export it 2013-05-10 10:24:11 +02:00
Éric Lemoine 7a71f107cb Export and externalize Control.setMap 2013-05-10 10:24:11 +02:00
Éric Lemoine 41fb355804 New gslint doesn't like va_filters 2013-05-10 00:13:15 +02:00
Éric Lemoine 917e78a096 Merge pull request #701 from elemoine/rm-google-exports
Remove google.exports
2013-05-09 15:03:35 -07:00
Éric Lemoine c34d637de1 Fix typo in View2D:getExtent 2013-05-09 23:42:55 +02:00
Éric Lemoine 4b7f3e85c2 No need to export ol.coordinate 2013-05-09 22:45:20 +02:00
Éric Lemoine f47ac87f12 No need to export ol.easing 2013-05-09 22:45:11 +02:00
Éric Lemoine 17e779177b ol.easing.* functions are symbols 2013-05-09 22:44:49 +02:00
Éric Lemoine 31930290cf No need to export ol.animation 2013-05-09 22:44:11 +02:00
Éric Lemoine a96031f435 ol.animation.* functions are symbols 2013-05-09 22:43:04 +02:00
ahocevar 7b256c3ec6 Asynchronous API for map#getFeatureInfo
This change allows us to use feature info services on the
server. It will also be useful for the GetFeature control to
get results from a WFS.
2013-05-09 22:26:55 +02:00
Éric Lemoine 8779b90f7c Remove google.exports
This .exports file made goog.require be exported as a null function. This was needed to be able to run the ol3 examples uncompiled against the ol.js build. Now that host-examples target removes the goog.require statements from the examples' js files (74b8fea6) we don't need to export goog.require anymore.
2013-05-09 21:13:20 +02:00
Tom Payne 9286d63133 Merge pull request #693 from twpayne/class-name
Add className option to control options
2013-05-08 05:35:37 -07:00
ahocevar 96c3a86314 Merge pull request #692 from ahocevar/pnpoly
Point-in-polygon improvements. r=@bartvde
2013-05-08 05:11:16 -07:00
Tom Payne 2ad5dea737 Rename ol-mouseposition to ol-mouse-position 2013-05-07 17:31:26 +02:00