Commit Graph

72 Commits

Author SHA1 Message Date
VLCEK Martin
e1593ce59d Support declutter mode for image styles
Allows to specify for each image style, whether the image
should be decluttered, always drawn but still serving as
obstacle, or drawn without being an obstacle for other
images/texts.

The layer must still have declutter = true set for this
property to have any effect.
2022-05-05 12:34:00 +02:00
Denis
585ae66961 Fix review for text justify 2022-04-14 13:06:49 +02:00
Denis
4db25c86c8 Implement text justify within the label box
See: https://github.com/openlayers/openlayers/issues/13481
2022-04-13 00:08:15 +02:00
Andreas Hocevar
18f06b8b9a Rich text labels 2022-02-23 12:36:56 +01:00
Tim Schaub
f10ba5c1e3 Avoid duplicate imports 2022-02-05 11:46:26 -07:00
Andreas Hocevar
79f5f46d27 Remove lint 2021-06-28 18:10:51 +02:00
Simon Seyock
2ad5789797 Add descriptions for properties. 2021-02-04 18:19:33 +01:00
Simon Seyock
8facb252f1 Replace google closure syntax = with brackets around name 2021-02-03 14:06:02 +01:00
Andreas Hocevar
fc20e77cea Fix image with text decluttering 2021-01-15 00:29:58 +01:00
Andreas Hocevar
1cc9fdb6ec Fix handling of VectorTile renderBuffer 2021-01-10 18:59:07 +01:00
Maximilian Krög
23dc768c2e Order callback calls by distance to click position
All callback calls for hits with a tolerance > 0 are queued and
called ordered by distance after all hits are detected.
2020-12-01 23:21:59 +01:00
Andreas Hocevar
28aaa2e0d3 Pass geometry to forEachFeatureAtPixel callback 2020-11-27 13:43:28 +01:00
Andreas Hocevar
11b9a0f5ed Merge pull request #11722 from ahocevar/text-align-rtl
Correct meaning of 'start' and 'end' text align for LTR text
2020-11-15 20:45:16 +01:00
Andreas Hocevar
7232001d9f Regex with better distinction between LTR and RTL characters
Co-authored-by: MoonE <maxi_kroeg@web.de>
2020-11-15 08:59:43 +01:00
Andreas Hocevar
7cc45c967b Correct meaning of 'start' and 'end' text align for LTR text 2020-11-06 18:13:50 +01:00
Maximilian Krög
b6ee7084c9 Fix stroke for text along path wiht negative x scale 2020-11-05 22:35:54 +01:00
Andreas Hocevar
c9ebf79df5 Add types and comments to make combined image+text decluttering clearer 2020-10-05 19:17:22 +02:00
Andreas Hocevar
8e862766fc New decluttering implementation 2020-09-27 21:13:26 +02:00
Andreas Hocevar
7a5e0db59f Remove decluttering for a fresh start 2020-09-18 23:31:20 +02:00
Haász Sándor
02e0b1af11 fix: modify rbush package import 2020-08-25 13:27:48 +02:00
mike-000
9468a088c0 ensure extent is valid when scale is negative
test large flipped icon in buffer zone
test hit detection for negative image scale
2020-08-07 10:26:38 +01:00
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