Geocentroid / tilemap bug fixes#10871
Conversation
|
functionality wise it looks great! i also gave a quick look at the code and can't find anything. im gonna give it another run later today. |
kobelb
left a comment
There was a problem hiding this comment.
I copied over the relevant comments from the previous PRs, so a lot of this is the same, but a few things are new.
| import KibanaMapLayer from './kibana_map_layer'; | ||
| import _ from 'lodash'; | ||
| import { EventEmitter } from 'events'; | ||
| import Heatmap from './heatmap'; |
There was a problem hiding this comment.
Thank you for splitting this file up. It might be worthwhile to put all of the Layers into a folder.
| return _.sortBy(this, function (agg) { | ||
|
|
||
|
|
||
| const aggregations = _.sortBy(this, function (agg) { |
There was a problem hiding this comment.
There's currently an extension point in the AppConfig to allow each individual item to customize the responseAggs, I added one for the requestAggs as well so that we can do the geohash logic there and it seems to work: kobelb@fd6b344
That way we don't have to hard-code the logic for specific aggregations here.
We should add unit-tests for this, regardless of which direction we go.
There was a problem hiding this comment.
oki, changed it using this approach, thx!
| break; | ||
| case 'Heatmap': | ||
| this._geohashMarkers = new Heatmap(this._geohashGeoJson, { | ||
| radius: +this._geohashOptions.heatmap.heatRadius, |
There was a problem hiding this comment.
The + before this is to ensure that they're positive numbers, right? When were we seeing this? It seems like something that should be caught by our validation.
There was a problem hiding this comment.
it coerces it to the number type. It was like that before. Agreed it looks weird and is probably not necessary, I will change it.
There was a problem hiding this comment.
Ah, forgot you could do it that way in Javascript...
| * @param geoJson {geoJson Object} | ||
| * @param params {Object} | ||
| */ | ||
| export default class Heatmap extends EventEmitter { |
There was a problem hiding this comment.
The empty legend is still showing up, when it isn't in 5.2.2. Obviously, not a blocker, but just FYI.
| status: Joi.object({ | ||
| allowAnonymous: Joi.boolean().default(false) | ||
| }).default(), | ||
| vectormap: Joi.object({ |
There was a problem hiding this comment.
This config section snuck in here, even though we won't be adding vectormap support with this PR.
There was a problem hiding this comment.
good catch, thanks
| @@ -0,0 +1,507 @@ | |||
| import { EventEmitter } from 'events'; | |||
There was a problem hiding this comment.
the data on just a single earth is normal. it is a limitation of leaflet.
There was a problem hiding this comment.
zoom on save is fixed now
|
|
||
| } | ||
|
|
||
| .vis-option-item { |
|
jenkins, test this |
|
is CI broken or are the unit test failures related to this PR ? |
|
@ppisljar tests are broken due to this PR. |
add tooltip boilerplate
move legend with option add tms settings add min/max zoom settings add valueformatters
ad1e852 to
9ba3894
Compare
- adds the geo-centroid metric as the new default for visualizations
- various bug fixes and improvements
- avoid unnecessary calls to manifest
- avoid map flicker when zooming
- enable scroll/pinch/touch zooming
- avoid heatmap errors
- ensure map fills screen in dashboard
- ensure fit works consistently
- relax tilemap constraints
- remove support for multi-maps
- this refactor sets the stage for new vector map visualization which will reuse the same map components
due to merge conflicts, this also required backporting the resize_checker components * Geocentroid / tilemap bug fixes (#10871) - adds the geo-centroid metric as the new default for visualizations - various bug fixes and improvements - avoid unnecessary calls to manifest - avoid map flicker when zooming - enable scroll/pinch/touch zooming - avoid heatmap errors - ensure map fills screen in dashboard - ensure fit works consistently - relax tilemap constraints - remove support for multi-maps - this refactor sets the stage for new vector map visualization which will reuse the same map components







Summary:
Kibana now uses the geo-centroid of the results to place results on a map. The result is a more natural looking map with fewer visual artifacts. It avoids the "gridded"-look from earlier versions. The map now also supports panning&zooming with touchscreens, as well as bug fixes that improve stability.
New PR, without the vector map. This is so we can resolve the blocker for X-pack quicker.
todos: