mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Maps] prepare for geotile_grid aggregation (#29461)
* rename geohashgrid to geo_grid * more stuff * simplify getSearchFitlers * rename precision to geogridPrecision * missed one rename precision to geogridPrecision * rename funtional test * fix functional test gis/index import * fix regression
This commit is contained in:
parent
df43e20378
commit
dbf5421405
18 changed files with 66 additions and 80 deletions
|
@ -9,7 +9,6 @@ import React from 'react';
|
|||
import { AbstractLayer } from './layer';
|
||||
import { EuiIcon } from '@elastic/eui';
|
||||
import { HeatmapStyle } from './styles/heatmap_style';
|
||||
import { getGeohashPrecisionForZoom } from '../utils/zoom_to_precision';
|
||||
|
||||
const SCALED_PROPERTY_NAME = '__kbn_heatmap_weight__';//unique name to store scaled value for weighting
|
||||
|
||||
|
@ -114,9 +113,8 @@ export class HeatmapLayer extends AbstractLayer {
|
|||
const sourceDataRequest = this.getSourceDataRequest();
|
||||
const dataMeta = sourceDataRequest ? sourceDataRequest.getMeta() : {};
|
||||
|
||||
const targetPrecisionUnadjusted = getGeohashPrecisionForZoom(dataFilters.zoom);
|
||||
const targetPrecision = targetPrecisionUnadjusted + this._source.getGeohashPrecisionResolutionDelta();
|
||||
const isSamePrecision = dataMeta.precision === targetPrecision;
|
||||
const geogridPrecision = this._source.getGeoGridPrecision(dataFilters.zoom);
|
||||
const isSamePrecision = dataMeta.geogridPrecision === geogridPrecision;
|
||||
|
||||
const isSameTime = _.isEqual(dataMeta.timeFilters, dataFilters.timeFilters);
|
||||
|
||||
|
@ -143,21 +141,21 @@ export class HeatmapLayer extends AbstractLayer {
|
|||
|
||||
const newDataMeta = {
|
||||
...dataFilters,
|
||||
precision: targetPrecision,
|
||||
geogridPrecision,
|
||||
metric: metricPropertyKey
|
||||
};
|
||||
await this._fetchNewData({ startLoading, stopLoading, onLoadError, dataMeta: newDataMeta });
|
||||
}
|
||||
|
||||
async _fetchNewData({ startLoading, stopLoading, onLoadError, dataMeta }) {
|
||||
const { precision: geohashPrecision, timeFilters, buffer, query } = dataMeta;
|
||||
const { geogridPrecision, timeFilters, buffer, query } = dataMeta;
|
||||
const requestToken = Symbol(`layer-source-refresh: this.getId()`);
|
||||
startLoading('source', requestToken, dataMeta);
|
||||
try {
|
||||
const layerName = await this.getDisplayName();
|
||||
const data = await this._source.getGeoJsonPoints({ layerName }, {
|
||||
geohashPrecision: geohashPrecision,
|
||||
buffer: buffer,
|
||||
geogridPrecision,
|
||||
buffer,
|
||||
timeFilters,
|
||||
query,
|
||||
});
|
||||
|
|
|
@ -11,13 +11,13 @@ import { XYZTMSSource } from './xyz_tms_source';
|
|||
import { EMSTMSSource } from './ems_tms_source';
|
||||
import { WMSSource } from './wms_source';
|
||||
import { KibanaTilemapSource } from './kibana_tilemap_source';
|
||||
import { ESGeohashGridSource } from './es_geohashgrid_source';
|
||||
import { ESGeoGridSource } from './es_geo_grid_source';
|
||||
import { ESSearchSource } from './es_search_source';
|
||||
|
||||
|
||||
export const ALL_SOURCES = [
|
||||
ESSearchSource,
|
||||
ESGeohashGridSource,
|
||||
ESGeoGridSource,
|
||||
EMSFileSource,
|
||||
EMSTMSSource,
|
||||
KibanaRegionmapSource,
|
||||
|
|
|
@ -109,7 +109,6 @@ export function convertToGeoJson(tabifiedResponse) {
|
|||
meta: {
|
||||
min: min,
|
||||
max: max,
|
||||
geohashPrecision: geoAgg && geoAgg.params.precision,
|
||||
geohashGridDimensionsAtEquator: geoAgg && gridDimensions(geoAgg.params.precision)
|
||||
}
|
||||
};
|
|
@ -22,6 +22,7 @@ import { RENDER_AS } from './render_as';
|
|||
import { CreateSourceEditor } from './create_source_editor';
|
||||
import { UpdateSourceEditor } from './update_source_editor';
|
||||
import { GRID_RESOLUTION } from '../../grid_resolution';
|
||||
import { getGeohashPrecisionForZoom } from './zoom_to_precision';
|
||||
|
||||
const COUNT_PROP_LABEL = 'Count';
|
||||
const COUNT_PROP_NAME = 'doc_count';
|
||||
|
@ -48,15 +49,15 @@ const aggSchemas = new Schemas([
|
|||
}
|
||||
]);
|
||||
|
||||
export class ESGeohashGridSource extends AbstractESSource {
|
||||
export class ESGeoGridSource extends AbstractESSource {
|
||||
|
||||
static type = 'ES_GEOHASH_GRID';
|
||||
static title = 'Elasticsearch geohash aggregation';
|
||||
static type = 'ES_GEO_GRID';
|
||||
static title = 'Elasticsearch grid aggregation';
|
||||
static description = 'Group geospatial data in grids with metrics for each gridded cell';
|
||||
|
||||
static createDescriptor({ indexPatternId, geoField, requestType, resolution }) {
|
||||
return {
|
||||
type: ESGeohashGridSource.type,
|
||||
type: ESGeoGridSource.type,
|
||||
id: uuid(),
|
||||
indexPatternId: indexPatternId,
|
||||
geoField: geoField,
|
||||
|
@ -67,8 +68,8 @@ export class ESGeohashGridSource extends AbstractESSource {
|
|||
|
||||
static renderEditor({ onPreviewSource }) {
|
||||
const onSelect = (sourceConfig) => {
|
||||
const sourceDescriptor = ESGeohashGridSource.createDescriptor(sourceConfig);
|
||||
const source = new ESGeohashGridSource(sourceDescriptor);
|
||||
const sourceDescriptor = ESGeoGridSource.createDescriptor(sourceConfig);
|
||||
const source = new ESGeoGridSource(sourceDescriptor);
|
||||
onPreviewSource(source);
|
||||
};
|
||||
|
||||
|
@ -93,7 +94,7 @@ export class ESGeohashGridSource extends AbstractESSource {
|
|||
source={this}
|
||||
geoField={this._descriptor.geoField}
|
||||
geoFieldType="Point field"
|
||||
sourceType={ESGeohashGridSource.typeDisplayName}
|
||||
sourceType={ESGeoGridSource.typeDisplayName}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -104,7 +105,7 @@ export class ESGeohashGridSource extends AbstractESSource {
|
|||
});
|
||||
}
|
||||
|
||||
isGeohashPrecisionAware() {
|
||||
isGeoGridPrecisionAware() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -112,24 +113,30 @@ export class ESGeohashGridSource extends AbstractESSource {
|
|||
return this._descriptor.resolution;
|
||||
}
|
||||
|
||||
getGeohashPrecisionResolutionDelta() {
|
||||
let refinementFactor;
|
||||
getGeoGridPrecision(zoom) {
|
||||
return getGeohashPrecisionForZoom(zoom) + this._getGeoGridPrecisionResolutionDelta();
|
||||
}
|
||||
|
||||
_getGeoGridPrecisionResolutionDelta() {
|
||||
if (this._descriptor.resolution === GRID_RESOLUTION.COARSE) {
|
||||
refinementFactor = 0;
|
||||
} else if (this._descriptor.resolution === GRID_RESOLUTION.FINE) {
|
||||
refinementFactor = 1;
|
||||
} else if (this._descriptor.resolution === GRID_RESOLUTION.MOST_FINE) {
|
||||
refinementFactor = 2;
|
||||
} else {
|
||||
throw new Error(`Resolution param not recognized: ${this._descriptor.resolution}`);
|
||||
return 0;
|
||||
}
|
||||
return refinementFactor;
|
||||
|
||||
if (this._descriptor.resolution === GRID_RESOLUTION.FINE) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (this._descriptor.resolution === GRID_RESOLUTION.MOST_FINE) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
throw new Error(`Grid resolution param not recognized: ${this._descriptor.resolution}`);
|
||||
}
|
||||
|
||||
async getGeoJsonWithMeta({ layerName }, searchFilters) {
|
||||
|
||||
const featureCollection = await this.getGeoJsonPoints({ layerName }, {
|
||||
geohashPrecision: searchFilters.geohashPrecision,
|
||||
geogridPrecision: searchFilters.geogridPrecision,
|
||||
buffer: searchFilters.buffer,
|
||||
timeFilters: searchFilters.timeFilters,
|
||||
query: searchFilters.query,
|
||||
|
@ -157,11 +164,11 @@ export class ESGeohashGridSource extends AbstractESSource {
|
|||
}
|
||||
|
||||
|
||||
async getGeoJsonPoints({ layerName }, { geohashPrecision, buffer, timeFilters, query }) {
|
||||
async getGeoJsonPoints({ layerName }, { geogridPrecision, buffer, timeFilters, query }) {
|
||||
|
||||
const indexPattern = await this._getIndexPattern();
|
||||
const searchSource = await this._makeSearchSource({ buffer, timeFilters, query }, 0);
|
||||
const aggConfigs = new AggConfigs(indexPattern, this._makeAggConfigs(geohashPrecision), aggSchemas.all);
|
||||
const aggConfigs = new AggConfigs(indexPattern, this._makeAggConfigs(geogridPrecision), aggSchemas.all);
|
||||
searchSource.setField('aggs', aggConfigs.toDsl());
|
||||
const esResponse = await this._runEsQuery(layerName, searchSource, 'Elasticsearch geohash_grid aggregation request');
|
||||
|
|
@ -4,4 +4,4 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
export { ESGeohashGridSource } from './es_geohashgrid_source';
|
||||
export { ESGeoGridSource } from './es_geo_grid_source';
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { getGeohashPrecisionForZoom } from './zoom_to_precision';
|
||||
|
||||
it('getGeohashPrecisionForZoom', () => {
|
||||
expect(getGeohashPrecisionForZoom(-1)).toEqual(1);
|
||||
expect(getGeohashPrecisionForZoom(40)).toEqual(12);
|
||||
expect(getGeohashPrecisionForZoom(20)).toEqual(9);
|
||||
expect(getGeohashPrecisionForZoom(19)).toEqual(9);
|
||||
});
|
|
@ -60,7 +60,7 @@ export class AbstractSource {
|
|||
return false;
|
||||
}
|
||||
|
||||
isGeohashPrecisionAware() {
|
||||
isGeoGridPrecisionAware() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,10 @@ export class AbstractSource {
|
|||
getIndexPatternIds() {
|
||||
return [];
|
||||
}
|
||||
|
||||
getGeoGridPrecision() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import { FeatureTooltip } from 'plugins/gis/components/map/feature_tooltip';
|
|||
import { store } from '../../store/store';
|
||||
import { getMapColors } from '../../selectors/map_selectors';
|
||||
import _ from 'lodash';
|
||||
import { getGeohashPrecisionForZoom } from '../utils/zoom_to_precision';
|
||||
|
||||
const EMPTY_FEATURE_COLLECTION = {
|
||||
type: 'FeatureCollection',
|
||||
|
@ -170,7 +169,7 @@ export class VectorLayer extends AbstractLayer {
|
|||
const extentAware = source.isFilterByMapBounds();
|
||||
const isFieldAware = source.isFieldAware();
|
||||
const isQueryAware = source.isQueryAware();
|
||||
const isGeohashPrecisionAware = source.isGeohashPrecisionAware();
|
||||
const isGeoGridPrecisionAware = source.isGeoGridPrecisionAware();
|
||||
|
||||
if (
|
||||
!timeAware &&
|
||||
|
@ -178,7 +177,7 @@ export class VectorLayer extends AbstractLayer {
|
|||
!extentAware &&
|
||||
!isFieldAware &&
|
||||
!isQueryAware &&
|
||||
!isGeohashPrecisionAware
|
||||
!isGeoGridPrecisionAware
|
||||
) {
|
||||
const sourceDataRequest = this._findDataRequestForSource(sourceDataId);
|
||||
if (sourceDataRequest && sourceDataRequest.hasDataOrRequestInProgress()) {
|
||||
|
@ -217,8 +216,8 @@ export class VectorLayer extends AbstractLayer {
|
|||
}
|
||||
|
||||
let updateDueToPrecisionChange = false;
|
||||
if (isGeohashPrecisionAware) {
|
||||
updateDueToPrecisionChange = !_.isEqual(meta.geohashPrecision, searchFilters.geohashPrecision);
|
||||
if (isGeoGridPrecisionAware) {
|
||||
updateDueToPrecisionChange = !_.isEqual(meta.geogridPrecision, searchFilters.geogridPrecision);
|
||||
}
|
||||
|
||||
const updateDueToExtentChange = this.updateDueToExtent(source, meta, searchFilters);
|
||||
|
@ -231,10 +230,6 @@ export class VectorLayer extends AbstractLayer {
|
|||
&& !updateDueToPrecisionChange;
|
||||
}
|
||||
|
||||
_getTargetGeohashPrecision(precision) {
|
||||
return this._source.getGeohashPrecisionResolutionDelta() + precision;
|
||||
}
|
||||
|
||||
async _syncJoin(join, { startLoading, stopLoading, onLoadError, dataFilters }) {
|
||||
|
||||
const joinSource = join.getJoinSource();
|
||||
|
@ -288,15 +283,10 @@ export class VectorLayer extends AbstractLayer {
|
|||
})
|
||||
];
|
||||
|
||||
let targetPrecision = getGeohashPrecisionForZoom(dataFilters.zoom);
|
||||
|
||||
if (this._source.isGeohashPrecisionAware()) {
|
||||
targetPrecision = this._getTargetGeohashPrecision(targetPrecision);
|
||||
}
|
||||
return {
|
||||
...dataFilters,
|
||||
fieldNames: _.uniq(fieldNames).sort(),
|
||||
geohashPrecision: targetPrecision
|
||||
geogridPrecision: this._source.getGeoGridPrecision(dataFilters.zoom),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { getGeohashPrecisionForZoom } from './zoom_to_precision';
|
||||
|
||||
describe('zoom_to_precision', () => {
|
||||
|
||||
it('.getPrecision should clamp correctly', () => {
|
||||
|
||||
let geohashPrecision = getGeohashPrecisionForZoom(-1);
|
||||
expect(geohashPrecision).toEqual(1);
|
||||
|
||||
geohashPrecision = getGeohashPrecisionForZoom(40);
|
||||
expect(geohashPrecision).toEqual(12);
|
||||
|
||||
geohashPrecision = getGeohashPrecisionForZoom(20);
|
||||
expect(geohashPrecision).toEqual(9);
|
||||
geohashPrecision = getGeohashPrecisionForZoom(19);
|
||||
expect(geohashPrecision).toEqual(9);
|
||||
|
||||
});
|
||||
|
||||
});
|
|
@ -9,7 +9,7 @@
|
|||
"title" : "[Logs] Web Traffic",
|
||||
"description" : "",
|
||||
"mapStateJSON" : "{\"zoom\":3.92,\"center\":{\"lon\":-83.95443,\"lat\":38.02463},\"timeFilters\":{\"from\":\"now-7d\",\"to\":\"now\"}}",
|
||||
"layerListJSON" : "[{\"id\":\"0hmz5\",\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"TILE\",\"properties\":{\"alphaValue\":1}},\"type\":\"TILE\",\"alpha\":1,\"minZoom\":0,\"maxZoom\":24},{\"id\":\"ajk2l\",\"label\":\"logs(heatmap)\",\"alpha\":1,\"minZoom\":0,\"maxZoom\":9,\"sourceDescriptor\":{\"resolution\": \"COARSE\", \"type\":\"ES_GEOHASH_GRID\",\"id\":\"60c5dffb-7fca-431c-b1f0-9cc2e6697e8c\",\"indexPatternId\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"geoField\":\"geo.coordinates\",\"requestType\":\"heatmap\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"HEATMAP\",\"refinement\":\"coarse\",\"properties\":{\"alphaValue\":0.75},\"previousStyle\":null},\"type\":\"HEATMAP\"},{\"id\":\"6hgh2\",\"label\":\"logs(documents)\",\"alpha\":1,\"minZoom\":7,\"maxZoom\":24,\"sourceDescriptor\":{\"id\":\"541f2ca1-6a0f-4937-8846-a589222b7f28\",\"type\":\"ES_SEARCH\",\"indexPatternId\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"geoField\":\"geo.coordinates\",\"limit\":2048,\"filterByMapBounds\":true,\"showTooltip\":true,\"tooltipProperties\":[\"timestamp\",\"clientip\",\"url\"]},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#e6194b\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}},\"alphaValue\":0.75},\"previousStyle\":null},\"type\":\"VECTOR\"}]",
|
||||
"layerListJSON" : "[{\"id\":\"0hmz5\",\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"TILE\",\"properties\":{\"alphaValue\":1}},\"type\":\"TILE\",\"alpha\":1,\"minZoom\":0,\"maxZoom\":24},{\"id\":\"ajk2l\",\"label\":\"logs(heatmap)\",\"alpha\":1,\"minZoom\":0,\"maxZoom\":9,\"sourceDescriptor\":{\"resolution\": \"COARSE\", \"type\":\"ES_GEO_GRID\",\"id\":\"60c5dffb-7fca-431c-b1f0-9cc2e6697e8c\",\"indexPatternId\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"geoField\":\"geo.coordinates\",\"requestType\":\"heatmap\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"HEATMAP\",\"refinement\":\"coarse\",\"properties\":{\"alphaValue\":0.75},\"previousStyle\":null},\"type\":\"HEATMAP\"},{\"id\":\"6hgh2\",\"label\":\"logs(documents)\",\"alpha\":1,\"minZoom\":7,\"maxZoom\":24,\"sourceDescriptor\":{\"id\":\"541f2ca1-6a0f-4937-8846-a589222b7f28\",\"type\":\"ES_SEARCH\",\"indexPatternId\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"geoField\":\"geo.coordinates\",\"limit\":2048,\"filterByMapBounds\":true,\"showTooltip\":true,\"tooltipProperties\":[\"timestamp\",\"clientip\",\"url\"]},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#e6194b\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#FFFFFF\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"STATIC\",\"options\":{\"size\":10}},\"alphaValue\":0.75},\"previousStyle\":null},\"type\":\"VECTOR\"}]",
|
||||
"uiStateJSON" : "{\"isDarkMode\":false}",
|
||||
"bounds" : {
|
||||
"type" : "envelope",
|
||||
|
|
|
@ -13,7 +13,7 @@ export default function ({ getPageObjects, getService }) {
|
|||
const inspector = getService('inspector');
|
||||
const DOC_COUNT_PROP_NAME = 'doc_count';
|
||||
|
||||
describe('layer geohashgrid aggregation source', () => {
|
||||
describe('layer geo grid aggregation source', () => {
|
||||
|
||||
const EXPECTED_NUMBER_FEATURES = 6;
|
||||
const DATA_CENTER_LON = -98;
|
|
@ -33,7 +33,7 @@ export default function ({ loadTestFile, getService }) {
|
|||
loadTestFile(require.resolve('./saved_object_management'));
|
||||
loadTestFile(require.resolve('./sample_data'));
|
||||
loadTestFile(require.resolve('./es_search_source'));
|
||||
loadTestFile(require.resolve('./es_geohashgrid_source'));
|
||||
loadTestFile(require.resolve('./es_geo_grid_source'));
|
||||
loadTestFile(require.resolve('./joins'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@
|
|||
"gis-map" : {
|
||||
"title" : "geohashgrid heatmap example",
|
||||
"mapStateJSON" : "{\"zoom\":3.59,\"center\":{\"lon\":-98.05765,\"lat\":38.32288},\"timeFilters\":{\"from\":\"2015-09-20T00:00:00.000Z\",\"to\":\"2015-09-20T01:00:00.000Z\"},\"refreshConfig\":{\"isPaused\":true,\"interval\":1000}}",
|
||||
"layerListJSON" : "[{\"id\":\"0hmz5\",\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"TILE\",\"properties\":{\"alphaValue\":1}},\"type\":\"TILE\",\"minZoom\":0,\"maxZoom\":24},{\"id\":\"3xlvm\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"sourceDescriptor\":{\"resolution\": \"COARSE\",\"type\":\"ES_GEOHASH_GRID\",\"id\":\"427aa49d-a552-4e7d-a629-67c47db27128\",\"indexPatternId\":\"c698b940-e149-11e8-a35a-370a8516603a\",\"geoField\":\"geo.coordinates\",\"requestType\":\"heatmap\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"HEATMAP\",\"refinement\":\"coarse\",\"properties\":{\"alphaValue\":1},\"previousStyle\":null},\"type\":\"HEATMAP\"}]",
|
||||
"layerListJSON" : "[{\"id\":\"0hmz5\",\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"TILE\",\"properties\":{\"alphaValue\":1}},\"type\":\"TILE\",\"minZoom\":0,\"maxZoom\":24},{\"id\":\"3xlvm\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"sourceDescriptor\":{\"resolution\": \"COARSE\",\"type\":\"ES_GEO_GRID\",\"id\":\"427aa49d-a552-4e7d-a629-67c47db27128\",\"indexPatternId\":\"c698b940-e149-11e8-a35a-370a8516603a\",\"geoField\":\"geo.coordinates\",\"requestType\":\"heatmap\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"HEATMAP\",\"refinement\":\"coarse\",\"properties\":{\"alphaValue\":1},\"previousStyle\":null},\"type\":\"HEATMAP\"}]",
|
||||
"uiStateJSON" : "{\"isDarkMode\":false}",
|
||||
"bounds" : {
|
||||
"type" : "envelope",
|
||||
|
@ -234,7 +234,7 @@
|
|||
"title" : "geohashgrid vector grid example",
|
||||
"description" : "",
|
||||
"mapStateJSON" : "{\"zoom\":3.59,\"center\":{\"lon\":-98.05765,\"lat\":38.32288},\"timeFilters\":{\"from\":\"2015-09-20T00:00:00.000Z\",\"to\":\"2015-09-20T01:00:00.000Z\"},\"refreshConfig\":{\"isPaused\":true,\"interval\":1000}}",
|
||||
"layerListJSON" : "[{\"id\":\"0hmz5\",\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"TILE\",\"properties\":{\"alphaValue\":1}},\"type\":\"TILE\",\"minZoom\":0,\"maxZoom\":24},{\"id\":\"g1xkv\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"sourceDescriptor\":{\"resolution\": \"COARSE\",\"type\":\"ES_GEOHASH_GRID\",\"id\":\"9305f6ea-4518-4c06-95b9-33321aa38d6a\",\"indexPatternId\":\"c698b940-e149-11e8-a35a-370a8516603a\",\"geoField\":\"geo.coordinates\",\"requestType\":\"grid\",\"metrics\":[{\"type\":\"count\"},{\"type\":\"max\",\"field\":\"bytes\"}]},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"max of bytes\",\"name\":\"max_of_bytes\",\"origin\":\"source\"},\"color\":\"Blues\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#cccccc\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"Count\",\"name\":\"doc_count\",\"origin\":\"source\"},\"minSize\":4,\"maxSize\":32}},\"alphaValue\":1},\"temporary\":true,\"previousStyle\":null},\"type\":\"VECTOR\"}]",
|
||||
"layerListJSON" : "[{\"id\":\"0hmz5\",\"sourceDescriptor\":{\"type\":\"EMS_TMS\",\"id\":\"road_map\"},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"TILE\",\"properties\":{\"alphaValue\":1}},\"type\":\"TILE\",\"minZoom\":0,\"maxZoom\":24},{\"id\":\"g1xkv\",\"label\":null,\"minZoom\":0,\"maxZoom\":24,\"sourceDescriptor\":{\"resolution\": \"COARSE\",\"type\":\"ES_GEO_GRID\",\"id\":\"9305f6ea-4518-4c06-95b9-33321aa38d6a\",\"indexPatternId\":\"c698b940-e149-11e8-a35a-370a8516603a\",\"geoField\":\"geo.coordinates\",\"requestType\":\"grid\",\"metrics\":[{\"type\":\"count\"},{\"type\":\"max\",\"field\":\"bytes\"}]},\"visible\":true,\"temporary\":false,\"style\":{\"type\":\"VECTOR\",\"properties\":{\"fillColor\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"max of bytes\",\"name\":\"max_of_bytes\",\"origin\":\"source\"},\"color\":\"Blues\"}},\"lineColor\":{\"type\":\"STATIC\",\"options\":{\"color\":\"#cccccc\"}},\"lineWidth\":{\"type\":\"STATIC\",\"options\":{\"size\":1}},\"iconSize\":{\"type\":\"DYNAMIC\",\"options\":{\"field\":{\"label\":\"Count\",\"name\":\"doc_count\",\"origin\":\"source\"},\"minSize\":4,\"maxSize\":32}},\"alphaValue\":1},\"temporary\":true,\"previousStyle\":null},\"type\":\"VECTOR\"}]",
|
||||
"uiStateJSON" : "{\"isDarkMode\":false}",
|
||||
"bounds" : {
|
||||
"type" : "envelope",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue