Commit Graph

7743 Commits

Author SHA1 Message Date
Andreas Hocevar c2f90f21db Merge pull request #4647 from ahocevar/snap-round-to-pixel
Proper rounding for possibly negative numbers
2016-01-11 16:34:24 +01:00
Andreas Hocevar a3147c5d08 Proper rounding for possibly negative numbers 2016-01-11 16:25:09 +01:00
Andreas Hocevar d916e8ccaf Merge pull request #4629 from ahocevar/scaleline
Simplify scaleline calculation
2016-01-11 10:12:53 +01:00
Andreas Hocevar d05b519f2f Merge pull request #4457 from alexbrault/colour-icon
Add color option to ol.style.Icon
2016-01-10 23:19:54 +01:00
Andreas Hocevar dfb534f1d4 Do not rely on projection extent 2016-01-08 10:25:56 +01:00
Andreas Hocevar 393a95e41c Properly handle modulo of negative numbers 2016-01-07 20:19:40 +01:00
Andreas Hocevar b8fc917016 Do not depend on units for resolutions calculation 2016-01-07 20:14:44 +01:00
Andreas Hocevar 6b8da1237c Simplify scaleline calculation 2016-01-07 20:14:44 +01:00
Andreas Hocevar 5c49e399ce Merge pull request #4581 from ahocevar/no-render-on-interaction-start
Do not render in handleDownEvent
2016-01-07 18:24:39 +01:00
Frédéric Junod 32dadc008b Merge pull request #4541 from fredj/linestring_interpolated_point
Add new ol.geom.LineString#getCoordinateAt function
2016-01-07 18:02:21 +01:00
Frederic Junod e336947e8d Add new ol.geom.LineString#getCoordinateAt function 2016-01-07 11:32:25 +01:00
Petr Sloup bc0d783f50 Use XHR by default to load TileJSON in ol.source.TileJSON 2016-01-07 09:19:23 +01:00
Andreas Hocevar 24f8cba0a1 Simplify meters per unit handling 2016-01-06 13:53:55 +01:00
Andreas Hocevar cde6dce939 Merge pull request #4574 from WeaveTeam/dragbox-config-pr
Added boxEndCondition to DragBoxOptions to replace the hardcoded chec…
2016-01-06 11:47:56 +01:00
Frédéric Junod 8c6d9c9e66 Merge pull request #4606 from fredj/ol.DragBoxEvent_MapBrowserEvent
Include originating MapBrowserEvent in ol.DragBoxEvent
2016-01-06 09:15:32 +01:00
Tim Schaub b8d69e0f3b Merge pull request #4614 from tschaub/one-fewer-interface
Remove checksum interface.
2016-01-05 11:16:34 -07:00
Philip "digitalfox" Kovac 10e2510f0f Added boxEndCondition to DragBoxOptions to replace the hardcoded check against DRAG_BOX_HYSTERESIS_PIXELS_SQUARED. 2016-01-05 13:14:30 -05:00
Andreas Hocevar 15be53e98c Merge pull request #4613 from ahocevar/select-self
Include own layer in layerFilter and only select unselected features
2016-01-05 17:48:20 +01:00
Tim Schaub aeffd48ccb Remove checksum interface 2016-01-05 07:07:45 -07:00
Petr Sloup ffd9ace84e Add option to load TileJSON via XHR 2016-01-05 13:40:20 +01:00
Guillaume Beraudo a1c72d8890 Add missing return type to GeoJSON format 2016-01-05 11:02:23 +01:00
Andreas Hocevar a65d2d4078 Include own layer in layerFilter and only select unselected features
When selecting an already selected feature, it will be on the Select
interaction's featureOverlay_. So we need to include that featureOverlay_
in the layer filter, regardless of what the user set as layer filter.

