Commit Graph

51 Commits

Author SHA1 Message Date
Andreas Hocevar
3744283f02 Only include renderBuffer when decluttering 2020-08-01 10:58:43 +02:00
Andreas Hocevar
6ec49d5ee0 Fix upright labels on vector tiles 2020-07-11 17:55:34 +02:00
Andreas Hocevar
323a472fbb Merge pull request #11037 from mike-000/patch-11
Allow icon and text styles to be scaled in two dimensions
2020-06-13 10:00:06 +02:00
Andreas Hocevar
1504cd942a Fix multigeometry decluttering 2020-06-09 09:43:55 +02:00
Andreas Hocevar
4d1f65f2db Restore functionality whennot decluttering 2020-06-08 23:21:43 +02:00
Andreas Hocevar
686c665c71 No empty declutter instructions, but with individual box 2020-06-08 22:43:38 +02:00
Andreas Hocevar
ff980077ee Consider area around viewport for decluttering 2020-06-08 22:40:26 +02:00
Andreas Hocevar
0f9de15448 Less declutter flicker by respecting renderBuffer 2020-06-08 11:39:02 +02:00
mike-000
cf0e650435 allow scale to be two dimensional
add getScaleArray() method

test two dimension scale icons
test two dimension scale text

add example of icon and label scaling
use smaller icon and larger interval
test two dimensional scale icons
test two dimensional scale icons
2020-05-20 09:54:47 +01:00
mike-000
7f99ce46bb set background fill style for each label
add check for declutter
2020-05-05 16:22:58 +01:00
mike-000
d72c7fdc13 set background fill style for each label 2020-05-05 13:04:25 +01:00
Andreas Hocevar
781a5443cf Handle scaled output canvas correctly 2020-04-29 20:19:42 +02:00
Andreas Hocevar
b0f20d6bd6 Use imports for enum types 2020-04-15 10:53:23 +02:00
Tim Schaub
054af09032 Make code prettier
This updates ESLint and our shared eslint-config-openlayers to use Prettier.  Most formatting changes were automatically applied with this:

    npm run lint -- --fix

A few manual changes were required:

 * In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import.
 * In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason.  While editing this, I reworked `ExampleBuilder` to be a class.
 * In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument.
2020-04-06 12:54:09 -06:00
Andreas Hocevar
3f7f999db0 Avoid try/catch, DOM and workers 2020-03-23 12:46:24 +01:00
Andreas Hocevar
bb1ca76bcc Make Executor work in workers 2020-03-23 12:46:22 +01:00
Andreas Hocevar
a03cfa35ed Store copies of background points for decluttering 2020-02-26 13:30:00 +01:00
Andreas Hocevar
0471b6e650 Do not render label with the current linedash 2020-02-14 13:50:03 +01:00
Andreas Hocevar
262373a4b5 Remove circular dependency 2020-02-12 20:31:18 +01:00
Andreas Hocevar
a24c94487c Cache label instructions for better performance 2020-01-30 09:14:02 +01:00
Andreas Hocevar
fd935bae53 Remove label cache, render text directly to target canvas 2020-01-13 22:12:53 +01:00
Andreas Hocevar
da6eed850c Do not lock label cache entries 2020-01-05 11:24:46 +01:00
Matt Walker
a389903749 Import transpiled rbush. Resolves #10379 2019-12-05 12:09:42 +00:00
Andreas Hocevar
ac50cc3460 New eslint config with no-multi-assign 2019-11-02 15:20:21 +01:00
Andreas Hocevar
bb2bdb17aa Render vector tile layers to a single canvas 2019-10-31 20:29:19 +01:00
Andreas Hocevar
838edfa369 Recover from skip feature removal regressions 2019-09-26 16:56:38 +02:00
Tim Schaub
b1f0b6997b Additional changes to work with user projection 2019-09-24 19:58:53 +02:00
Simon Seyock
acac7a9403 remove skipFeature logic 2019-09-24 10:12:30 +02:00
ahocevar
bd3f35eef0 Declutter multi geometries per geometry instead of per feature 2019-08-17 23:55:20 +02:00
Frederic Junod
ad51c7c08f Use CanvasLineCap type instead of string 2019-07-05 11:11:35 +02:00
Frederic Junod
7a8a0c18ae Use CanvasLineJoin type instead of string 2019-07-05 11:07:10 +02:00
ahocevar
ace5c65ee5 Smarter opacity handling 2019-05-22 16:47:23 +02:00
ahocevar
a45e704be2 Smarter reuse detection 2019-05-22 16:46:46 +02:00
Andreas Hocevar
56ec6b093e Merge pull request #9548 from ahocevar/italic-labels
Avoid cut off labels for italic fonts
2019-05-15 16:58:17 +02:00
ahocevar
2e31f716ed Avoid cut off labels for italic text 2019-05-15 15:01:12 +02:00
Tim Schaub
09fdd30876 Upgrade to rbush@3 2019-05-14 18:43:08 -06:00
ahocevar
12289b8ef9 Declutter in correct order and for all layers 2019-05-05 12:20:38 +02:00
ahocevar
461256767e Make pattern fills work on a scaled canvas 2019-03-20 22:25:25 +01:00
ahocevar
09a1c1ef1b Avoid clipping when rendering to tiles that don't exceed the clip extent 2019-01-24 09:09:22 +01:00
ahocevar
592b6cf362 Keep track of used labels 2019-01-23 21:52:22 +01:00
ahocevar
5389e9675c Faster extent calculation with less garbage 2019-01-15 00:30:39 +01:00
Frederic Junod
39a21f177d Use FeatureLike typedef 2018-12-12 15:03:54 +01:00
Frederic Junod
b3520f8217 Remove CANVAS_LINE_DASH from ol/has
Test if `context.setLineDash` is defined instead.
2018-12-07 13:15:23 +01:00
ahocevar
f4aec3fd01 Remove unused Builder/Executor functions and members 2018-11-25 20:06:37 +01:00
Tim Schaub
8b50c3c6cb Pass along the ability to measure and cache text width 2018-11-19 15:34:48 -07:00
ahocevar
8d51e0d487 Remove resolved FIXMEs 2018-11-16 13:50:42 +01:00
ahocevar
981b398042 Add a FIXME for the measure function to go away 2018-11-16 13:49:50 +01:00
ahocevar
6cbde797be Use NaN for unavailable values and handle text creation separately 2018-11-16 13:35:15 +01:00
ahocevar
d3355f613c Combine if blocks 2018-11-16 13:04:03 +01:00
Guillaume Beraudo
81d0bc21d5 Pass instructions to executor constructor 2018-11-16 12:36:50 +01:00