Commit Graph

648 Commits

Author SHA1 Message Date
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
e3c2142cab Do not add empty arrays to the frameState's declutterItems 2020-06-09 10:18:59 +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
f289979cbf Keep original renderBuffer for hit detection 2020-06-08 22:55:26 +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
79ccef7bf6 Do not append hit canvas to document body 2020-04-05 09:55:09 +02:00
Frederic Junod
a695ce8616 Remove all inheritDoc tags from src/ol/render 2020-04-03 07:56:58 +02:00
Szabo Bogdan
6aa398cbec Fix hit detection for images with missing size 2020-03-26 21:23:23 +01: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
07b02fe947 Do not exceed color range 2020-02-17 21:58:45 +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
gazza0
420e7d87ae Fixing issue #10497 on behalf of LarryHuang
Since Larry is not able to access github, i'm committing on behalf of him, explanation of the issue and he's original fix can be found https://github.com/openlayers/openlayers/issues/10497
2020-01-09 02:52:21 -08: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
d0b4967ec0 Fix feature lookup after removal of alpha 2019-11-18 08:56:20 +01:00
Andreas Hocevar
fcd98774a0 Do not fail when hit detecting features without style 2019-11-14 14:32:11 +01: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
4b13c6dae0 Speed up rendering by not using alpha 2019-10-30 14:36:23 +01:00
Andreas Hocevar
90d6a6f441 Move hit detection to its own module 2019-10-14 14:40:06 +02:00
Andreas Hocevar
3c243b0236 getFeature() for VectorTile layer 2019-10-08 08:23:38 +02:00
Andreas Hocevar
e9785317eb Move hit detection code to Immediate.js 2019-10-08 08:23:38 +02:00
Andreas Hocevar
315695eeb8 New Layer#getFeatures method with fast hit detection for VectorLayer 2019-10-08 08:23:38 +02:00
Tim Schaub
d3b47c794e Make the immediate API work with a user projection 2019-09-30 08:28:50 -06:00
Andreas Hocevar
838edfa369 Recover from skip feature removal regressions 2019-09-26 16:56:38 +02:00
Tim Schaub
14b931371d Merge pull request #10000 from KaiVolland/jsdoc-changes
Adopt JSDoc annotations to allow '.d.ts' generation
2019-09-25 16:26:24 +02:00
Kai Volland
68c052c9d5 Quote keys of TEXT_ALIGN to avoid minifcation 2019-09-25 15:40:24 +02:00
Olivier Guyot
4ad582ff01 Merge pull request #9986 from mike-000/patch-2
Make Circle geometry hit detection consistent with Polygon
2019-09-25 15:38:50 +02:00
Kai Volland
8611475477 Transforms TEXT_ALIGN enum
This transforms the TEXT_ALIGN enum to
avoid "empty enum" warning when running jsdoc.
2019-09-25 15:05:39 +02:00
Kai Volland
7c5f144cf4 Removes @fires annotation from LabelCache 2019-09-25 15:04:49 +02:00
mike-000
678f9136c6 Make Circle hit detection consistent with Polygon
Fixes one of the inconsistencies seen in #9395

Add hit detection for no fill and transparent fill

Based on the example used in #9395  The tests expect consistency between Polygon and Circle geometries but currently expect the inconsistent behaviour seen when using CircleStyle
2019-09-24 22:06:28 +01: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
Andreas Hocevar
ff063caa4e Merge pull request #9755 from ahocevar/font-loading
Font loading improvements
2019-07-15 12:21:28 +02:00
Frederic Junod
ad51c7c08f Use CanvasLineCap type instead of string 2019-07-05 11:11:35 +02:00