-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Maps] Add mvt format for ES-doc sources #74319
Conversation
9b615c6
to
bd4f39b
Compare
@@ -160,6 +160,11 @@ export class TiledVectorLayer extends VectorLayer { | |||
return false; | |||
} | |||
|
|||
if (!mbTileSource.tiles) { |
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.
@@ -836,6 +867,18 @@ export class VectorLayer extends AbstractLayer { | |||
type: 'geojson', | |||
data: EMPTY_FEATURE_COLLECTION, | |||
}); | |||
} else if (mbSource.type !== 'geojson') { |
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.
Needs to remove incompatible source-types and layers
@@ -143,6 +147,15 @@ export class MBMap extends React.Component { | |||
mbMap.addControl(new mapboxgl.NavigationControl({ showCompass: false }), 'top-left'); | |||
} | |||
|
|||
const hatchImageBase64 = | |||
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAADhCAYAAAByfIirAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAKYUAACmFAY9V/uEAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuNWWFMmUAAAlLSURBVHhe7dtRCuNmEoXREGb/S5h9ZHWZkhiBQXVjrB9cinw+aEM3nFwRCj9Zf1R/15+/6s9/tr+86c/689/6s5njD9vHsin2uvU/KsSyKXbOXobb39lzLJti1+3bEtz+/V0sm2LZ1GU7MlqxbIpl20ZGK5ZNsWzbyGjFsimWbRsZrVg2xbJtI6MVy6ZYtm1ktGLZFMu2jYxWLJti2baR0YplUywbmxhln223XzJP7LLPtvsv5K/A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1YNsWybSOjFcumWLZtZLRi2RTLxiZG2Wfb7VfuE7vss+3+9sQVOPXA7P3tdlTHm/Wf2qlnZu9vj7v66ij7bOvLik2t2Ne72j+8Wd/Hrll31cdet44qxK5Zd9XHrllH1cSuW3d1jl23b7vbA7PnWDb1U3ZktGLZFMu2jYxWLJti2baR0YplUyzbNjJasWyKZdtGRiuWTbFs28hoxbIplm0bGa1YNsWybSOjFcumWDY2Mco+226/cp/YZZ9t97cnrsCpB2bvb7ejOt6s/9ROPTN7f3vc1VdH2WdbX1ZsasW+3tX+4c36PnbNuqs+9rp1VCF2zbqrPnbNOqomdt26q3Psun3b3R6YPceyqZ+yI6MVy6ZYtm1ktGLZFMu2jYxWLJti2baR0YplUyzbNjJasWyKZdtGRiuWTbFs28hoxbIplm0bGa1YNsWysYlR9tl2+5X7xC77bLu/PXEFTj0we3+7HdXxZv2nduqZ2fvb466+Oso+2/qyYlMr9vWu9g9v1vexa9Zd9bHXraMKsWvWXfWxa9ZRNbHr1l2dY9ft2+72wOw5lk39lB0ZrVg2xbJtI6MVy6ZYtm1ktGLZFMu2jYxWLJti2baR0YplUyzbNjJasWyKZdtGRiuWTbFs28hoxbIplo1NjLLPttuv3Cd22Wfb/e2JK3Dqgdn72+2ojjfrP7VTz8ze3x539dVR9tnWlxWbWrH/v6s//v4fiP+fU3FxzHsAAAAASUVORK5CYII='; |
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.
Need to explore better designs for this one.
x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.js
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/sources/es_search_source/scaling_form.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/sources/es_search_source/scaling_form.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/sources/es_search_source/scaling_form.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/sources/es_search_source/update_source_editor.js
Outdated
Show resolved
Hide resolved
x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.d.ts
Outdated
Show resolved
Hide resolved
bcce360
to
76bdfcc
Compare
Pinging @elastic/kibana-gis (Team:Geo) |
* refactor: 💡 move timeRange, filters and query to base embeddabl * refactor: 💡 use new base embeddable input in explore data * feat: 🎸 import types as types
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Server side changes - removed console_legacy plugin! - added new es_config endpoint that returns server side es config at the moment this is just the first value in hosts - Slight refactor to how routes are registered to bring them more in line with other ES UI plugins * Client side update - Updated the client to not get es host from injected metadata. Instead use the new endpoint created server side that returns this value - Added a small README.md regarding the hooks lib and need to refactor use of jQuery in console - Write code to init the es host value on the client once at start up in a non-blocking way. If this fails we just use the default value of http://localhost:9200 as this powers non-essential console functionality (i.e., copy as cURL). * fix type issue and jest tests * fix another type issue * simplify proxy assignment in proxy handler mock Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…tic#75536) * move csp usage collector from legacy kibana plugin to kibana_usage_collection * make scripts/telemetry_check happy. * remove assertion on legacy kibana plugin * remove test on legacy kibana plugin * update README
…c#75163) Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…circular deps graphs (elastic#75579)
add unit tests functional boiler plate fine tune remove cruft
Pinging @elastic/ingest-management (Team:Ingest Management) |
sorry all for the spam. I messed up my rebase. Closing this one and will re-open. |
💔 Build Failed
Failed CI StepsBuild metrics@kbn/optimizer bundle module count
async chunks size
page load bundle size
History
To update your PR or re-run it, just comment with: |
WIP
Partially addresses #58519
Summary
This adds an .mvt vector tile option for Elasticsearch
geo_shape
documents.This allows display of a large amount of documents. The display of the geometries is optimized for scale. When zoomed in, the full geometry is returned, when zoomed out, a simplified geometry is shown.
`
Introduce a new scaling-type "mvt tiles"
Extend ESSearchSource to implement
This is different from the original POC (#57248), which introduced a new source type altogether. There are some advantages to just extending the existing
ESSearchSource
.Add new
getTile
route-backendThe URL encodes all relevant state. By doing so, the existing logic in
TiledVectorLayer
that determines when and how to swap mb-sources remains functional.Introduce the concept of a
too many features
boundsWhen the number of features exceeds the ES-limit, the tile contains a bounds of where the features are.
This is somewhat a "one-off"-addition, but imho it is relevant for the .mvt scaling type. This bounds indicates the user where the data is, but does not show the actual geometries. This is a similar approaches exist in other toolkits. The goal is to give users an indication of where to zoom-in.
e.g. consider building footprints for an entire US-state. There are too many to display at once (in the millions), and even if Maps could display them all at once, at zoomed out scales they would be much smaller than a pixel to see.
This needs design work. The current hash-pattern is somewhat ugly.
Future work
For feature completeness, following functionality needs to be added: (excluded from this PR, to keep changes to a minimum).
geo_point
Todo