-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Vega] Use mapbox instead of leaflet #88605
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
Conversation
|
@elasticmachine merge upstream |
2f8f04b to
f1e02e0
Compare
add MapServiceSettings class some work add tms_raster_layer add LayerParameters type clenup view.ts some cleeanup fix grammar some refactoring and add attribution control Some refactoring Add some validation for zoom settings and destroy handler Some refactoring some work fix bundle size Move getZoomSettings to the separate file update licence some work move logger to createViewConfig add throttling for updating vega layer
|
@elasticmachine merge upstream |
…ser open map layer
|
@elasticmachine merge upstream |
thomasneirynck
left a comment
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.
nothing really jumping out for me. Works as expected.
Some minor comments for cleanup.
src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.ts
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.ts
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_vega/public/vega_view/vega_map_view/view.ts
Outdated
Show resolved
Hide resolved
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
ryankeairns
left a comment
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.
Approving the SCSS change.
I will defer to @miukimiu for the UX review, if needed.
thomasneirynck
left a comment
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.
lgtm!
thanks a lot @VladLasitsa
This was an important PR for the Maps-team. It will enable us to:
- continue to work on the removal of region/coordinate maps
- to remove leaflet from the Kibana codebase
- to remove dependency on the raster-image service of EMS
- support on-prem deployments of EMS for Vega-maps users
💯
|
@elasticmachine merge upstream |
src/plugins/vis_type_vega/public/vega_view/vega_map_view/utils/validataion_helper.ts
Show resolved
Hide resolved
|
@elasticmachine merge upstream |
|
Also @VladLasitsa we merged the ts references for vega and it seems that it fails. Can you fix it? cc @alexwizp |
stratoula
left a comment
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.
LGTM, tested locally in chrome, everything seems fine 🙂
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* [WIP][Vega] Use mapbox instead of leaflet elastic#78395 add MapServiceSettings class some work add tms_raster_layer add LayerParameters type clenup view.ts some cleeanup fix grammar some refactoring and add attribution control Some refactoring Add some validation for zoom settings and destroy handler Some refactoring some work fix bundle size Move getZoomSettings to the separate file update licence some work move logger to createViewConfig add throttling for updating vega layer * move EMSClient to a separate bundle * [unit testing] add tests for validation_helper.ts * [Bundle optimization] lazy loading of '@elastic/ems-client' only if user open map layer * [Map] fix cursor: crosshair -> auto * [unit testing] add tests for tms_raster_layer.test * [unit testing] add tests for vega_layer.ts * VSI related code was moved into a separate file / unit tests were added * Add functional test for vega map * [unit testing] add tests for map_service_setting.ts * Add unload in function test and delete some unneeded code from test * road_map -> road_map_desaturated * [unit testing] add more tests for map_service_settings.test.ts * Add unit tests for view.ts * Fix some remarks * Fix unit tests * remove tms_tile_layers enum * [unit testing] fix map_service_settings.test.ts * Fix unit test for view.ts * Fix some comments * Fix type check * Fix CI Co-authored-by: Alexey Antonov <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
* [WIP][Vega] Use mapbox instead of leaflet #78395 add MapServiceSettings class some work add tms_raster_layer add LayerParameters type clenup view.ts some cleeanup fix grammar some refactoring and add attribution control Some refactoring Add some validation for zoom settings and destroy handler Some refactoring some work fix bundle size Move getZoomSettings to the separate file update licence some work move logger to createViewConfig add throttling for updating vega layer * move EMSClient to a separate bundle * [unit testing] add tests for validation_helper.ts * [Bundle optimization] lazy loading of '@elastic/ems-client' only if user open map layer * [Map] fix cursor: crosshair -> auto * [unit testing] add tests for tms_raster_layer.test * [unit testing] add tests for vega_layer.ts * VSI related code was moved into a separate file / unit tests were added * Add functional test for vega map * [unit testing] add tests for map_service_setting.ts * Add unload in function test and delete some unneeded code from test * road_map -> road_map_desaturated * [unit testing] add more tests for map_service_settings.test.ts * Add unit tests for view.ts * Fix some remarks * Fix unit tests * remove tms_tile_layers enum * [unit testing] fix map_service_settings.test.ts * Fix unit test for view.ts * Fix some comments * Fix type check * Fix CI Co-authored-by: Alexey Antonov <[email protected]> Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Alexey Antonov <[email protected]> Co-authored-by: Kibana Machine <[email protected]>
Closes: #78395
Summary
The task was to get rid of the use of
mapLegacy(since it will be removed soon) and migrate to theMapBox.As part of this task the following was done:
MapBoxand used it as a map for Vega. Created a new view (https://github.com/elastic/kibana/pull/88605/files#diff-007ffb62742258bc950468291bcbab7055d8b598fba324cc285c3f3b5925ef50) for this instead previous onevega_map_view.jsMapBoxby analogy as inLeafletand tested it.(https://github.com/elastic/kibana/pull/88605/files#diff-91c9c1f0c2762706554bd15bb6457d7912e98b1240b3147884ffe14a9bdb3904).MapServiceSettingsfor getting needed tms service instead of usingmapLegacyservices. (https://github.com/elastic/kibana/pull/88605/files#diff-597f7f1d850fb0e98ce3fab72bf3fcbdf3dc3a8ec8d258b23d177eb7c21ee60b)validataion_helper(https://github.com/elastic/kibana/pull/88605/files#diff-f82ce0679453cb41a4f663254cf02b78ad2986ce066a1b360e88fc92b9b11384)Release notes
Leaflet(https://leafletjs.com/) map layer in Vega visualization was replaced toMapBox(https://www.mapbox.com/)Testing notes
To enable map layer, you should specify
type=mapin the spec configuration.If you would like also see
Vegalayer on the map you can open any vega-map visualization from sample data. For example[Flights] Airport Connections (Hover Over Airport)which you can find if addSample flight data.Screens
Before:

After:

For maintainers