Commit Graph
100 Commits
Author SHA1 Message Date
ahocevar af0764b1ca Simpler tile coord access now that we only have one resolution 2013-06-23 18:47:49 +02:00
ahocevar 27c23f676b Fixing requires 2013-06-23 18:47:00 +02:00
ahocevar 1c5f466e61 Adding comment about MIN_RESOLUTION 2013-06-23 18:31:25 +02:00
ahocevar 61fcbd560e Do not render tiles during animation and interaction 2013-06-23 18:31:25 +02:00
ahocevar f20e6002cc Tile grid and cache for one resolution only 2013-06-23 18:31:25 +02:00
ahocevar 89c23b5560 Use binaryInsert instead of sort 2013-06-23 18:31:25 +02:00
ahocevar aa62764d90 Do not add resolutions while interacting 2013-06-23 18:31:25 +02:00
ahocevar 0aacf197bf Separate method for updating the tile cache 2013-06-23 18:31:24 +02:00
ahocevar 3afd8b4242 Do not use a fixed tile grid for vector rendering
Instead, we create a new tile grid whenever renderFrame is
called, no animation is active, and the resolution is not in the
tile grid already. This gives better rendering results because
we get vector tiles at native resolutions.
2013-06-23 18:30:57 +02:00
ahocevar 1826b7a9be Merge pull request #808 from ahocevar/no-empty-tiles
Don't render/cache tiles with no features. r=@tschaub
2013-06-23 09:11:55 -07:00
ahocevar 3fc4fc3eb8 Only render and cache tiles that have features 2013-06-23 15:52:31 +02:00
ahocevar 10f03a360c Merge pull request #770 from ahocevar/text-symbolizer
Basic support for text symbolizers. r=@bartvde,@tschaub
2013-06-20 07:06:38 -07:00
ahocevar d250f4449c Updating example to use new properties 2013-06-20 15:24:54 +02:00
ahocevar ba87c2e5ab Adding TODOs 2013-06-20 15:02:12 +02:00
ahocevar f316b79bcd Proper handling of defaults 2013-06-20 14:57:01 +02:00
ahocevar 9e3ca1c13c Changing renderLabels_ method name to renderText_ 2013-06-19 22:14:52 +02:00
ahocevar cb9f4972df Use 'text' instead of 'name' for the label text 2013-06-19 22:10:44 +02:00
ahocevar 7353e05a90 Fixing merge errors from unmerging #404 2013-06-19 22:01:51 +02:00
ahocevar c17424deec Basic support for text symbolizers
This adds basic label rendering for points and polygons to the
canvas renderer, and a text symbolizer to the style package.
2013-06-19 22:01:51 +02:00
ahocevar 4392feef1b Merge pull request #794 from ahocevar/simplify-ranges
Simplifying ranges structure by adding compiler hints. r=@tschaub,@twpayne,@elemoine
2013-06-18 01:27:24 -07:00
ahocevar c54d81258a Merge pull request #793 from ahocevar/proj-no-extent
Making extent optional for projections. r=@twpayne
2013-06-17 08:40:22 -07:00
ahocevar 11cbbab901 Simplifying ranges structure by adding compiler hints
In JavaScript, keys of object literals are always strings, and
internal type conversions are performed. Now if we tell the
compiler that keys are numbers, we get inconsistent types when
iterating through keys. So instead we set the key type to string
and do a type cast to make the compiler happy. Note that we
could also do toString() instead of a type cast, but it would
add a performance penalty (see
http://jsperf.com/internal-type-conversion-vs-tostring-for-object-keys).
2013-06-17 17:37:48 +02:00
ahocevar b71bf9607c Do not set center constraint
This change slipped in accidently. Thanks @twpayne for catching
this.
2013-06-17 16:46:47 +02:00
ahocevar 24953e5f0e Making it clear that Proj4js is used 2013-06-17 15:28:05 +02:00
ahocevar 29b5af9c87 New example using a projection unknown to the client 2013-06-17 15:27:06 +02:00
ahocevar caefacac35 Serve WMS tiles for sources without specified extent
With this change, WMS sources do not need an extent configured.
The result is that the WMS will be queried for tiles for any
extent.
2013-06-17 15:26:23 +02:00
ahocevar 37b369e0d7 Making extent optional for projections
The projection validity extent is used to generate a sensible
set of default resolutions and a sensible default tile grid.
By making it optional, we can still generate defaults - with
zoom levels that are similar to the default web mercator zoom
levels (based on fitting the world on a single tile, even if the
projection is not available for the whole world).
2013-06-17 15:24:37 +02:00
ahocevar f7fd1cf2b0 Merge pull request #404 from ahocevar/canvas-transform
Vector features disappear completely as you zoom in (r=@tschaub)
2013-06-11 12:07:14 -07:00
ahocevar ea02626c28 Reducing number of default zoom levels
To avoid issues with long segments, we accept scaled tiles for
now. Further workarounds and browser tickets reporting our
issues are needed.
2013-06-11 21:06:18 +02:00
ahocevar e8ab4f9f0c Removing canvas renderer stub for VectorLayer2
Setting the renderer of the ten-thousand-points example to
WebGL should remove the need for this stub. This is basically
the same approach we took for all vector examples in master,
where we set the renderer to Canvas.
2013-06-10 11:22:32 +02:00
ahocevar 489459f313 Apply transform to coordinates rather than the canvas
Credit goes to @jystic for figuring out this approach.
2013-06-09 20:20:53 +02:00
ahocevar 7cd5266d39 Merge pull request #744 from ahocevar/getfeature
getFeatures method and featureInfo templates. r=@bartvde
2013-06-07 07:06:00 -07:00
ahocevar f83fedb9e1 API doc improvements 2013-06-07 15:34:14 +02:00
ahocevar 3a6c7cf204 Renaming featureInfoFunction to transformFeatureInfo 2013-06-07 15:34:13 +02:00
ahocevar 77d22c4038 getFeatures method and featureInfo templates
To avoid surprises for application developers, this change
creates a new getFeatures method. So it is clear now beforehand
whether features or feature info markup is returned. The result
is now also grouped by layer, so application developers always
have a link between a layer and the feature info it returns.

To make getFeatureInfo return markup for vector layers, this
change also adds a featureInfoFunction property to the vector
layer, which gives developers full control over how features are
rendered to feature info markup.
2013-06-07 15:34:13 +02:00
ahocevar 461d2a1ba8 Merge pull request #756 from ahocevar/extent-equals
Use ol.extent.equals, removing TODO. r=@elemoine
2013-06-01 15:14:20 -07:00
ahocevar 57e36f4eda Use ol.extent.equals, removing TODO 2013-06-01 11:11:13 -06:00
ahocevar 5560829695 Merge pull request #755 from ahocevar/newline
Fixing linter error
2013-05-31 19:07:46 -07:00
ahocevar b746116a20 Fixing linter error 2013-05-31 20:07:04 -06:00
ahocevar 4d5149a35f Merge pull request #754 from ahocevar/geom-doc
Exposing ol.geom.GeometryType
2013-05-31 14:05:22 -07:00
ahocevar 56ac30de91 Exposing ol.geom.GeometryType
This is necessary for using ol.filter.Geometry.
2013-05-31 15:04:55 -06:00
ahocevar 5a3ac559be Merge pull request #733 from ahocevar/fid
Store the feature's commonly used id. r=@fredj,@bartvde
2013-05-24 06:15:00 -07:00
ahocevar 111b127bf7 Merge pull request #2 from fredj/fid
Store the KML Placemark identifier
2013-05-24 06:14:29 -07:00
ahocevar 8c0f1f979a Store the feature's commonly used id
To not clobber the feature's attributes, this is a separate
member property.
2013-05-23 11:16:17 -05:00
ahocevar d1beaff8e4 Merge pull request #731 from ahocevar/rtree-api-tests
RTree API improvements and more tests. r=@twpayne
2013-05-23 08:28:56 -07:00
ahocevar 10e3a16f40 RTree API improvements and more tests
This change reverts the RTree API back to the original one (i.e.
insert() instead of put(), search() instead of find()), and
creates a new searchReturningObject() method that returns an
object keyed by UIDs.

It also adds missing tests for type restricted search and
searchReturningObject().
2013-05-22 18:25:40 -05: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
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
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
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
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
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
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
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
ahocevar 53b85c99ae map#getFeatureInfo does not return anything
Thanks @elemoine for catching this.
2013-05-09 22:32:40 +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
ahocevar 96c3a86314 Merge pull request #692 from ahocevar/pnpoly
Point-in-polygon improvements. r=@bartvde
2013-05-08 05:11:16 -07:00
ahocevar 019fc86ac5 Entertaining linter and compiler 2013-05-07 14:20:09 +02:00
ahocevar 666a010e3b Point-in-polygon improvements
As suggested by @tschaub in #674, geom.pointInPoly is not needed
if we have geom.LinearRing#containsCoordinate. This pull request
also adds tests and documentation on the limitations of the
containsCoordinate method.

I think for now it is ok to keep geometry/topology functions as
simple as possible in ol3. If we decide to not rely on third
party libraries like jsts for topology operations, we can always
refine what we have and e.g. port topology operations over from
ol2.
2013-05-07 10:49:51 +02:00
ahocevar 8fb8a718c3 Merge pull request #674 from ahocevar/getfeatureinfo
Getting feature information for vector layers. r=@twpayne,@fredj
2013-04-30 06:12:47 -07:00
ahocevar 00777de581 Do not check for listeners, as suggested by @fredj 2013-04-30 14:45:47 +02:00
ahocevar d2c81db06a Info box instead of tooltip as suggested by @fredj 2013-04-30 14:15:39 +02:00
ahocevar 58c8b07ab5 Get hit candidates from RTree, then refine result
Now we get exact hits also for lines and polygons.
2013-04-30 13:34:12 +02:00
ahocevar cc1b70c74b Giving the map a getFeatureInfoForPixel method
This method is an entry point for getting feature information.
Renderers can use a hit canvas or defer to a layer (source) to
get matching features for a pixel.

For now this is only implemented for vector layers, and it uses
a bbox query because we cannot refine the result because of
missing geometry intersection functions yet.
2013-04-30 13:32:16 +02:00
ahocevar f681a99ce0 Merge pull request #638 from ahocevar/kml-options
KML rendering in advanced compilation mode. r=@bartvde
2013-04-23 00:09:26 -07:00
ahocevar 8515e30ad8 Making the linter happy
... although jsdoc files are none of the linter's business.
2013-04-22 22:47:13 +02:00
ahocevar c16b941909 Exporting KML parser options
This is necessary because application developers need to be able
to configure the KML parser.
2013-04-22 22:37:20 +02:00
ahocevar aee6b8333b Merge pull request #545 from ahocevar/no-container
Docs align better with examples when not using a container
2013-04-14 00:20:39 -07:00
ahocevar f9281ac619 Docs align better with examples when not using a container 2013-04-14 09:19:40 +02:00
ahocevar 605ee491c4 Merge pull request #544 from ahocevar/no-timestamp
Removing the timestamp
2013-04-13 09:24:11 -07:00
ahocevar 6440ce5ea0 Removing the timestamp
When auto-generating the website using grunt in the
openlayers.github.io repo, we do not need to publish new docs
every time grunt is run, just because the timestamp is updated.
2013-04-13 18:23:31 +02:00
ahocevar 4a1f13ad0a Merge pull request #543 from ahocevar/jsdoc-typo
container-fluid is a class, not an id
2013-04-12 11:56:51 -07:00
ahocevar bbc20f505b container-fluid is a class, not an id 2013-04-12 20:55:57 +02:00
ahocevar 37ca407e50 Merge pull request #529 from ahocevar/global
Don't use window and document
2013-04-10 13:56:05 -07:00
ahocevar a437bea61f Use no browser globals at all 2013-04-10 16:53:45 +02:00
ahocevar dc1d7a1aba Don't use window and document
With this change, our JavaScript can also be executed by
non-brower engines.
2013-04-10 15:48:17 +02:00