Commit Graph

9368 Commits

Author SHA1 Message Date
Bart van den Eijnden
93b067b6bc Write support for ol.parser.GeoJSON
Also add some convenience with static read and write methods based on the
singleton.
2013-05-23 15:57:11 +02:00
ahocevar
513115ea3b Merge pull request #730 from ahocevar/fix-rtree-tests
Fixing bug in tests
2013-05-22 11:42:22 -07:00
ahocevar
597405c288 Fixing bug in tests
That's what you get from copying and pasting and forgetting to
modify the pasted lines to suit your needs.
2013-05-22 13:41:29 -05:00
Frédéric Junod
2d765a6cf9 Merge pull request #728 from fredj/cleanup
Examples cleanup
2013-05-22 07:57:06 -07:00
Frederic Junod
2991c4ab57 Add a resolution input 2013-05-22 16:13:17 +02:00
Frederic Junod
fc12370765 Remove stray end tag fieldset 2013-05-22 16:03:59 +02:00
Frederic Junod
7ba4045e59 geolocation example: suppresses line breaks in tooltip 2013-05-22 15:53:55 +02:00
Frédéric Junod
cf605f2d52 Merge pull request #727 from fredj/mobile-featureinfo
getFeatureInfo examples: listen to click events
2013-05-22 04:31:33 -07:00
Frederic Junod
db34b37716 getFeatureInfo examples: listen to click events
This make the examples works on touch devices.
2013-05-22 12:30:31 +02:00
ahocevar
783e6d33d5 Merge pull request #723 from ahocevar/add-features
Export addFeatures. r=@tschaub
2013-05-21 20:47:08 -07:00
ahocevar
32d669ccc8 Export addFeatures
This needs discussion, but it's useful for now to be able to
have applications with programmatically created features.
2013-05-21 22:44:28 -05:00
ahocevar
485245fbfd Merge pull request #719 from ahocevar/fast-rtree
More sophisticated RTree implementation. r=@tschaub
2013-05-21 13:01:16 -07:00
ahocevar
a2927a0dd9 Addressing @tschaub's review comments 2013-05-21 15:00:50 -05:00
Frédéric Junod
77e60f8417 Merge pull request #721 from fredj/cleanup
Pass layers as array instead of ol.Collection
2013-05-21 05:28:43 -07:00
Frederic Junod
7d544e0868 Pass layers as array instead of ol.Collection 2013-05-21 12:35:02 +02:00
ahocevar
0f4a5c09af Porting tests from http://github.com/imbcmdth/RTree/
Also fixes some issues that were revealed by the new tests.
2013-05-20 17:47:04 +02:00
ahocevar
97d48277b5 Making docs more clear 2013-05-20 16:20:41 +02:00
ahocevar
2b410cf2d0 More performance and size optimizations
Not using Math.max and Math.min increases performance, and by
using ol.extent functions instead of RTree's rectangle
structures and calculations we can get rid of several functions.
2013-05-20 16:20:21 +02:00
ahocevar
9dd4dc3730 Better optimization for advanced compilation mode 2013-05-20 08:50:15 +02:00
ahocevar
bf510b570a Making RTree work in advanced compilation mode 2013-05-19 23:59:21 +02:00
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
9342ebdc98 Merge pull request #713 from ahocevar/kml-responsetext
Do not rely on responseXML, also use responseText. r=@bartvde
2013-05-16 12:49:51 -07: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
ahocevar
e50c314c33 Merge pull request #711 from ahocevar/kml-options
KML options not applied when library built separately from application. r=@bartvde
2013-05-16 07:04:42 -07: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
7ed51f97aa Merge pull request #710 from ahocevar/hit-detection
Accurate hit detection. r=@bartvde
2013-05-16 02:10:50 -07: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
Éric Lemoine
b7f0f9ba86 Merge pull request #708 from elemoine/user-extensions
The compilation of ol.js produces a warning
2013-05-16 01:06:36 -07: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