Skip to content
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] remove map.regionmap.* #109896

Merged
merged 6 commits into from
Aug 30, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 1 addition & 83 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ The size limit policy will perform a rollover when the log file reaches a maximu

The time interval policy will rotate the log file every given interval of time. *Default 24h*

| [[regionmap-ES-map]] `map.includeElasticMapsService:` {ess-icon}
| `map.includeElasticMapsService:` {ess-icon}
| Set to `false` to disable connections to Elastic Maps Service.
When `includeElasticMapsService` is turned off, only tile layer configured by <<tilemap-url, `map.tilemap.url`>> is available in <<maps, Maps>>. *Default: `true`*

Expand All @@ -383,88 +383,6 @@ When `includeElasticMapsService` is turned off, only tile layer configured by <<
Set to `true` to proxy all <<maps, Maps application>> Elastic Maps Service
requests through the {kib} server. *Default: `false`*

| [[regionmap-settings]] `map.regionmap:` {ess-icon}
| deprecated:[7.14.0,"In 8.0 and later, this setting will no longer be supported."]
Specifies additional vector layers for
use in <<maps, Maps>> visualizations. Each layer
object points to an external vector file that contains a geojson
FeatureCollection. The file must use the
https://en.wikipedia.org/wiki/World_Geodetic_System[WGS84 coordinate reference system (ESPG:4326)]
and only include polygons. If the file is hosted on a separate domain from
{kib}, the server needs to be CORS-enabled so {kib} can download the file.
The following example shows a valid region map configuration.

|===

[source,text]
--
map.regionmap:
layers:
- name: "Departments of France"
url: "http://my.cors.enabled.server.org/france_departements.geojson"
attribution: "INRAP"
fields:
- name: "department"
description: "Full department name"
- name: "INSEE"
description: "INSEE numeric identifier"
--

[cols="2*<"]
|===

| [[regionmap-attribution]] `map.regionmap.layers[].attribution:` {ess-icon}
| deprecated:[7.14.0,"In 8.0 and later, this setting will no longer be supported."]
Optional. References the originating source of the geojson file.

| [[regionmap-fields]] `map.regionmap.layers[].fields[]:` {ess-icon}
| deprecated:[7.14.0,"In 8.0 and later, this setting will no longer be supported."]
Mandatory. Each layer
can contain multiple fields to indicate what properties from the geojson
features you wish to expose. The following shows how to define multiple
properties:

|===

[source,text]
--
map.regionmap:
layers:
- name: "Departments of France"
url: "http://my.cors.enabled.server.org/france_departements.geojson"
attribution: "INRAP"
fields:
- name: "department"
description: "Full department name"
- name: "INSEE"
description: "INSEE numeric identifier"
--

[cols="2*<"]
|===

| [[regionmap-field-description]] `map.regionmap.layers[].fields[].description:` {ess-icon}
| deprecated:[7.14.0,"In 8.0 and later, this setting will no longer be supported."]
Mandatory. The human readable text that is shown under the Options tab when
building the Region Map visualization.

| [[regionmap-field-name]] `map.regionmap.layers[].fields[].name:` {ess-icon}
| deprecated:[7.14.0,"In 8.0 and later, this setting will no longer be supported."]
Mandatory.
This value is used to do an inner-join between the document stored in
{es} and the geojson file. For example, if the field in the geojson is
called `Location` and has city names, there must be a field in {es}
that holds the same values that {kib} can then use to lookup for the geoshape
data.

| [[regionmap-name]] `map.regionmap.layers[].name:` {ess-icon}
| deprecated:[7.14.0,"In 8.0 and later, this setting will no longer be supported."]
Mandatory. A description of the map being provided.

| [[regionmap-url]] `map.regionmap.layers[].url:` {ess-icon}
| deprecated:[7.14.0,"In 8.0 and later, this setting will no longer be supported."]
Mandatory. The location of the geojson file as provided by a webserver.

| [[tilemap-settings]] `map.tilemap.options.attribution:` {ess-icon}
| The map attribution string.
*Default: `"© [Elastic Maps Service](https://www.elastic.co/elastic-maps-service)"`*
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@
"tar": "4.4.13",
"tinycolor2": "1.4.1",
"tinygradient": "0.4.3",
"topojson-client": "3.1.0",
"tree-kill": "^1.2.2",
"ts-easing": "^0.2.0",
"tslib": "^2.0.0",
Expand Down
26 changes: 0 additions & 26 deletions src/plugins/maps_ems/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,7 @@ export const tilemapConfigSchema = schema.object({
options: tileMapConfigOptionsSchema,
});

const layerConfigSchema = schema.object({
url: schema.string(),
format: schema.object({
type: schema.string({ defaultValue: 'geojson' }),
}),
meta: schema.object({
feature_collection_path: schema.string({ defaultValue: 'data' }),
}),
attribution: schema.string(),
name: schema.string(),
fields: schema.arrayOf(
schema.object({
name: schema.string(),
description: schema.string(),
})
),
});

export type LayerConfig = TypeOf<typeof layerConfigSchema>;

const regionmapConfigSchema = schema.object({
includeElasticMapsService: schema.boolean({ defaultValue: true }),
layers: schema.arrayOf(layerConfigSchema, { defaultValue: [] }),
});

export const emsConfigSchema = schema.object({
regionmap: regionmapConfigSchema,
tilemap: tilemapConfigSchema,
includeElasticMapsService: schema.boolean({ defaultValue: true }),
proxyElasticMapsServiceInMaps: schema.boolean({ defaultValue: false }),
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/maps_ems/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function plugin(initializerContext: PluginInitializerContext) {
return new MapsEmsPlugin(initializerContext);
}

export type { MapsEmsConfig, LayerConfig } from '../config';
export type { MapsEmsConfig } from '../config';

export * from '../common';

Expand Down
1 change: 0 additions & 1 deletion src/plugins/maps_ems/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { MapsEmsConfig, emsConfigSchema } from '../config';

export const config: PluginConfigDescriptor<MapsEmsConfig> = {
exposeToBrowser: {
regionmap: true,
tilemap: true,
includeElasticMapsService: true,
proxyElasticMapsServiceInMaps: true,
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/maps/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ export enum SOURCE_TYPES {
EMS_XYZ = 'EMS_XYZ', // identifies a custom TMS source. EMS-prefix in the name is a little unfortunate :(
WMS = 'WMS',
KIBANA_TILEMAP = 'KIBANA_TILEMAP',
REGIONMAP_FILE = 'REGIONMAP_FILE',
GEOJSON_FILE = 'GEOJSON_FILE',
MVT_SINGLE_LAYER = 'MVT_SINGLE_LAYER',
TABLE_SOURCE = 'TABLE_SOURCE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ export type ESTermSourceDescriptor = AbstractESAggSourceDescriptor & {
type: SOURCE_TYPES.ES_TERM_SOURCE;
};

export type KibanaRegionmapSourceDescriptor = AbstractSourceDescriptor & {
name: string;
};

// This is for symmetry with other sources only.
// It takes no additional configuration since all params are in the .yml.
export type KibanaTilemapSourceDescriptor = AbstractSourceDescriptor;
Expand Down
40 changes: 0 additions & 40 deletions x-pack/plugins/maps/public/classes/fields/kibana_region_field.ts

This file was deleted.

This file was deleted.

This file was deleted.

Loading