-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Maps] Add mvt format for ES-doc sources #74319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
bd4f39b
mvt init
thomasneirynck 4da768c
cleanup
thomasneirynck aae411f
typing
thomasneirynck a3fbf97
update snapshot
thomasneirynck 828ce8a
Enable mvt only for geo_shape
thomasneirynck 02e7688
fix ts
thomasneirynck 058c116
Fix snapshot
thomasneirynck 43efc7c
update functional tests
thomasneirynck 4c238c7
Merge branch 'master' of github.com:elastic/kibana into maps/es_mvt
thomasneirynck 76bdfcc
feedback
thomasneirynck 2371e7b
fix snapshot
thomasneirynck 9769159
disable client-side metadata retrieval
thomasneirynck 3a5a642
fix typos
thomasneirynck aa3e6e1
take into account url-state
thomasneirynck 318e2e8
Merge branch 'master' of github.com:elastic/kibana into maps/es_mvt
thomasneirynck d011799
add unit test
thomasneirynck 4839327
add test stub
thomasneirynck d1cb30d
add functional test
thomasneirynck f611360
add getTile unit test boilerplate
thomasneirynck abe3188
fix import
thomasneirynck c73faef
exclude bbox-features from tooltips
thomasneirynck 919024a
only include required fields
thomasneirynck 0010eae
Merge branch 'master' of github.com:elastic/kibana into maps/es_mvt
thomasneirynck 6e2455f
simplify test
thomasneirynck 38e3a54
import
thomasneirynck 4df20b4
wording feedback
thomasneirynck 20ba148
[Console] Update extract string literal logic (#72628)
jloleysens 989c87b
Retry network errors on registry requests (#74507)
6791c13
[Ingest Manager] Don't retain POST /setup results. fixes #74587 (#75372)
539d84b
Fixing functional test user roles (#75547)
flash1293 0a8862d
[Ingest pipelines] Test pipeline enhancements (#74964)
alisonelizabeth 31b566c
Fixes viewer overflow bug (#75489)
dplumlee 28bacb2
[expressions] Remove legacy APIs. (#75517)
lukeelmers d84d972
adding additional tests for the awesome new nav by core ui team and c…
bhavyarm 865f171
[Enterprise Search][bug/tech debt] Fix route navigation (#75369)
constancecchen 2c10325
[Dashboard First] Use App Title for Display Instead of App Id (#75457)
ThomThomson d6ee7fa
[Ingest Pipelines] Processor forms for processors E-J (#75054)
jloleysens d7256e1
[Metrics UI] Support percentage format in threshold alerts (#72701)
Zacqary d37ec02
[Metrics UI] Get custom metrics working in inventory alerts with limi…
Zacqary 9d7469b
[Task Manager] Monitors the Task Manager Poller and automatically rec…
gmmorris 31f1a83
[Ingest Manager] Add namespace validation (#75381)
jen-huang 4ac998f
[ML] Update broken job config callout error (#75481)
qn895 d47337b
[kbn/plugin-generator] remove sao, modernize (#75465)
258591e
[TSVB] Disable enableHistogramMode prop when user selects non-stacked…
stratoula 0f456f1
[ML] Transforms: Unset doc title when app unmounts (#75539)
peteharverson 6e162ff
adding markdown vis renderer (#75532)
ppisljar 42c2f8e
Embeddable input (#73033)
streamich aeb6573
[Lens] Use index pattern service instead saved object client (#74654)
mbondyra e91528e
[Uptime] Add delay in telemetry test (#75162)
shahzad31 040b4e2
[Console] Get ES Config from core (#75406)
jloleysens f67ac7f
Migrate CSP usage collector to `kibana_usage_collection` plugin (#75536)
pgayvallet 80ce878
[Data Telemetry] Add index pattern to identify "meow" attacks (#75163)
afharo 2f1a03e
[Security Solution] modify circular deps checker to output images of …
b7504b3
update snap
thomasneirynck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,9 +15,11 @@ import { | |
| SOURCE_BOUNDS_DATA_REQUEST_ID, | ||
| FEATURE_VISIBLE_PROPERTY_NAME, | ||
| EMPTY_FEATURE_COLLECTION, | ||
| KBN_TOO_MANY_FEATURES_PROPERTY, | ||
| LAYER_TYPE, | ||
| FIELD_ORIGIN, | ||
| LAYER_STYLE_TYPE, | ||
| KBN_TOO_MANY_FEATURES_IMAGE_ID, | ||
| } from '../../../../common/constants'; | ||
| import _ from 'lodash'; | ||
| import { JoinTooltipProperty } from '../../tooltips/join_tooltip_property'; | ||
|
|
@@ -777,6 +779,8 @@ export class VectorLayer extends AbstractLayer { | |
| const sourceId = this.getId(); | ||
| const fillLayerId = this._getMbPolygonLayerId(); | ||
| const lineLayerId = this._getMbLineLayerId(); | ||
| const tooManyFeaturesLayerId = this._getMbTooManyFeaturesLayerId(); | ||
|
|
||
| const hasJoins = this.hasJoins(); | ||
| if (!mbMap.getLayer(fillLayerId)) { | ||
| const mbLayer = { | ||
|
|
@@ -802,6 +806,30 @@ export class VectorLayer extends AbstractLayer { | |
| } | ||
| mbMap.addLayer(mbLayer); | ||
| } | ||
| if (!mbMap.getLayer(tooManyFeaturesLayerId)) { | ||
| const mbLayer = { | ||
| id: tooManyFeaturesLayerId, | ||
| type: 'fill', | ||
| source: sourceId, | ||
| paint: {}, | ||
| }; | ||
| if (mvtSourceLayer) { | ||
| mbLayer['source-layer'] = mvtSourceLayer; | ||
| } | ||
| mbMap.addLayer(mbLayer); | ||
| mbMap.setFilter(tooManyFeaturesLayerId, [ | ||
| '==', | ||
| ['get', KBN_TOO_MANY_FEATURES_PROPERTY], | ||
| true, | ||
| ]); | ||
| mbMap.setPaintProperty( | ||
| tooManyFeaturesLayerId, | ||
| 'fill-pattern', | ||
| KBN_TOO_MANY_FEATURES_IMAGE_ID | ||
| ); | ||
| mbMap.setPaintProperty(tooManyFeaturesLayerId, 'fill-opacity', this.getAlpha()); | ||
| } | ||
|
|
||
| this.getCurrentStyle().setMBPaintProperties({ | ||
| alpha: this.getAlpha(), | ||
| mbMap, | ||
|
|
@@ -822,6 +850,9 @@ export class VectorLayer extends AbstractLayer { | |
| if (lineFilterExpr !== mbMap.getFilter(lineLayerId)) { | ||
| mbMap.setFilter(lineLayerId, lineFilterExpr); | ||
| } | ||
|
|
||
| this.syncVisibilityWithMb(mbMap, tooManyFeaturesLayerId); | ||
| mbMap.setLayerZoomRange(tooManyFeaturesLayerId, this.getMinZoom(), this.getMaxZoom()); | ||
| } | ||
|
|
||
| _syncStylePropertiesWithMb(mbMap) { | ||
|
|
@@ -836,6 +867,18 @@ export class VectorLayer extends AbstractLayer { | |
| type: 'geojson', | ||
| data: EMPTY_FEATURE_COLLECTION, | ||
| }); | ||
| } else if (mbSource.type !== 'geojson') { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needs to remove incompatible source-types and layers |
||
| this.getMbLayerIds().forEach((mbLayerId) => { | ||
| if (mbMap.getLayer(mbLayerId)) { | ||
| mbMap.removeLayer(mbLayerId); | ||
| } | ||
| }); | ||
|
|
||
| mbMap.removeSource(this._getMbSourceId()); | ||
| mbMap.addSource(this._getMbSourceId(), { | ||
| type: 'geojson', | ||
| data: EMPTY_FEATURE_COLLECTION, | ||
| }); | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -865,13 +908,18 @@ export class VectorLayer extends AbstractLayer { | |
| return this.makeMbLayerId('fill'); | ||
| } | ||
|
|
||
| _getMbTooManyFeaturesLayerId() { | ||
| return this.makeMbLayerId('toomanyfeatures'); | ||
| } | ||
|
|
||
| getMbLayerIds() { | ||
| return [ | ||
| this._getMbPointLayerId(), | ||
| this._getMbTextLayerId(), | ||
| this._getMbSymbolLayerId(), | ||
| this._getMbLineLayerId(), | ||
| this._getMbPolygonLayerId(), | ||
| this._getMbTooManyFeaturesLayerId(), | ||
| ]; | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because the layer-type and the underlying representation in mb changes when toggling between scaling-types. It needs to check it the mb-source is compatible with the layer-type.