When in toggle mode, we need to make sure that we only select features that
are not already included in the selection.
2016-01-04 21:55:00 +01:00
Andreas Hocevar 9f43716723 Merge pull request #4596 from ahocevar/tile-key
Use consistent tile coordinate keys
2016-01-04 19:27:47 +01:00
Bart van den Eijnden cdf9a8e84d Add ol.proj.setProj4 function 2016-01-04 18:51:04 +01:00
Frederic Junod 7a364e0593 Include originating MapBrowserEvent in ol.DragBoxEvent 2016-01-04 13:29:26 +01:00
Alexandre Brault 3f16b340fc Accept string as color input 2016-01-01 12:16:50 -05:00
Alexandre Brault 5c70d37da6 Don't tint the icon if the image is tainted 2016-01-01 12:16:50 -05:00
Alexandre Brault c0b6eac0c2 Add color option to ol.style.Icon 2016-01-01 12:16:50 -05:00
Andreas Hocevar b208550e6e Merge pull request #4595 from ahocevar/opaque-xyz
Pass 'opaque' option on to superclass
2015-12-28 14:40:59 +01:00
Petr Sloup 767ac44e99 Make ol.source.Tile#getTilePixelRatio work for all sources
Even for sources which serve dynamic tile sizes based on devicePixelRatio
2015-12-28 13:19:03 +01:00
Petr Sloup 9cdf7678bb Make ol.reproj.Tile#load always async for consistency 2015-12-28 09:30:12 +01:00
Andreas Hocevar 300b5cad44 Use consistent tile coordinate keys
Tile coordinate keys from ol.tilecoord.toString() are different than the ones
from Array.prototype.toString(). Both were used, potentially causing problems.
This change makes them consistent and removes the now unnecessary
ol.tileCoord.toString() function.
2015-12-27 17:59:51 +01:00
Andreas Hocevar 72ec3fd48d Pass 'opaque' option on to superclass 2015-12-27 17:08:54 +01:00
Petr Sloup e1712eb44a Initiate tile load only after registering it as loading 2015-12-26 10:49:21 +01:00
Andreas Hocevar 552063aeac Do not render in handleDownEvent 2015-12-18 18:21:32 +01:00
Andreas Hocevar 38bb1569af Remove no longer needed buffer for direct rendering 2015-12-18 00:27:42 +01:00
Andreas Hocevar 9affb99899 More sensible split between direct and canvas rendering 2015-12-17 10:58:35 +01:00
Andreas Hocevar 80f10ce824 Avoid unnecessary calculation in loops 2015-12-17 00:17:28 +01:00
Andreas Hocevar 46a266fa5c Fix replays on transformed contexts 2015-12-17 00:17:27 +01:00
Andreas Hocevar 4f2df30f1d Avoid clipping by rendering tiles with rotated labels
This only works when the device pixel ratio is 1. Labels are incorrectly
positioned and not at all rotated for other pixel ratios. I cannot find the
cause for this problem.
2015-12-17 00:17:27 +01:00
Andreas Hocevar c1b16217f2 Conditionally render tiles to a separate tile canvas
Because clip geometries are anti-aliased in most browsers, there will be tiny
gaps between tiles. If tiles are rendered to a tile canvas which is then drawn
to the map canvas upon composition, these gaps can be avoided. For rotated
views, it is stil necessary to clip the tile, but in this case a 1-pixel
buffer is used.

This change also brings a huge performance improvement for panning, because
the fully rendered tiles can be reused.

Because of the added cost of using drawImage in addition to replaying the tile
replay group, we fall back to directly drawing to the map canvas when the tile
canvas would be too large, or during interaction/animation when resolution or
rotation change.
2015-12-17 00:17:27 +01:00
Bart van den Eijnden 25e0053a13 Rename defaultSort to numberSafeCompareFunction on ol.array 2015-12-16 13:40:05 +01:00
Bart van den Eijnden e0be143ed5 Always pass on a compare function to sort 2015-12-16 10:54:46 +01:00
Andreas Hocevar 9b1416da29 Merge pull request #4552 from ahocevar/fix-proj-compiler-issue
Make sure compiled code calls ol.VectorTile#setProjection
2015-12-13 13:31:47 +01:00
Petr Sloup 9f5d85f2c6 Handle tile coordinate wrapping when reprojecting raster tiles 2015-12-11 16:35:23 +01:00
Andreas Hocevar fbb59d29b9 Make sure compiled code calls ol.VectorTile#setProjection 2015-12-11 15:20:21 +01:00
Bart van den Eijnden 554aaf1574 Merge pull request #4537 from bartvde/issue-4312
Allow specifying non default DPI on ol.source.TileArcGISRest
2015-12-11 13:42:26 +01:00
Philip Clifton 97995cf20b Add newline support for text 2015-12-10 11:24:39 -06:00
Frederic Junod 7192644c07 Register the change callback when the tile is enqueued 2015-12-09 17:15:47 +01:00
Bart van den Eijnden 992870e2d2 Allow specifying non default DPI on ol.source.TileArcGISRest 2015-12-09 15:27:20 +01:00