Commit Graph
59 Commits
Author SHA1 Message Date
Petr Sloup 3cc8291df4 Support pixelRatio during reprojection 2015-10-16 09:28:41 +02:00
Petr Sloup c2b21985f4 Add ol.source.TileImage#setTileGridForProjection method 2015-10-16 09:28:41 +02:00
Petr Sloup 168b675191 Add reprojectionErrorThreshold option to the tiled image sources 2015-10-16 09:28:41 +02:00
Petr Sloup ebc1bc0096 Better handling of tilegrids without extent during reprojection
For WMTS source, the tilegrid has no extent, but the projection can
2015-10-16 09:28:41 +02:00
Petr Sloup be6bf00d74 Add defines for certain reprojection constants 2015-10-16 09:28:41 +02:00
Petr Sloup f481070f82 Handle tilegrids without extent during tile reprojection 2015-10-16 09:28:41 +02:00
Petr Sloup 9a460b5f6b Handle cross-browser canvas antialiasing issues during reprojection
By doing strictly 1 drawImage per triangle; triangle overlapping and
using different blending mode.
2015-10-16 09:28:41 +02:00
Petr Sloup 8b38928aad Make rendering of reprojection edges configurable 2015-10-16 09:28:41 +02:00
Petr Sloup 30cd0aa584 Improve reprojection performance
Utilize the numerical shifting during reprojection to easily reduce
complexity of the linear system that needs to be solved.
2015-10-16 09:28:41 +02:00
Petr Sloup 8ab197eba6 Optimize the reprojection by stitching the sources prior to rendering
This solves canvas antialiasing issues and also simplifies the code
handling wrapX in the source projection.
2015-10-16 09:28:41 +02:00
Petr Sloup 6482ccf2f7 Make ol.reproj.Triangulation a class 2015-10-16 09:28:41 +02:00
Petr Sloup 0f408e341f Rename ol.source.Image#getImage implementations to #getImageInternal
This allows for the reprojection to be initialized in the #getImage,
while #getImageInternal is used to obtain the actual data.
2015-10-16 09:28:41 +02:00
Petr Sloup ed1e49045a Allow different source and view projection in image layer renderers
To enable image layer reprojection.
2015-10-16 09:28:41 +02:00
Petr Sloup be0a0de759 Integrate image reprojection with ol.source.Image 2015-10-16 09:28:41 +02:00
Petr Sloup 15575288e0 Add ol.ENABLE_RASTER_REPROJECTION define 2015-10-16 09:28:41 +02:00
Petr Sloup f2f77091ad Handle tile sources without projection
Such sources should never be reprojected (and no additional tilecache or
tilegrid should be created).
2015-10-16 09:28:41 +02:00
Petr Sloup c205323ff2 Reproject correctly when transform returns +-Infinity values 2015-10-16 09:28:41 +02:00
Petr Sloup b0694c1e3b Add projection parameter to ol.source.Tile#expireCache and #useTile
This is required to be able to determine which cache the xyz coordinates
refer to (in case we have more caches).
2015-10-16 09:28:41 +02:00
Petr Sloup e0cfa1951a Add projection parameter to ol.source.Tile#forEachLoadedTile 2015-10-16 09:28:41 +02:00
Petr Sloup 63084d30e9 Improve numerical stability of reprojection
By shifting the source points before calculating the affine transform to
obtain values from similar ranges (inputs and outputs of the transform).
2015-10-16 09:28:41 +02:00
Petr Sloup 9b82f19cc2 Simplify triangle-shifting logic for reprojection 2015-10-16 09:28:41 +02:00
Petr Sloup 3f567b0bf0 Use per-projection tilecaches and tilegrids (persistent instances) 2015-10-16 09:28:40 +02:00
Petr Sloup bc74273208 Reproject every image only once per triangle
If the triangle has to be shifted, determine if the image has to be rendered shifted or not.
2015-10-16 09:28:40 +02:00
Petr Sloup 6e08fc9e13 Rename triangles to triangulation to be more precise 2015-10-16 09:28:40 +02:00
Petr Sloup bf65b8a4fe Stronger typing of triangles and triangulation 2015-10-16 09:28:40 +02:00
Petr Sloup e14bede9e9 Make projection parameter of ol.source.Tile#getTile no longer optional 2015-10-16 09:28:40 +02:00
Petr Sloup ac76989447 Detect and handle triangles (tiles) crossing the dateline (projection edge) 2015-10-16 09:28:40 +02:00
Petr Sloup b221e1ac1f Basic integration of raster reprojection for tiled sources
To allow for easier testing and debugging
2015-10-16 09:28:40 +02:00
Petr Sloup ebc3f24671 Clamp the triangulation vertices if partially outside source extent 2015-10-16 09:28:40 +02:00
Petr Sloup fcffce46b4 More robust way of handling non-global projections
If the target projection has specified extent, it is respected.
Also adds various checks to optimize performance and/or
prevent potential errors.
2015-10-16 09:28:40 +02:00
Petr Sloup 2cc2027353 More precise and robust way of calculating source resolution 2015-10-16 09:28:40 +02:00
Petr Sloup c425b9c0e6 Verify triangulation against source/target extents
If we do this here, we can avoid some computations on triangles that will
be unused in the future anyway + reduce problems with non-global projections
without specified extents.
2015-10-16 09:28:40 +02:00
Petr Sloup 1222287f22 Add ol.reproj 2015-10-16 09:28:40 +02:00
Petr Sloup 44a64ba451 Add ol.math.solveLinearSystem 2015-10-16 09:28:40 +02:00
Petr Sloup eac5d652cf Check projection.canWrapX() before wrapping tiles
Even if wrapX is true on the source
2015-07-02 15:21:34 +02:00
Petr Sloup 5993b45c63 Allow custom tileGrid in ol.source.XYZ 2015-06-19 19:58:06 +02:00
Petr Sloup f1f0b37bdc Stronger type checking to continue only if data is defined 2015-04-14 14:15:47 +02:00
Petr Sloup 65583a8b77 preemptive is now true by default + improved documentation 2014-12-12 12:19:20 +01:00
Petr Sloup 7bcd925cdb Minor code style fix 2014-12-12 11:55:55 +01:00
Petr Sloup 82a30b4cd5 Modified the sync/async behavior logic of the forDataAtCoordinate* methods 2014-12-12 11:47:35 +01:00
Petr Sloup d28ffc4808 Use null instead of undefined in the callback 2014-12-06 15:42:40 +01:00
Petr Sloup b03b762500 More properties made private 2014-12-06 15:26:49 +01:00
Petr Sloup 48478c6868 Listen 'mousemove' and 'click' rather than 'pointermove' in the TileUTFGrid example 2014-12-06 15:21:14 +01:00
Petr Sloup ca77a20b57 Improved TileUTFGrid example 2014-12-06 15:07:52 +01:00
Petr Sloup ac144d934f Documentation blocks for the option members 2014-12-06 14:19:56 +01:00
Petr Sloup 250a1e4da3 Various code style fixes 2014-12-06 14:13:22 +01:00
Petr Sloup 363ac54509 Suppress warning about dot notation (compiler would report undefined properties) 2014-12-05 20:26:33 +01:00
Petr Sloup c8bc3620d3 Added TileUTFGrid example 2014-12-05 17:33:30 +01:00
Petr Sloup 4b605d40d9 getTemplate method to get the Mustache template from the TileJSON 2014-12-05 16:07:37 +01:00
Petr Sloup ef816d30ed The preemptive loading of UTFGrid tiles is now optional 2014-12-05 16:07:37 +01:00
Petr Sloup 99eab24b20 Implementation of the ol.source.TileUTFGridTile_#getData method 2014-12-05 16:07:36 +01:00
Petr Sloup 9f7e94ec85 Added UTFGridJSON to the TileJSON externs 2014-12-05 16:07:35 +01:00
Petr Sloup 641a829918 Incomplete getFeatureInfo implementation 2014-12-05 16:07:34 +01:00
Petr Sloup 794c7950c8 Added ol.source.TileUTFGrid 2014-12-05 16:07:34 +01:00
Petr Sloup d7027a6a64 Export getLayers and setLayers methods of ol.layer.Group
This is nicer than having to use .get("layers") and .set("layers", x).
2014-08-18 13:48:42 +02:00
Petr Sloup 1d5c746974 Export getHTML method of ol.Attribution to the api 2014-08-18 13:48:34 +02:00
Petr Sloup 0ac90e62b9 Added some api annotations required for accessing layer properties 2014-08-18 13:48:14 +02:00
Petr Sloup 5d31d2044a Added "state" property of olx.source.TileImageOptions to the olx externs 2014-08-14 09:32:27 +02:00
Petr Sloup 4b24eb6eb2 Added 'state' constructor option to Tile and TileImage sources 2014-08-13 17:11:29 +02:00