diff --git a/docs/maps/connect-to-ems.asciidoc b/docs/maps/connect-to-ems.asciidoc index 6a2ed12d9c536..5616e8755a881 100644 --- a/docs/maps/connect-to-ems.asciidoc +++ b/docs/maps/connect-to-ems.asciidoc @@ -32,8 +32,6 @@ If you cannot connect to Elastic Maps Service from the {kib} server or browser c {hosted-ems} is a self-managed version of Elastic Maps Service offered as a Docker image that provides both the EMS basemaps and EMS boundaries. The image is bundled with basemaps up to zoom level 8. After connecting it to your {es} cluster for license validation, you have the option to download and configure a more detailed basemaps database. -IMPORTANT: {hosted-ems} does not serve raster tiles, needed by Vega, coordinate, and region map visualizations. - You can use +docker pull+ to download the {hosted-ems} image from the Elastic Docker registry. ifeval::["{release-state}"=="unreleased"] diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index 430ab629307cd..851319932ea52 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -501,6 +501,7 @@ export const getDocLinks = ({ kibanaBranch }: GetDocLinkOptions): DocLinks => { healthMonitoring: `${KIBANA_DOCS}task-manager-health-monitoring.html`, }, maps: { + connectToEms: `${KIBANA_DOCS}maps-connect-to-ems.html`, guide: `${KIBANA_DOCS}maps.html`, importGeospatialPrivileges: `${KIBANA_DOCS}import-geospatial-data.html#import-geospatial-privileges`, gdalTutorial: `${ELASTIC_WEBSITE_URL}blog/how-to-ingest-geospatial-data-into-elasticsearch-with-gdal`, diff --git a/packages/kbn-doc-links/src/types.ts b/packages/kbn-doc-links/src/types.ts index f6b8ffd303883..32ca0e8d6f2c1 100644 --- a/packages/kbn-doc-links/src/types.ts +++ b/packages/kbn-doc-links/src/types.ts @@ -383,6 +383,7 @@ export interface DocLinks { healthMonitoring: string; }>; readonly maps: Readonly<{ + connectToEms: string; guide: string; importGeospatialPrivileges: string; gdalTutorial: string; diff --git a/x-pack/plugins/maps/public/lens/choropleth_chart/setup.ts b/x-pack/plugins/maps/public/lens/choropleth_chart/setup.ts index 3e1525353d1b5..6805044a0f996 100644 --- a/x-pack/plugins/maps/public/lens/choropleth_chart/setup.ts +++ b/x-pack/plugins/maps/public/lens/choropleth_chart/setup.ts @@ -34,7 +34,10 @@ export function setupLensChoroplethChart( try { emsFileLayers = await getEmsFileLayers(); } catch (error) { - // ignore error, lack of EMS file layers will be surfaced in dimension editor + // eslint-disable-next-line no-console + console.warn( + `Lens region map setup is unable to access administrative boundaries from Elastic Maps Service (EMS). To avoid unnecessary EMS requests, set 'map.includeElasticMapsService: false' in 'kibana.yml'. For more details please visit ${coreStart.docLinks.links.maps.connectToEms}` + ); } return getVisualization({ diff --git a/x-pack/plugins/maps/public/util.test.js b/x-pack/plugins/maps/public/util.test.js index 48498f87fe7c0..e86554560dd83 100644 --- a/x-pack/plugins/maps/public/util.test.js +++ b/x-pack/plugins/maps/public/util.test.js @@ -11,6 +11,18 @@ import { testOnlyClearCanAccessEmsFontsPromise, } from './util'; +jest.mock('./kibana_services', () => ({ + getDocLinks: () => { + return { + links: { + maps: { + connectToEms: 'https://www.elastic.co/guide/en/kibana/current/maps-connect-to-ems.html', + }, + }, + }; + }, +})); + describe('getGlyphUrl', () => { describe('EMS enabled', () => { beforeEach(() => { diff --git a/x-pack/plugins/maps/public/util.ts b/x-pack/plugins/maps/public/util.ts index 3243c8a95cf74..2a2e750941f30 100644 --- a/x-pack/plugins/maps/public/util.ts +++ b/x-pack/plugins/maps/public/util.ts @@ -10,6 +10,7 @@ import { EMSClient, FileLayer, TMSService } from '@elastic/ems-client'; import type { KibanaExecutionContext } from '@kbn/core/public'; import { FONTS_API_PATH } from '../common/constants'; import { + getDocLinks, getHttp, getTilemap, getEMSSettings, @@ -85,7 +86,9 @@ async function canAccessEmsFonts(): Promise { } catch (error) { // eslint-disable-next-line no-console console.warn( - `Unable to access fonts from Elastic Maps Service (EMS). Set kibana.yml 'map.includeElasticMapsService: false' to avoid unnecessary EMS requests.` + `Unable to access fonts from Elastic Maps Service (EMS). To avoid unnecessary EMS requests, set 'map.includeElasticMapsService: false' in 'kibana.yml'. For more details please visit: ${ + getDocLinks().links.maps.connectToEms + }` ); resolve(false); }