mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Merge pull request #3061 from simianhacker/fix/3041
Closes #3041 - Link geo point visualize fields to a tile map vis
This commit is contained in:
commit
84ff35e65f
1 changed files with 13 additions and 1 deletions
|
@ -117,6 +117,7 @@ define(function (require) {
|
|||
|
||||
$scope.runAgg = function (field) {
|
||||
var agg = {};
|
||||
var type = 'histogram';
|
||||
// If we're visualizing a date field, and our index is time based (and thus has a time filter),
|
||||
// then run a date histogram
|
||||
if (field.type === 'date' && $scope.indexPattern.timeFieldName) {
|
||||
|
@ -128,6 +129,17 @@ define(function (require) {
|
|||
interval: 'auto'
|
||||
}
|
||||
};
|
||||
|
||||
} else if (field.type === 'geo_point') {
|
||||
type = 'tile_map';
|
||||
agg = {
|
||||
type: 'geohash_grid',
|
||||
schema: 'segment',
|
||||
params: {
|
||||
field: field.name,
|
||||
percision: 3
|
||||
}
|
||||
};
|
||||
} else {
|
||||
agg = {
|
||||
type: 'terms',
|
||||
|
@ -141,7 +153,7 @@ define(function (require) {
|
|||
|
||||
$location.path('/visualize/create').search({
|
||||
indexPattern: $scope.state.index,
|
||||
type: 'histogram',
|
||||
type: type,
|
||||
_a: rison.encode({
|
||||
filters: $scope.state.filters || [],
|
||||
query: $scope.state.query || undefined,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue