diff --git a/packages/kbn-maki/index.js b/packages/kbn-maki/index.js new file mode 100644 index 000000000000..8158f12794af --- /dev/null +++ b/packages/kbn-maki/index.js @@ -0,0 +1,378 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +/* eslint-disable quotes */ + +// icons from maki version 6.1.0 +export const maki = { + svgArray: [ + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n", + "\n\n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n \n", + "\n\n \n \n \n \n", + "\n\n \n \n", + "\n\n \n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n", + "\n\n \n \n", + "\n\n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n \n", + "\n\n \n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n \n \n \n \n \n", + "\n\n \n \n \n \n \n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n \n", + "\n\n \n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n", + "\n\n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n \n \n \n", + "\n\n \n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n", + "\n\n \n" + ] +}; diff --git a/packages/kbn-maki/package.json b/packages/kbn-maki/package.json new file mode 100644 index 000000000000..862e183800b3 --- /dev/null +++ b/packages/kbn-maki/package.json @@ -0,0 +1,10 @@ +{ + "name": "@kbn/maki", + "version": "6.1.0", + "description": "browser friendly version of @mapbox/maki", + "license": "Apache-2.0", + "main": "index.js", + "devDependencies": {}, + "dependencies": {}, + "peerDependencies": {} +} diff --git a/packages/kbn-maki/readme.md b/packages/kbn-maki/readme.md new file mode 100644 index 000000000000..aad509938113 --- /dev/null +++ b/packages/kbn-maki/readme.md @@ -0,0 +1,6 @@ +# @kbn/maki + +[@mapbox/maki](https://www.npmjs.com/package/@mapbox/maki) only works in node.js. +See https://github.com/mapbox/maki/issues/462 for details. + +@kbn/maki is a browser friendly version of @mapbox/maki diff --git a/x-pack/package.json b/x-pack/package.json index 3b84e8d063a9..e318dded2f3e 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -180,6 +180,7 @@ "@kbn/es-query": "1.0.0", "@kbn/i18n": "1.0.0", "@kbn/interpreter": "1.0.0", + "@kbn/maki": "6.1.0", "@kbn/ui-framework": "1.0.0", "@mapbox/mapbox-gl-draw": "^1.1.1", "@samverschueren/stream-to-observable": "^0.3.0", diff --git a/x-pack/plugins/maps/common/constants.js b/x-pack/plugins/maps/common/constants.js index cf00e1c59b27..bc67e46042ae 100644 --- a/x-pack/plugins/maps/common/constants.js +++ b/x-pack/plugins/maps/common/constants.js @@ -8,6 +8,8 @@ export const GIS_API_PATH = 'api/maps'; export const EMS_DATA_FILE_PATH = 'ems/file'; export const EMS_DATA_TMS_PATH = 'ems/tms'; export const EMS_META_PATH = 'ems/meta'; +export const SPRITE_PATH = '/maps/sprite'; +export const MAKI_SPRITE_PATH = `${SPRITE_PATH}/maki`; export const MAP_SAVED_OBJECT_TYPE = 'map'; export const APP_ID = 'maps'; diff --git a/x-pack/plugins/maps/common/parse_xml_string.js b/x-pack/plugins/maps/common/parse_xml_string.js new file mode 100644 index 000000000000..9d95e0e78280 --- /dev/null +++ b/x-pack/plugins/maps/common/parse_xml_string.js @@ -0,0 +1,22 @@ +/* + * 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 { parseString } from 'xml2js'; + +// promise based wrapper around parseString +export async function parseXmlString(xmlString) { + const parsePromise = new Promise((resolve, reject) => { + parseString(xmlString, (error, result) => { + if (error) { + reject(error); + } else { + resolve(result); + } + }); + }); + + return await parsePromise; +} diff --git a/x-pack/plugins/maps/common/parse_xml_string.test.js b/x-pack/plugins/maps/common/parse_xml_string.test.js new file mode 100644 index 000000000000..fcfc27bc18f8 --- /dev/null +++ b/x-pack/plugins/maps/common/parse_xml_string.test.js @@ -0,0 +1,16 @@ +/* + * 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 { parseXmlString } from './parse_xml_string'; + +describe('parseXmlString', () => { + it('Should parse xml string into JS object', async () => { + const xmlAsObject = await parseXmlString('bar'); + expect(xmlAsObject).toEqual({ + foo: 'bar' + }); + }); +}); diff --git a/x-pack/plugins/maps/public/components/map/mb/utils.js b/x-pack/plugins/maps/public/components/map/mb/utils.js index 19373cbe7bf1..24d8c5272b21 100644 --- a/x-pack/plugins/maps/public/components/map/mb/utils.js +++ b/x-pack/plugins/maps/public/components/map/mb/utils.js @@ -6,8 +6,17 @@ import _ from 'lodash'; import mapboxgl from 'mapbox-gl'; +import chrome from 'ui/chrome'; +import { MAKI_SPRITE_PATH } from '../../../../common/constants'; + +function relativeToAbsolute(url) { + const a = document.createElement('a'); + a.setAttribute('href', url); + return a.href; +} export async function createMbMapInstance({ node, initialView, scrollZoom }) { + const makiUrl = relativeToAbsolute(chrome.addBasePath(MAKI_SPRITE_PATH)); return new Promise((resolve) => { const options = { attributionControl: false, @@ -16,6 +25,7 @@ export async function createMbMapInstance({ node, initialView, scrollZoom }) { version: 8, sources: {}, layers: [], + sprite: makiUrl }, scrollZoom }; diff --git a/x-pack/plugins/maps/public/components/widget_overlay/view_control/set_view/set_view.js b/x-pack/plugins/maps/public/components/widget_overlay/view_control/set_view/set_view.js index 5df5155c7f06..0faf5d86b2f0 100644 --- a/x-pack/plugins/maps/public/components/widget_overlay/view_control/set_view/set_view.js +++ b/x-pack/plugins/maps/public/components/widget_overlay/view_control/set_view/set_view.js @@ -101,7 +101,7 @@ export class SetView extends React.Component { }); return ( - + {latFormRow} diff --git a/x-pack/plugins/maps/public/shared/layers/sources/wms_source/wms_client.js b/x-pack/plugins/maps/public/shared/layers/sources/wms_source/wms_client.js index b8c502858794..ab59178dc792 100644 --- a/x-pack/plugins/maps/public/shared/layers/sources/wms_source/wms_client.js +++ b/x-pack/plugins/maps/public/shared/layers/sources/wms_source/wms_client.js @@ -5,7 +5,7 @@ */ import _ from 'lodash'; -import { parseString } from 'xml2js'; +import { parseXmlString } from '../../../../../common/parse_xml_string'; import fetch from 'node-fetch'; import { parse, format } from 'url'; @@ -76,16 +76,7 @@ export class WmsClient { } const body = await resp.text(); - const parsePromise = new Promise((resolve, reject) => { - parseString(body, (error, result) => { - if (error) { - reject(error); - } else { - resolve(result); - } - }); - }); - return await parsePromise; + return await parseXmlString(body); } async getCapabilities() { diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/__snapshots__/vector_style_symbol_editor.test.js.snap b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/__snapshots__/vector_style_symbol_editor.test.js.snap new file mode 100644 index 000000000000..34cd441aa549 --- /dev/null +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/__snapshots__/vector_style_symbol_editor.test.js.snap @@ -0,0 +1,94 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Should render icon select when symbolized as Icon 1`] = ` + + + + + +`; + +exports[`Should render symbol select when symbolized as Circle 1`] = ` + + + +`; diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/__snapshots__/vector_icon.test.js.snap b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/__snapshots__/vector_icon.test.js.snap new file mode 100644 index 000000000000..553e1471b61b --- /dev/null +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/__snapshots__/vector_icon.test.js.snap @@ -0,0 +1,43 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Renders CircleIcon with correct styles when isPointOnly 1`] = ` + +`; + +exports[`Renders LineIcon with correct styles when isLineOnly 1`] = ` + +`; + +exports[`Renders PolygonIcon with correct styles when not line only or not point only 1`] = ` + +`; + +exports[`Renders SymbolIcon with correct styles when isPointOnly and symbolId provided 1`] = ` + +`; diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/point_icon.js b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/circle_icon.js similarity index 97% rename from x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/point_icon.js rename to x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/circle_icon.js index 7a208e1f4609..5efba64360f2 100644 --- a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/point_icon.js +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/circle_icon.js @@ -6,7 +6,7 @@ import React from 'react'; -export const PointIcon = ({ style }) => ( +export const CircleIcon = ({ style }) => ( , - , - , + , + , + , ]; } @@ -36,9 +36,9 @@ function getSymbolSizeIcons() { fill: 'grey', }; return [ - , - , - , + , + , + , ]; } diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/symbol_icon.js b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/symbol_icon.js new file mode 100644 index 000000000000..1cff6003e291 --- /dev/null +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/symbol_icon.js @@ -0,0 +1,71 @@ +/* + * 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 React, { Component } from 'react'; +import PropTypes from 'prop-types'; + +import { getMakiSymbolSvg, styleSvg, buildSrcUrl } from '../../../symbol_utils'; + +export class SymbolIcon extends Component { + + state = { + imgDataUrl: undefined, + prevSymbolId: undefined, + prevFill: undefined, + } + + componentDidMount() { + this._isMounted = true; + this._loadSymbol(this.props.symbolId, this.props.fill); + } + + componentDidUpdate() { + this._loadSymbol(this.props.symbolId, this.props.fill); + } + + componentWillUnmount() { + this._isMounted = false; + } + + async _loadSymbol(nextSymbolId, nextFill) { + if (nextSymbolId === this.state.prevSymbolId + && nextFill === this.state.prevFill) { + return; + } + + let imgDataUrl; + try { + const svg = getMakiSymbolSvg(nextSymbolId); + const styledSvg = await styleSvg(svg, nextFill); + imgDataUrl = buildSrcUrl(styledSvg); + } catch (error) { + // ignore failures - component will just not display an icon + } + + if (this._isMounted) { + this.setState({ + imgDataUrl, + prevSymbolId: nextSymbolId, + prevFill: nextFill + }); + } + } + + render() { + if (!this.state.imgDataUrl) { + return null; + } + + return ( + {this.props.symbolId} + ); + } +} + +SymbolIcon.propTypes = { + symbolId: PropTypes.string.isRequired, + fill: PropTypes.string.isRequired, +}; diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/vector_icon.js b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/vector_icon.js index 3a15ea3908ac..619f2fe42dc3 100644 --- a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/vector_icon.js +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/vector_icon.js @@ -8,9 +8,10 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { dynamicColorShape, staticColorShape } from '../style_option_shapes'; -import { PointIcon } from './point_icon'; +import { CircleIcon } from './circle_icon'; import { LineIcon } from './line_icon'; import { PolygonIcon } from './polygon_icon'; +import { SymbolIcon } from './symbol_icon'; import { VectorStyle } from '../../../vector_style'; import { getColorRampCenterColor } from '../../../color_utils'; @@ -62,9 +63,20 @@ export class VectorIcon extends Component { fill: extractColorFromStyleProperty(this.props.fillColor, 'grey'), }; - return this.state.isPointsOnly - ? - : ; + if (!this.state.isPointsOnly) { + return (); + } + + if (!this.props.symbolId) { + return (); + } + + return ( + + ); } } @@ -92,6 +104,7 @@ const colorStylePropertyShape = PropTypes.shape({ VectorIcon.propTypes = { fillColor: colorStylePropertyShape, lineColor: colorStylePropertyShape, + symbolId: PropTypes.string, loadIsPointsOnly: PropTypes.func.isRequired, loadIsLinesOnly: PropTypes.func.isRequired, }; diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/vector_icon.test.js b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/vector_icon.test.js new file mode 100644 index 000000000000..27398bb201dd --- /dev/null +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/legend/vector_icon.test.js @@ -0,0 +1,114 @@ +/* + * 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 React from 'react'; +import { shallow } from 'enzyme'; + +import { VectorIcon } from './vector_icon'; +import { VectorStyle } from '../../../vector_style'; + +let isPointsOnly = false; +let isLinesOnly = false; +const defaultProps = { + loadIsPointsOnly: () => { return isPointsOnly; }, + loadIsLinesOnly: () => { return isLinesOnly; }, + fillColor: { + type: VectorStyle.STYLE_TYPE.STATIC, + options: { + color: '#ff0000', + } + }, + lineColor: { + type: VectorStyle.STYLE_TYPE.DYNAMIC, + options: { + color: 'Blues', + } + } +}; + +function configureIsLinesOnly() { + isLinesOnly = true; + isPointsOnly = false; +} + +function configureIsPointsOnly() { + isLinesOnly = false; + isPointsOnly = true; +} + +function configureNotLineOrPointOnly() { + isLinesOnly = false; + isPointsOnly = false; +} + +test('Renders PolygonIcon with correct styles when not line only or not point only', async () => { + configureNotLineOrPointOnly(); + const component = shallow( + + ); + + // Ensure all promises resolve + await new Promise(resolve => process.nextTick(resolve)); + // Ensure the state changes are reflected + component.update(); + + expect(component) + .toMatchSnapshot(); +}); + +test('Renders LineIcon with correct styles when isLineOnly', async () => { + configureIsLinesOnly(); + const component = shallow( + + ); + + // Ensure all promises resolve + await new Promise(resolve => process.nextTick(resolve)); + // Ensure the state changes are reflected + component.update(); + + expect(component) + .toMatchSnapshot(); +}); + +test('Renders CircleIcon with correct styles when isPointOnly', async () => { + configureIsPointsOnly(); + const component = shallow( + + ); + + // Ensure all promises resolve + await new Promise(resolve => process.nextTick(resolve)); + // Ensure the state changes are reflected + component.update(); + + expect(component) + .toMatchSnapshot(); +}); + +test('Renders SymbolIcon with correct styles when isPointOnly and symbolId provided', async () => { + configureIsPointsOnly(); + const component = shallow( + + ); + + // Ensure all promises resolve + await new Promise(resolve => process.nextTick(resolve)); + // Ensure the state changes are reflected + component.update(); + + expect(component) + .toMatchSnapshot(); +}); diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_editor.js b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_editor.js index ae49226a5d4f..d9ad19347e2b 100644 --- a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_editor.js +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_editor.js @@ -7,11 +7,15 @@ import _ from 'lodash'; import React, { Component, Fragment } from 'react'; +import chrome from 'ui/chrome'; import { VectorStyleColorEditor } from './color/vector_style_color_editor'; import { VectorStyleSizeEditor } from './size/vector_style_size_editor'; +import { VectorStyleSymbolEditor } from './vector_style_symbol_editor'; import { getDefaultDynamicProperties, getDefaultStaticProperties } from '../../vector_style_defaults'; import { VECTOR_SHAPE_TYPES } from '../../../sources/vector_feature_types'; +import { SYMBOLIZE_AS_CIRCLE } from '../../vector_constants'; import { i18n } from '@kbn/i18n'; +import { SYMBOL_OPTIONS } from '../../symbol_utils'; import { EuiSpacer, EuiButtonGroup } from '@elastic/eui'; @@ -135,16 +139,38 @@ export class VectorStyleEditor extends Component { } _renderPointProperties() { + let lineColor; + let lineWidth; + if (this.props.styleProperties.symbol.options.symbolizeAs === SYMBOLIZE_AS_CIRCLE) { + lineColor = ( + + {this._renderLineColor()} + + + ); + lineWidth = ( + + {this._renderLineWidth()} + + + ); + } + return ( + + {this._renderFillColor()} - {this._renderLineColor()} - + {lineColor} - {this._renderLineWidth()} - + {lineWidth} {this._renderSymbolSize()} diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_symbol_editor.js b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_symbol_editor.js new file mode 100644 index 000000000000..76d13825a2c4 --- /dev/null +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_symbol_editor.js @@ -0,0 +1,132 @@ +/* + * 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 React, { Fragment } from 'react'; + +import { + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiSelect, + EuiSpacer, + EuiComboBox, +} from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; +import { SYMBOLIZE_AS_CIRCLE, SYMBOLIZE_AS_ICON } from '../../vector_constants'; +import { SymbolIcon } from './legend/symbol_icon'; + +const SYMBOLIZE_AS_OPTIONS = [ + { + value: SYMBOLIZE_AS_CIRCLE, + text: i18n.translate('xpack.maps.vector.symbolAs.circleLabel', { + defaultMessage: 'circle' + }) + }, + { + value: SYMBOLIZE_AS_ICON, + text: i18n.translate('xpack.maps.vector.symbolAs.IconLabel', { + defaultMessage: 'icon' + }) + }, +]; + +export function VectorStyleSymbolEditor({ styleOptions, handlePropertyChange, symbolOptions, isDarkMode }) { + const renderSymbolizeAsSelect = () => { + const selectedOption = SYMBOLIZE_AS_OPTIONS.find(({ value }) => { + return value === styleOptions.symbolizeAs; + }); + + const onSymbolizeAsChange = e => { + const styleDescriptor = { + options: { + ...styleOptions, + symbolizeAs: e.target.value + } + }; + handlePropertyChange('symbol', styleDescriptor); + }; + + return ( + + ); + }; + + const renderSymbolSelect = () => { + const selectedOption = symbolOptions.find(({ value }) => { + return value === styleOptions.symbolId; + }); + + const onSymbolChange = selectedOptions => { + if (!selectedOptions || selectedOptions.length === 0) { + return; + } + + const styleDescriptor = { + options: { + ...styleOptions, + symbolId: selectedOptions[0].value + } + }; + handlePropertyChange('symbol', styleDescriptor); + }; + + const renderOption = ({ value, label }) => { + return ( + + + + + + {label} + + + ); + }; + + return ( + + ); + }; + + const renderFormRowContent = () => { + if (styleOptions.symbolizeAs === SYMBOLIZE_AS_CIRCLE) { + return renderSymbolizeAsSelect(); + } + + return ( + + {renderSymbolizeAsSelect()} + + {renderSymbolSelect()} + + ); + }; + + return ( + + {renderFormRowContent()} + + ); +} diff --git a/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_symbol_editor.test.js b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_symbol_editor.test.js new file mode 100644 index 000000000000..4a2c227d8453 --- /dev/null +++ b/x-pack/plugins/maps/public/shared/layers/styles/components/vector/vector_style_symbol_editor.test.js @@ -0,0 +1,52 @@ +/* + * 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 React from 'react'; +import { shallow } from 'enzyme'; + +import { SYMBOLIZE_AS_CIRCLE, SYMBOLIZE_AS_ICON } from '../../vector_constants'; +import { VectorStyleSymbolEditor } from './vector_style_symbol_editor'; + +const symbolOptions = [ + { value: 'symbol1', label: 'symbol1' }, + { value: 'symbol2', label: 'symbol2' } +]; + +const defaultProps = { + styleOptions: { + symbolizeAs: SYMBOLIZE_AS_CIRCLE, + symbolId: symbolOptions[0].value, + }, + handlePropertyChange: () => {}, + symbolOptions, + isDarkMode: false +}; + +test('Should render symbol select when symbolized as Circle', () => { + const component = shallow( + + ); + + expect(component) + .toMatchSnapshot(); +}); + +test('Should render icon select when symbolized as Icon', () => { + const component = shallow( + + ); + + expect(component) + .toMatchSnapshot(); +}); diff --git a/x-pack/plugins/maps/public/shared/layers/styles/symbol_utils.js b/x-pack/plugins/maps/public/shared/layers/styles/symbol_utils.js new file mode 100644 index 000000000000..df2411298524 --- /dev/null +++ b/x-pack/plugins/maps/public/shared/layers/styles/symbol_utils.js @@ -0,0 +1,103 @@ +/* + * 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 { maki } from '@kbn/maki'; +import xml2js from 'xml2js'; +import { parseXmlString } from '../../../../common/parse_xml_string'; + +export const LARGE_MAKI_ICON_SIZE = 15; +const LARGE_MAKI_ICON_SIZE_AS_STRING = LARGE_MAKI_ICON_SIZE.toString(); +export const SMALL_MAKI_ICON_SIZE = 11; +export const HALF_LARGE_MAKI_ICON_SIZE = Math.ceil(LARGE_MAKI_ICON_SIZE); + +export const SYMBOLS = {}; +maki.svgArray.forEach(svgString => { + const ID_FRAG = 'id="'; + const index = svgString.indexOf(ID_FRAG); + if (index !== -1) { + const idStartIndex = index + ID_FRAG.length; + const idEndIndex = svgString.substring(idStartIndex).indexOf('"') + idStartIndex; + const fullSymbolId = svgString.substring(idStartIndex, idEndIndex); + const symbolId = fullSymbolId.substring(0, fullSymbolId.length - 3); // remove '-15' or '-11' from id + const symbolSize = fullSymbolId.substring(fullSymbolId.length - 2); // grab last 2 chars from id + // only show large icons, small/large icon selection will based on configured size style + if (symbolSize === LARGE_MAKI_ICON_SIZE_AS_STRING) { + SYMBOLS[symbolId] = svgString; + } + } +}); + +export const SYMBOL_OPTIONS = Object.keys(SYMBOLS).map(symbolId => { + return ({ + value: symbolId, + label: symbolId, + }); +}); + +export function getMakiSymbolSvg(symbolId) { + if (!SYMBOLS[symbolId]) { + throw new Error(`Unable to find symbol: ${symbolId}`); + } + return SYMBOLS[symbolId]; +} + +export function getMakiSymbolAnchor(symbolId) { + switch (symbolId) { + case 'embassy-11': + case 'embassy-15': + case 'marker-11': + case 'marker-15': + case 'marker-stroked-11': + case 'marker-stroked-15': + return 'bottom'; + default: + return 'center'; + } +} + + +export function buildSrcUrl(svgString) { + const domUrl = window.URL || window.webkitURL || window; + const svg = new Blob([svgString], { type: 'image/svg+xml' }); + return domUrl.createObjectURL(svg); +} + +export async function styleSvg(svgString, fill) { + const svgXml = await parseXmlString(svgString); + if (fill) { + svgXml.svg.$.style = `fill: ${fill};`; + } + const builder = new xml2js.Builder(); + return builder.buildObject(svgXml); +} + +function addImageToMap(imageUrl, imageId, symbolId, mbMap) { + return new Promise((resolve, reject) => { + const img = new Image(LARGE_MAKI_ICON_SIZE, LARGE_MAKI_ICON_SIZE); + img.onload = () => { + mbMap.addImage(imageId, img); + resolve(); + }; + img.onerror = (err) => { + reject(err); + }; + img.src = imageUrl; + }); +} + +export async function loadImage(imageId, symbolId, color, mbMap) { + let symbolSvg; + try { + symbolSvg = getMakiSymbolSvg(symbolId); + } catch(error) { + return; + } + + const styledSvg = await styleSvg(symbolSvg, color); + const imageUrl = buildSrcUrl(styledSvg); + + await addImageToMap(imageUrl, imageId, symbolId, mbMap); +} diff --git a/x-pack/plugins/maps/public/shared/layers/styles/symbol_utils.test.js b/x-pack/plugins/maps/public/shared/layers/styles/symbol_utils.test.js new file mode 100644 index 000000000000..b62f385680da --- /dev/null +++ b/x-pack/plugins/maps/public/shared/layers/styles/symbol_utils.test.js @@ -0,0 +1,29 @@ +/* + * 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 { getMakiSymbolSvg, styleSvg } from './symbol_utils'; + +describe('getMakiSymbolSvg', () => { + it('Should load symbol svg', () => { + const svgString = getMakiSymbolSvg('aerialway'); + expect(svgString.length).toBe(624); + }); +}); + +describe('styleSvg', () => { + it('Should not add style property when fill not provided', async () => { + const unstyledSvgString = ''; + const styledSvg = await styleSvg(unstyledSvgString); + expect(styledSvg.split('\n')[1]).toBe(''); + }); + + it('Should add style property to svg element', async () => { + const unstyledSvgString = ''; + const styledSvg = await styleSvg(unstyledSvgString, 'red'); + // eslint-disable-next-line max-len + expect(styledSvg.split('\n')[1]).toBe(''); + }); +}); diff --git a/x-pack/plugins/maps/public/shared/layers/styles/vector_constants.js b/x-pack/plugins/maps/public/shared/layers/styles/vector_constants.js new file mode 100644 index 000000000000..21d55b9a7599 --- /dev/null +++ b/x-pack/plugins/maps/public/shared/layers/styles/vector_constants.js @@ -0,0 +1,10 @@ +/* + * 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. + */ + +export const SYMBOLIZE_AS_CIRCLE = 'circle'; +export const SYMBOLIZE_AS_ICON = 'icon'; + +export const DEFAULT_ICON_SIZE = 10; diff --git a/x-pack/plugins/maps/public/shared/layers/styles/vector_style.js b/x-pack/plugins/maps/public/shared/layers/styles/vector_style.js index 0d705a06202a..1ee3582689a8 100644 --- a/x-pack/plugins/maps/public/shared/layers/styles/vector_style.js +++ b/x-pack/plugins/maps/public/shared/layers/styles/vector_style.js @@ -9,12 +9,19 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { getColorRampStops } from './color_utils'; import { VectorStyleEditor } from './components/vector/vector_style_editor'; -import { getDefaultStaticProperties } from './vector_style_defaults'; +import { getDefaultProperties } from './vector_style_defaults'; import { AbstractStyle } from './abstract_style'; import { SOURCE_DATA_ID_ORIGIN, GEO_JSON_TYPE } from '../../../../common/constants'; import { VectorIcon } from './components/vector/legend/vector_icon'; import { VectorStyleLegend } from './components/vector/legend/vector_style_legend'; import { VECTOR_SHAPE_TYPES } from '../sources/vector_feature_types'; +import { SYMBOLIZE_AS_CIRCLE, SYMBOLIZE_AS_ICON } from './vector_constants'; +import { + getMakiSymbolAnchor, + LARGE_MAKI_ICON_SIZE, + SMALL_MAKI_ICON_SIZE, + HALF_LARGE_MAKI_ICON_SIZE +} from './symbol_utils'; export class VectorStyle extends AbstractStyle { @@ -37,12 +44,12 @@ export class VectorStyle extends AbstractStyle { static createDescriptor(properties = {}) { return { type: VectorStyle.type, - properties: { ...getDefaultStaticProperties(), ...properties } + properties: { ...getDefaultProperties(), ...properties } }; } static createDefaultStyleProperties(mapColors) { - return getDefaultStaticProperties(mapColors); + return getDefaultProperties(mapColors); } static getDisplayName() { @@ -278,12 +285,16 @@ export class VectorStyle extends AbstractStyle { getIcon = () => { const styles = this.getProperties(); + const symbolId = this.arePointsSymbolizedAsCircles() + ? undefined + : this._descriptor.properties.symbol.options.symbolId; return ( ); } @@ -305,9 +316,19 @@ export class VectorStyle extends AbstractStyle { _getScaledFields() { return this.getDynamicPropertiesArray() - .map(({ options }) => { + .map(({ styleName, options }) => { const name = options.field.name; + + // "feature-state" data expressions are not supported with layout properties. + // To work around this limitation, some scaled values must fall back to geojson property values. + let supportsFeatureState = true; + if (styleName === 'iconSize' + && this._descriptor.properties.symbol.options.symbolizeAs === SYMBOLIZE_AS_ICON) { + supportsFeatureState = false; + } + return { + supportsFeatureState, name, range: this._getFieldRange(name), computedName: VectorStyle.getComputedFieldName(name), @@ -350,7 +371,7 @@ export class VectorStyle extends AbstractStyle { const feature = featureCollection.features[i]; for (let j = 0; j < scaledFields.length; j++) { - const { name, range, computedName } = scaledFields[j]; + const { supportsFeatureState, name, range, computedName } = scaledFields[j]; const unscaledValue = parseFloat(feature.properties[name]); let scaledValue; if (isNaN(unscaledValue) || !range) {//cannot scale @@ -360,12 +381,21 @@ export class VectorStyle extends AbstractStyle { } else { scaledValue = (feature.properties[name] - range.min) / range.delta; } - tmpFeatureState[computedName] = scaledValue; + if (supportsFeatureState) { + tmpFeatureState[computedName] = scaledValue; + } else { + feature.properties[computedName] = scaledValue; + } } tmpFeatureIdentifier.source = sourceId; tmpFeatureIdentifier.id = feature.id; mbMap.setFeatureState(tmpFeatureIdentifier, tmpFeatureState); } + + const hasScaledGeoJsonProperties = scaledFields.some(({ supportsFeatureState }) => { + return !supportsFeatureState; + }); + return hasScaledGeoJsonProperties; } _getMBDataDrivenColor({ fieldName, color }) { @@ -409,15 +439,18 @@ export class VectorStyle extends AbstractStyle { return null; } + _isSizeDynamicConfigComplete(styleDescriptor) { + return _.has(styleDescriptor, 'options.field.name') + && _.has(styleDescriptor, 'options.minSize') + && _.has(styleDescriptor, 'options.maxSize'); + } + _getMbSize(styleDescriptor) { if (styleDescriptor.type === VectorStyle.STYLE_TYPE.STATIC) { return styleDescriptor.options.size; } - const isDynamicConfigComplete = _.has(styleDescriptor, 'options.field.name') - && _.has(styleDescriptor, 'options.minSize') - && _.has(styleDescriptor, 'options.maxSize'); - if (isDynamicConfigComplete) { + if (this._isSizeDynamicConfigComplete(styleDescriptor)) { return this._getMbDataDrivenSize({ fieldName: styleDescriptor.options.field.name, minSize: styleDescriptor.options.minSize, @@ -487,4 +520,48 @@ export class VectorStyle extends AbstractStyle { mbMap.setPaintProperty(pointLayerId, 'circle-radius', 0); } } + + async setMBSymbolPropertiesForPoints({ mbMap, symbolLayerId, alpha }) { + mbMap.setLayoutProperty(symbolLayerId, 'icon-ignore-placement', true); + + const symbolId = this._descriptor.properties.symbol.options.symbolId; + mbMap.setLayoutProperty(symbolLayerId, 'icon-anchor', getMakiSymbolAnchor(symbolId)); + const color = this._getMBColor(this._descriptor.properties.fillColor); + // icon-color is only supported on SDF icons. + mbMap.setPaintProperty(symbolLayerId, 'icon-color', color); + mbMap.setPaintProperty(symbolLayerId, 'icon-opacity', alpha); + + // circle sizing is by radius + // to make icons be similiar in size to circles then have to deal with icon in half width measurements + const iconSize = this._descriptor.properties.iconSize; + if (iconSize.type === VectorStyle.STYLE_TYPE.STATIC) { + const iconPixels = iconSize.options.size >= HALF_LARGE_MAKI_ICON_SIZE + ? LARGE_MAKI_ICON_SIZE + : SMALL_MAKI_ICON_SIZE; + mbMap.setLayoutProperty(symbolLayerId, 'icon-image', `${symbolId}-${iconPixels}`); + + const halfIconPixels = iconPixels / 2; + mbMap.setLayoutProperty(symbolLayerId, 'icon-size', iconSize.options.size / halfIconPixels); + } else if (this._isSizeDynamicConfigComplete(iconSize)) { + const iconPixels = iconSize.options.maxSize >= HALF_LARGE_MAKI_ICON_SIZE + ? LARGE_MAKI_ICON_SIZE + : SMALL_MAKI_ICON_SIZE; + mbMap.setLayoutProperty(symbolLayerId, 'icon-image', `${symbolId}-${iconPixels}`); + + const halfIconPixels = iconPixels / 2; + const targetName = VectorStyle.getComputedFieldName(iconSize.options.field.name); + // Using property state instead of feature-state because layout properties do not support feature-state + mbMap.setLayoutProperty(symbolLayerId, 'icon-size', [ + 'interpolate', + ['linear'], + ['get', targetName], + 0, iconSize.options.minSize / halfIconPixels, + 1, iconSize.options.maxSize / halfIconPixels + ]); + } + } + + arePointsSymbolizedAsCircles() { + return this._descriptor.properties.symbol.options.symbolizeAs === SYMBOLIZE_AS_CIRCLE; + } } diff --git a/x-pack/plugins/maps/public/shared/layers/styles/vector_style.test.js b/x-pack/plugins/maps/public/shared/layers/styles/vector_style.test.js index 04a9fe4307c4..73dc8c541ea7 100644 --- a/x-pack/plugins/maps/public/shared/layers/styles/vector_style.test.js +++ b/x-pack/plugins/maps/public/shared/layers/styles/vector_style.test.js @@ -65,6 +65,12 @@ describe('getDescriptorWithMissingStylePropsRemoved', () => { }, type: 'STATIC', }, + symbol: { + options: { + symbolId: 'airfield', + symbolizeAs: 'circle', + }, + }, }); }); }); diff --git a/x-pack/plugins/maps/public/shared/layers/styles/vector_style_defaults.js b/x-pack/plugins/maps/public/shared/layers/styles/vector_style_defaults.js index 674e9b66249b..c0475ae2c0bb 100644 --- a/x-pack/plugins/maps/public/shared/layers/styles/vector_style_defaults.js +++ b/x-pack/plugins/maps/public/shared/layers/styles/vector_style_defaults.js @@ -5,13 +5,27 @@ */ import { VectorStyle } from './vector_style'; +import { SYMBOLIZE_AS_CIRCLE, DEFAULT_ICON_SIZE } from './vector_constants'; import { COLOR_GRADIENTS } from './color_utils'; const DEFAULT_COLORS = ['#e6194b', '#3cb44b', '#ffe119', '#f58231', '#911eb4']; +const DEFAULT_ICON = 'airfield'; export const DEFAULT_MIN_SIZE = 1; export const DEFAULT_MAX_SIZE = 64; +export function getDefaultProperties(mapColors = []) { + return { + ...getDefaultStaticProperties(mapColors), + symbol: { + options: { + symbolizeAs: SYMBOLIZE_AS_CIRCLE, + symbolId: DEFAULT_ICON, + } + }, + }; +} + export function getDefaultStaticProperties(mapColors = []) { // Colors must be state-aware to reduce unnecessary incrementation const lastColor = mapColors.pop(); @@ -40,9 +54,9 @@ export function getDefaultStaticProperties(mapColors = []) { iconSize: { type: VectorStyle.STYLE_TYPE.STATIC, options: { - size: 10 + size: DEFAULT_ICON_SIZE } - }, + } }; } @@ -64,7 +78,7 @@ export function getDefaultDynamicProperties() { type: VectorStyle.STYLE_TYPE.DYNAMIC, options: { minSize: DEFAULT_MIN_SIZE, - maxSize: 64 + maxSize: DEFAULT_MAX_SIZE } }, iconSize: { @@ -73,6 +87,6 @@ export function getDefaultDynamicProperties() { minSize: DEFAULT_MIN_SIZE, maxSize: DEFAULT_MAX_SIZE } - }, + } }; } diff --git a/x-pack/plugins/maps/public/shared/layers/vector_layer.js b/x-pack/plugins/maps/public/shared/layers/vector_layer.js index dff5323dcab7..b7187dbd6318 100644 --- a/x-pack/plugins/maps/public/shared/layers/vector_layer.js +++ b/x-pack/plugins/maps/public/shared/layers/vector_layer.js @@ -35,6 +35,12 @@ const ALL_SHAPE_MB_FILTER = [ ['==', ['geometry-type'], GEO_JSON_TYPE.MULTI_LINE_STRING] ]; +const POINT_MB_FILTER = [ + 'any', + ['==', ['geometry-type'], GEO_JSON_TYPE.POINT], + ['==', ['geometry-type'], GEO_JSON_TYPE.MULTI_POINT] +]; + let idCounter = 0; function generateNumericalId() { @@ -434,13 +440,47 @@ export class VectorLayer extends AbstractLayer { if (featureCollection !== featureCollectionOnMap) { mbGeoJSONSource.setData(featureCollection); } - this._style.setFeatureState(featureCollection, mbMap, this.getId()); + + const hasScaledGeoJsonProperties = this._style.setFeatureState(featureCollection, mbMap, this.getId()); + + // "feature-state" data expressions are not supported with layout properties. + // To work around this limitation, + // scaled layout properties (like icon-size) must fall back to geojson property values :( + if (hasScaledGeoJsonProperties) { + mbGeoJSONSource.setData(featureCollection); + } } _setMbPointsProperties(mbMap) { + const pointLayerId = this._getMbPointLayerId(); + const symbolLayerId = this._getMbSymbolLayerId(); + const pointLayer = mbMap.getLayer(pointLayerId); + const symbolLayer = mbMap.getLayer(symbolLayerId); + + let layerId; + if (this._style.arePointsSymbolizedAsCircles()) { + layerId = pointLayerId; + if (symbolLayer) { + mbMap.setLayoutProperty(symbolLayerId, 'visibility', 'none'); + } + this._setMbCircleProperties(mbMap); + } else { + layerId = symbolLayerId; + if (pointLayer) { + mbMap.setLayoutProperty(pointLayerId, 'visibility', 'none'); + } + this._setMbSymbolProperties(mbMap); + } + + mbMap.setLayoutProperty(layerId, 'visibility', this.isVisible() ? 'visible' : 'none'); + mbMap.setLayerZoomRange(layerId, this._descriptor.minZoom, this._descriptor.maxZoom); + } + + _setMbCircleProperties(mbMap) { const sourceId = this.getId(); const pointLayerId = this._getMbPointLayerId(); const pointLayer = mbMap.getLayer(pointLayerId); + if (!pointLayer) { mbMap.addLayer({ id: pointLayerId, @@ -448,15 +488,35 @@ export class VectorLayer extends AbstractLayer { source: sourceId, paint: {} }); - mbMap.setFilter(pointLayerId, ['any', ['==', ['geometry-type'], 'Point'], ['==', ['geometry-type'], 'MultiPoint']]); + mbMap.setFilter(pointLayerId, POINT_MB_FILTER); } + this._style.setMBPaintPropertiesForPoints({ alpha: this.getAlpha(), mbMap, pointLayerId: pointLayerId, }); - mbMap.setLayoutProperty(pointLayerId, 'visibility', this.isVisible() ? 'visible' : 'none'); - mbMap.setLayerZoomRange(pointLayerId, this._descriptor.minZoom, this._descriptor.maxZoom); + } + + _setMbSymbolProperties(mbMap) { + const sourceId = this.getId(); + const symbolLayerId = this._getMbSymbolLayerId(); + const symbolLayer = mbMap.getLayer(symbolLayerId); + + if (!symbolLayer) { + mbMap.addLayer({ + id: symbolLayerId, + type: 'symbol', + source: sourceId, + }); + mbMap.setFilter(symbolLayerId, POINT_MB_FILTER); + } + + this._style.setMBSymbolPropertiesForPoints({ + alpha: this.getAlpha(), + mbMap, + symbolLayerId: symbolLayerId, + }); } _setMbLinePolygonProperties(mbMap) { @@ -518,6 +578,10 @@ export class VectorLayer extends AbstractLayer { return this.getId() + '_circle'; } + _getMbSymbolLayerId() { + return this.getId() + '_symbol'; + } + _getMbLineLayerId() { return this.getId() + '_line'; } @@ -527,10 +591,9 @@ export class VectorLayer extends AbstractLayer { } getMbLayerIds() { - return [this._getMbPointLayerId(), this._getMbLineLayerId(), this._getMbPolygonLayerId()]; + return [this._getMbPointLayerId(), this._getMbSymbolLayerId(), this._getMbLineLayerId(), this._getMbPolygonLayerId()]; } - _addJoinsToSourceTooltips(tooltipsFromSource) { for (let i = 0; i < tooltipsFromSource.length; i++) { const tooltipProperty = tooltipsFromSource[i]; @@ -546,7 +609,6 @@ export class VectorLayer extends AbstractLayer { } } - async getPropertiesForTooltip(properties) { let allTooltips = await this._source.filterAndFormatPropertiesToHtml(properties); diff --git a/x-pack/plugins/maps/server/routes.js b/x-pack/plugins/maps/server/routes.js index b111f3a4f934..bae7ce3f1756 100644 --- a/x-pack/plugins/maps/server/routes.js +++ b/x-pack/plugins/maps/server/routes.js @@ -5,10 +5,18 @@ */ -import { EMS_DATA_FILE_PATH, EMS_DATA_TMS_PATH, EMS_META_PATH, GIS_API_PATH } from '../common/constants'; +import { + EMS_DATA_FILE_PATH, + EMS_DATA_TMS_PATH, + EMS_META_PATH, + GIS_API_PATH, + SPRITE_PATH, +} from '../common/constants'; import fetch from 'node-fetch'; import { i18n } from '@kbn/i18n'; import { getEMSResources } from '../common/ems_util'; +import path from 'path'; + import Boom from 'boom'; const ROOT = `/${GIS_API_PATH}`; @@ -155,4 +163,14 @@ export function initRoutes(server, licenseUid) { } } }); + + server.route({ + method: 'GET', + path: `${SPRITE_PATH}/{path*}`, + handler: { + directory: { + path: path.join(__dirname, './sprites') + } + } + }); } diff --git a/x-pack/plugins/maps/server/sprites/maki.json b/x-pack/plugins/maps/server/sprites/maki.json new file mode 100644 index 000000000000..8eed0d7333a2 --- /dev/null +++ b/x-pack/plugins/maps/server/sprites/maki.json @@ -0,0 +1,2820 @@ +{ + "aerialway-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 0, + "y": 165 + }, + "aerialway-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 0 + }, + "airfield-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 11, + "y": 165 + }, + "airfield-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 0 + }, + "airport-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 22, + "y": 165 + }, + "airport-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 15 + }, + "alcohol-shop-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 33, + "y": 165 + }, + "alcohol-shop-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 15 + }, + "american-football-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 44, + "y": 165 + }, + "american-football-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 0 + }, + "amusement-park-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 55, + "y": 165 + }, + "amusement-park-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 0 + }, + "aquarium-11": { + "sdf": true, + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 66, + "y": 165 + }, + "aquarium-15": { + "sdf": true, + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 15 + }, + "art-gallery-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 77, + "y": 165 + }, + "art-gallery-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 15 + }, + "attraction-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 88, + "y": 165 + }, + "attraction-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 30 + }, + "bakery-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 99, + "y": 165 + }, + "bakery-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 30 + }, + "bank-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 110, + "y": 165 + }, + "bank-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 30 + }, + "bar-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 121, + "y": 165 + }, + "bar-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 30 + }, + "barrier-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 132, + "y": 165 + }, + "barrier-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 45 + }, + "baseball-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 143, + "y": 165 + }, + "baseball-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 45 + }, + "basketball-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 154, + "y": 165 + }, + "basketball-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 45 + }, + "bbq-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 165, + "y": 165 + }, + "bbq-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 45 + }, + "beach-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 176, + "y": 165 + }, + "beach-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 0 + }, + "beer-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 187, + "y": 165 + }, + "beer-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 0 + }, + "bicycle-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 198, + "y": 165 + }, + "bicycle-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 0 + }, + "bicycle-share-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 209, + "y": 165 + }, + "bicycle-share-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 0 + }, + "blood-bank-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 220, + "y": 165 + }, + "blood-bank-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 15 + }, + "bowling-alley-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 0, + "y": 176 + }, + "bowling-alley-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 15 + }, + "bridge-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 11, + "y": 176 + }, + "bridge-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 15 + }, + "building-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 22, + "y": 176 + }, + "building-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 15 + }, + "building-alt1-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 33, + "y": 176 + }, + "building-alt1-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 30 + }, + "bus-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 44, + "y": 176 + }, + "bus-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 30 + }, + "cafe-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 55, + "y": 176 + }, + "cafe-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 30 + }, + "campsite-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 66, + "y": 176 + }, + "campsite-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 30 + }, + "car-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 77, + "y": 176 + }, + "car-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 45 + }, + "car-rental-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 88, + "y": 176 + }, + "car-rental-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 45 + }, + "car-repair-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 99, + "y": 176 + }, + "car-repair-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 45 + }, + "casino-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 110, + "y": 176 + }, + "casino-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 45 + }, + "castle-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 121, + "y": 176 + }, + "castle-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 60 + }, + "cemetery-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 132, + "y": 176 + }, + "cemetery-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 60 + }, + "charging-station-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 143, + "y": 176 + }, + "charging-station-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 60 + }, + "cinema-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 154, + "y": 176 + }, + "cinema-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 60 + }, + "circle-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 165, + "y": 176 + }, + "circle-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 60 + }, + "circle-stroked-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 176, + "y": 176 + }, + "circle-stroked-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 60 + }, + "city-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 187, + "y": 176 + }, + "city-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 60 + }, + "clothing-store-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 198, + "y": 176 + }, + "clothing-store-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 60 + }, + "college-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 209, + "y": 176 + }, + "college-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 75 + }, + "commercial-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 220, + "y": 176 + }, + "commercial-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 75 + }, + "communications-tower-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 0, + "y": 187 + }, + "communications-tower-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 75 + }, + "confectionery-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 11, + "y": 187 + }, + "confectionery-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 75 + }, + "convenience-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 22, + "y": 187 + }, + "convenience-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 75 + }, + "cricket-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 33, + "y": 187 + }, + "cricket-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 75 + }, + "cross-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 44, + "y": 187 + }, + "cross-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 75 + }, + "dam-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 55, + "y": 187 + }, + "dam-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 75 + }, + "danger-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 66, + "y": 187 + }, + "danger-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 90 + }, + "defibrillator-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 77, + "y": 187 + }, + "defibrillator-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 90 + }, + "dentist-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 88, + "y": 187 + }, + "dentist-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 90 + }, + "doctor-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 99, + "y": 187 + }, + "doctor-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 90 + }, + "dog-park-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 110, + "y": 187 + }, + "dog-park-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 90 + }, + "drinking-water-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 121, + "y": 187 + }, + "drinking-water-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 90 + }, + "embassy-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 132, + "y": 187 + }, + "embassy-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 90 + }, + "emergency-phone-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 143, + "y": 187 + }, + "emergency-phone-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 90 + }, + "entrance-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 154, + "y": 187 + }, + "entrance-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 105 + }, + "entrance-alt1-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 165, + "y": 187 + }, + "entrance-alt1-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 105 + }, + "farm-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 176, + "y": 187 + }, + "farm-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 105 + }, + "fast-food-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 187, + "y": 187 + }, + "fast-food-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 105 + }, + "fence-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 198, + "y": 187 + }, + "fence-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 105 + }, + "ferry-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 209, + "y": 187 + }, + "ferry-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 105 + }, + "fire-station-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 220, + "y": 187 + }, + "fire-station-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 105 + }, + "fitness-centre-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 0, + "y": 198 + }, + "fitness-centre-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 105 + }, + "florist-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 11, + "y": 198 + }, + "florist-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 0 + }, + "fuel-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 22, + "y": 198 + }, + "fuel-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 0 + }, + "furniture-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 33, + "y": 198 + }, + "furniture-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 0 + }, + "gaming-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 44, + "y": 198 + }, + "gaming-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 0 + }, + "garden-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 55, + "y": 198 + }, + "garden-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 0 + }, + "garden-centre-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 66, + "y": 198 + }, + "garden-centre-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 0 + }, + "gift-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 77, + "y": 198 + }, + "gift-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 0 + }, + "globe-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 88, + "y": 198 + }, + "globe-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 0 + }, + "golf-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 99, + "y": 198 + }, + "golf-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 15 + }, + "grocery-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 110, + "y": 198 + }, + "grocery-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 15 + }, + "hairdresser-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 121, + "y": 198 + }, + "hairdresser-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 15 + }, + "harbor-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 132, + "y": 198 + }, + "harbor-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 15 + }, + "hardware-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 143, + "y": 198 + }, + "hardware-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 15 + }, + "heart-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 154, + "y": 198 + }, + "heart-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 15 + }, + "heliport-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 165, + "y": 198 + }, + "heliport-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 15 + }, + "home-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 176, + "y": 198 + }, + "home-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 15 + }, + "horse-riding-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 187, + "y": 198 + }, + "horse-riding-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 30 + }, + "hospital-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 198, + "y": 198 + }, + "hospital-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 30 + }, + "ice-cream-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 209, + "y": 198 + }, + "ice-cream-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 30 + }, + "industry-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 220, + "y": 198 + }, + "industry-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 30 + }, + "information-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 0, + "y": 209 + }, + "information-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 30 + }, + "jewelry-store-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 11, + "y": 209 + }, + "jewelry-store-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 30 + }, + "karaoke-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 22, + "y": 209 + }, + "karaoke-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 30 + }, + "landmark-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 33, + "y": 209 + }, + "landmark-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 30 + }, + "landuse-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 44, + "y": 209 + }, + "landuse-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 45 + }, + "laundry-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 55, + "y": 209 + }, + "laundry-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 45 + }, + "library-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 66, + "y": 209 + }, + "library-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 45 + }, + "lighthouse-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 77, + "y": 209 + }, + "lighthouse-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 45 + }, + "lodging-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 88, + "y": 209 + }, + "lodging-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 45 + }, + "logging-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 99, + "y": 209 + }, + "logging-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 45 + }, + "marker-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 110, + "y": 209 + }, + "marker-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 45 + }, + "marker-stroked-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 121, + "y": 209 + }, + "marker-stroked-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 45 + }, + "mobile-phone-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 132, + "y": 209 + }, + "mobile-phone-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 60 + }, + "monument-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 143, + "y": 209 + }, + "monument-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 60 + }, + "mountain-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 154, + "y": 209 + }, + "mountain-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 60 + }, + "museum-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 165, + "y": 209 + }, + "museum-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 60 + }, + "music-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 176, + "y": 209 + }, + "music-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 60 + }, + "natural-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 187, + "y": 209 + }, + "natural-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 60 + }, + "optician-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 198, + "y": 209 + }, + "optician-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 60 + }, + "paint-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 209, + "y": 209 + }, + "paint-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 60 + }, + "park-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 220, + "y": 209 + }, + "park-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 75 + }, + "park-alt1-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 0, + "y": 220 + }, + "park-alt1-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 75 + }, + "parking-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 11, + "y": 220 + }, + "parking-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 75 + }, + "parking-garage-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 22, + "y": 220 + }, + "parking-garage-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 75 + }, + "pharmacy-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 33, + "y": 220 + }, + "pharmacy-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 75 + }, + "picnic-site-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 44, + "y": 220 + }, + "picnic-site-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 75 + }, + "pitch-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 55, + "y": 220 + }, + "pitch-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 75 + }, + "place-of-worship-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 66, + "y": 220 + }, + "place-of-worship-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 75 + }, + "playground-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 77, + "y": 220 + }, + "playground-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 90 + }, + "police-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 88, + "y": 220 + }, + "police-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 90 + }, + "post-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 99, + "y": 220 + }, + "post-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 90 + }, + "prison-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 110, + "y": 220 + }, + "prison-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 90 + }, + "rail-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 121, + "y": 220 + }, + "rail-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 90 + }, + "rail-light-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 132, + "y": 220 + }, + "rail-light-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 90 + }, + "rail-metro-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 143, + "y": 220 + }, + "rail-metro-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 90 + }, + "ranger-station-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 154, + "y": 220 + }, + "ranger-station-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 90 + }, + "recycling-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 165, + "y": 220 + }, + "recycling-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 105 + }, + "religious-buddhist-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 176, + "y": 220 + }, + "religious-buddhist-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 105 + }, + "religious-christian-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 187, + "y": 220 + }, + "religious-christian-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 105 + }, + "religious-jewish-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 198, + "y": 220 + }, + "religious-jewish-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 105 + }, + "religious-muslim-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 209, + "y": 220 + }, + "religious-muslim-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 105 + }, + "residential-community-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 220, + "y": 220 + }, + "residential-community-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 105 + }, + "restaurant-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 231, + "y": 165 + }, + "restaurant-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 105 + }, + "restaurant-noodle-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 242, + "y": 165 + }, + "restaurant-noodle-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 105 + }, + "restaurant-pizza-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 253, + "y": 165 + }, + "restaurant-pizza-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 120 + }, + "restaurant-seafood-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 264, + "y": 165 + }, + "restaurant-seafood-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 120 + }, + "roadblock-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 275, + "y": 165 + }, + "roadblock-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 120 + }, + "rocket-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 286, + "y": 165 + }, + "rocket-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 120 + }, + "school-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 297, + "y": 165 + }, + "school-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 120 + }, + "scooter-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 308, + "y": 165 + }, + "scooter-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 120 + }, + "shelter-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 319, + "y": 165 + }, + "shelter-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 120 + }, + "shoe-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 330, + "y": 165 + }, + "shoe-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 120 + }, + "shop-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 341, + "y": 165 + }, + "shop-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 120 + }, + "skateboard-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 352, + "y": 165 + }, + "skateboard-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 120 + }, + "skiing-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 363, + "y": 165 + }, + "skiing-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 120 + }, + "slaughterhouse-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 374, + "y": 165 + }, + "slaughterhouse-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 120 + }, + "slipway-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 385, + "y": 165 + }, + "slipway-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 120 + }, + "snowmobile-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 396, + "y": 165 + }, + "snowmobile-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 120 + }, + "soccer-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 407, + "y": 165 + }, + "soccer-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 120 + }, + "square-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 418, + "y": 165 + }, + "square-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 120 + }, + "square-stroked-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 429, + "y": 165 + }, + "square-stroked-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 135 + }, + "stadium-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 440, + "y": 165 + }, + "stadium-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 135 + }, + "star-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 451, + "y": 165 + }, + "star-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 135 + }, + "star-stroked-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 462, + "y": 165 + }, + "star-stroked-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 135 + }, + "suitcase-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 231, + "y": 176 + }, + "suitcase-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 135 + }, + "sushi-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 242, + "y": 176 + }, + "sushi-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 135 + }, + "swimming-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 253, + "y": 176 + }, + "swimming-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 135 + }, + "table-tennis-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 264, + "y": 176 + }, + "table-tennis-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 135 + }, + "teahouse-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 275, + "y": 176 + }, + "teahouse-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 135 + }, + "telephone-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 286, + "y": 176 + }, + "telephone-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 135 + }, + "tennis-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 297, + "y": 176 + }, + "tennis-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 135 + }, + "theatre-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 308, + "y": 176 + }, + "theatre-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 135 + }, + "toilet-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 319, + "y": 176 + }, + "toilet-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 135 + }, + "town-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 330, + "y": 176 + }, + "town-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 135 + }, + "town-hall-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 341, + "y": 176 + }, + "town-hall-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 135 + }, + "triangle-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 352, + "y": 176 + }, + "triangle-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 135 + }, + "triangle-stroked-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 363, + "y": 176 + }, + "triangle-stroked-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 0, + "y": 150 + }, + "veterinary-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 374, + "y": 176 + }, + "veterinary-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 15, + "y": 150 + }, + "viewpoint-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 385, + "y": 176 + }, + "viewpoint-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 30, + "y": 150 + }, + "village-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 396, + "y": 176 + }, + "village-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 45, + "y": 150 + }, + "volcano-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 407, + "y": 176 + }, + "volcano-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 60, + "y": 150 + }, + "volleyball-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 418, + "y": 176 + }, + "volleyball-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 75, + "y": 150 + }, + "warehouse-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 429, + "y": 176 + }, + "warehouse-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 90, + "y": 150 + }, + "waste-basket-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 440, + "y": 176 + }, + "waste-basket-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 105, + "y": 150 + }, + "watch-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 451, + "y": 176 + }, + "watch-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 120, + "y": 150 + }, + "water-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 462, + "y": 176 + }, + "water-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 135, + "y": 150 + }, + "waterfall-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 231, + "y": 187 + }, + "waterfall-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 150, + "y": 150 + }, + "watermill-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 242, + "y": 187 + }, + "watermill-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 165, + "y": 150 + }, + "wetland-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 253, + "y": 187 + }, + "wetland-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 180, + "y": 150 + }, + "wheelchair-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 264, + "y": 187 + }, + "wheelchair-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 195, + "y": 150 + }, + "windmill-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 275, + "y": 187 + }, + "windmill-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 210, + "y": 150 + }, + "zoo-11": { + "sdf": true, + "height": 11, + "pixelRatio": 1, + "width": 11, + "x": 286, + "y": 187 + }, + "zoo-15": { + "sdf": true, + "height": 15, + "pixelRatio": 1, + "width": 15, + "x": 225, + "y": 150 + } +} diff --git a/x-pack/plugins/maps/server/sprites/maki.png b/x-pack/plugins/maps/server/sprites/maki.png new file mode 100644 index 000000000000..9206cf8c0def Binary files /dev/null and b/x-pack/plugins/maps/server/sprites/maki.png differ diff --git a/x-pack/plugins/maps/server/sprites/maki@2x.json b/x-pack/plugins/maps/server/sprites/maki@2x.json new file mode 100644 index 000000000000..2dff0d829281 --- /dev/null +++ b/x-pack/plugins/maps/server/sprites/maki@2x.json @@ -0,0 +1,2820 @@ +{ + "aerialway-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 0, + "y": 330 + }, + "aerialway-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 0 + }, + "airfield-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 22, + "y": 330 + }, + "airfield-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 0 + }, + "airport-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 44, + "y": 330 + }, + "airport-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 30 + }, + "alcohol-shop-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 66, + "y": 330 + }, + "alcohol-shop-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 30 + }, + "american-football-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 88, + "y": 330 + }, + "american-football-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 0 + }, + "amusement-park-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 110, + "y": 330 + }, + "amusement-park-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 0 + }, + "aquarium-11": { + "sdf": true, + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 132, + "y": 330 + }, + "aquarium-15": { + "sdf": true, + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 30 + }, + "art-gallery-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 154, + "y": 330 + }, + "art-gallery-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 30 + }, + "attraction-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 176, + "y": 330 + }, + "attraction-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 60 + }, + "bakery-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 198, + "y": 330 + }, + "bakery-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 60 + }, + "bank-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 220, + "y": 330 + }, + "bank-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 60 + }, + "bar-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 242, + "y": 330 + }, + "bar-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 60 + }, + "barrier-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 264, + "y": 330 + }, + "barrier-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 90 + }, + "baseball-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 286, + "y": 330 + }, + "baseball-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 90 + }, + "basketball-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 308, + "y": 330 + }, + "basketball-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 90 + }, + "bbq-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 330, + "y": 330 + }, + "bbq-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 90 + }, + "beach-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 352, + "y": 330 + }, + "beach-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 0 + }, + "beer-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 374, + "y": 330 + }, + "beer-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 0 + }, + "bicycle-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 396, + "y": 330 + }, + "bicycle-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 0 + }, + "bicycle-share-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 418, + "y": 330 + }, + "bicycle-share-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 0 + }, + "blood-bank-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 440, + "y": 330 + }, + "blood-bank-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 30 + }, + "bowling-alley-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 0, + "y": 352 + }, + "bowling-alley-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 30 + }, + "bridge-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 22, + "y": 352 + }, + "bridge-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 30 + }, + "building-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 44, + "y": 352 + }, + "building-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 30 + }, + "building-alt1-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 66, + "y": 352 + }, + "building-alt1-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 60 + }, + "bus-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 88, + "y": 352 + }, + "bus-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 60 + }, + "cafe-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 110, + "y": 352 + }, + "cafe-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 60 + }, + "campsite-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 132, + "y": 352 + }, + "campsite-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 60 + }, + "car-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 154, + "y": 352 + }, + "car-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 90 + }, + "car-rental-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 176, + "y": 352 + }, + "car-rental-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 90 + }, + "car-repair-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 198, + "y": 352 + }, + "car-repair-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 90 + }, + "casino-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 220, + "y": 352 + }, + "casino-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 90 + }, + "castle-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 242, + "y": 352 + }, + "castle-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 120 + }, + "cemetery-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 264, + "y": 352 + }, + "cemetery-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 120 + }, + "charging-station-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 286, + "y": 352 + }, + "charging-station-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 120 + }, + "cinema-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 308, + "y": 352 + }, + "cinema-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 120 + }, + "circle-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 330, + "y": 352 + }, + "circle-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 120 + }, + "circle-stroked-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 352, + "y": 352 + }, + "circle-stroked-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 120 + }, + "city-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 374, + "y": 352 + }, + "city-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 120 + }, + "clothing-store-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 396, + "y": 352 + }, + "clothing-store-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 120 + }, + "college-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 418, + "y": 352 + }, + "college-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 150 + }, + "commercial-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 440, + "y": 352 + }, + "commercial-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 150 + }, + "communications-tower-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 0, + "y": 374 + }, + "communications-tower-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 150 + }, + "confectionery-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 22, + "y": 374 + }, + "confectionery-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 150 + }, + "convenience-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 44, + "y": 374 + }, + "convenience-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 150 + }, + "cricket-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 66, + "y": 374 + }, + "cricket-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 150 + }, + "cross-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 88, + "y": 374 + }, + "cross-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 150 + }, + "dam-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 110, + "y": 374 + }, + "dam-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 150 + }, + "danger-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 132, + "y": 374 + }, + "danger-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 180 + }, + "defibrillator-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 154, + "y": 374 + }, + "defibrillator-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 180 + }, + "dentist-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 176, + "y": 374 + }, + "dentist-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 180 + }, + "doctor-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 198, + "y": 374 + }, + "doctor-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 180 + }, + "dog-park-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 220, + "y": 374 + }, + "dog-park-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 180 + }, + "drinking-water-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 242, + "y": 374 + }, + "drinking-water-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 180 + }, + "embassy-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 264, + "y": 374 + }, + "embassy-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 180 + }, + "emergency-phone-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 286, + "y": 374 + }, + "emergency-phone-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 180 + }, + "entrance-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 308, + "y": 374 + }, + "entrance-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 210 + }, + "entrance-alt1-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 330, + "y": 374 + }, + "entrance-alt1-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 210 + }, + "farm-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 352, + "y": 374 + }, + "farm-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 210 + }, + "fast-food-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 374, + "y": 374 + }, + "fast-food-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 210 + }, + "fence-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 396, + "y": 374 + }, + "fence-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 210 + }, + "ferry-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 418, + "y": 374 + }, + "ferry-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 210 + }, + "fire-station-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 440, + "y": 374 + }, + "fire-station-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 210 + }, + "fitness-centre-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 0, + "y": 396 + }, + "fitness-centre-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 210 + }, + "florist-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 22, + "y": 396 + }, + "florist-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 0 + }, + "fuel-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 44, + "y": 396 + }, + "fuel-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 0 + }, + "furniture-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 66, + "y": 396 + }, + "furniture-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 0 + }, + "gaming-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 88, + "y": 396 + }, + "gaming-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 0 + }, + "garden-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 110, + "y": 396 + }, + "garden-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 0 + }, + "garden-centre-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 132, + "y": 396 + }, + "garden-centre-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 0 + }, + "gift-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 154, + "y": 396 + }, + "gift-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 0 + }, + "globe-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 176, + "y": 396 + }, + "globe-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 0 + }, + "golf-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 198, + "y": 396 + }, + "golf-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 30 + }, + "grocery-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 220, + "y": 396 + }, + "grocery-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 30 + }, + "hairdresser-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 242, + "y": 396 + }, + "hairdresser-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 30 + }, + "harbor-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 264, + "y": 396 + }, + "harbor-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 30 + }, + "hardware-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 286, + "y": 396 + }, + "hardware-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 30 + }, + "heart-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 308, + "y": 396 + }, + "heart-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 30 + }, + "heliport-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 330, + "y": 396 + }, + "heliport-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 30 + }, + "home-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 352, + "y": 396 + }, + "home-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 30 + }, + "horse-riding-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 374, + "y": 396 + }, + "horse-riding-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 60 + }, + "hospital-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 396, + "y": 396 + }, + "hospital-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 60 + }, + "ice-cream-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 418, + "y": 396 + }, + "ice-cream-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 60 + }, + "industry-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 440, + "y": 396 + }, + "industry-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 60 + }, + "information-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 0, + "y": 418 + }, + "information-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 60 + }, + "jewelry-store-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 22, + "y": 418 + }, + "jewelry-store-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 60 + }, + "karaoke-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 44, + "y": 418 + }, + "karaoke-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 60 + }, + "landmark-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 66, + "y": 418 + }, + "landmark-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 60 + }, + "landuse-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 88, + "y": 418 + }, + "landuse-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 90 + }, + "laundry-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 110, + "y": 418 + }, + "laundry-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 90 + }, + "library-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 132, + "y": 418 + }, + "library-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 90 + }, + "lighthouse-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 154, + "y": 418 + }, + "lighthouse-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 90 + }, + "lodging-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 176, + "y": 418 + }, + "lodging-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 90 + }, + "logging-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 198, + "y": 418 + }, + "logging-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 90 + }, + "marker-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 220, + "y": 418 + }, + "marker-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 90 + }, + "marker-stroked-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 242, + "y": 418 + }, + "marker-stroked-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 90 + }, + "mobile-phone-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 264, + "y": 418 + }, + "mobile-phone-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 120 + }, + "monument-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 286, + "y": 418 + }, + "monument-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 120 + }, + "mountain-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 308, + "y": 418 + }, + "mountain-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 120 + }, + "museum-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 330, + "y": 418 + }, + "museum-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 120 + }, + "music-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 352, + "y": 418 + }, + "music-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 120 + }, + "natural-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 374, + "y": 418 + }, + "natural-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 120 + }, + "optician-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 396, + "y": 418 + }, + "optician-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 120 + }, + "paint-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 418, + "y": 418 + }, + "paint-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 120 + }, + "park-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 440, + "y": 418 + }, + "park-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 150 + }, + "park-alt1-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 0, + "y": 440 + }, + "park-alt1-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 150 + }, + "parking-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 22, + "y": 440 + }, + "parking-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 150 + }, + "parking-garage-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 44, + "y": 440 + }, + "parking-garage-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 150 + }, + "pharmacy-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 66, + "y": 440 + }, + "pharmacy-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 150 + }, + "picnic-site-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 88, + "y": 440 + }, + "picnic-site-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 150 + }, + "pitch-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 110, + "y": 440 + }, + "pitch-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 150 + }, + "place-of-worship-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 132, + "y": 440 + }, + "place-of-worship-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 150 + }, + "playground-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 154, + "y": 440 + }, + "playground-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 180 + }, + "police-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 176, + "y": 440 + }, + "police-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 180 + }, + "post-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 198, + "y": 440 + }, + "post-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 180 + }, + "prison-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 220, + "y": 440 + }, + "prison-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 180 + }, + "rail-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 242, + "y": 440 + }, + "rail-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 180 + }, + "rail-light-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 264, + "y": 440 + }, + "rail-light-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 180 + }, + "rail-metro-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 286, + "y": 440 + }, + "rail-metro-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 180 + }, + "ranger-station-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 308, + "y": 440 + }, + "ranger-station-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 180 + }, + "recycling-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 330, + "y": 440 + }, + "recycling-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 210 + }, + "religious-buddhist-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 352, + "y": 440 + }, + "religious-buddhist-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 210 + }, + "religious-christian-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 374, + "y": 440 + }, + "religious-christian-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 210 + }, + "religious-jewish-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 396, + "y": 440 + }, + "religious-jewish-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 210 + }, + "religious-muslim-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 418, + "y": 440 + }, + "religious-muslim-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 210 + }, + "residential-community-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 440, + "y": 440 + }, + "residential-community-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 210 + }, + "restaurant-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 462, + "y": 330 + }, + "restaurant-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 210 + }, + "restaurant-noodle-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 484, + "y": 330 + }, + "restaurant-noodle-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 210 + }, + "restaurant-pizza-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 506, + "y": 330 + }, + "restaurant-pizza-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 240 + }, + "restaurant-seafood-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 528, + "y": 330 + }, + "restaurant-seafood-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 240 + }, + "roadblock-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 550, + "y": 330 + }, + "roadblock-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 240 + }, + "rocket-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 572, + "y": 330 + }, + "rocket-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 240 + }, + "school-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 594, + "y": 330 + }, + "school-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 240 + }, + "scooter-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 616, + "y": 330 + }, + "scooter-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 240 + }, + "shelter-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 638, + "y": 330 + }, + "shelter-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 240 + }, + "shoe-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 660, + "y": 330 + }, + "shoe-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 240 + }, + "shop-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 682, + "y": 330 + }, + "shop-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 240 + }, + "skateboard-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 704, + "y": 330 + }, + "skateboard-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 240 + }, + "skiing-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 726, + "y": 330 + }, + "skiing-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 240 + }, + "slaughterhouse-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 748, + "y": 330 + }, + "slaughterhouse-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 240 + }, + "slipway-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 770, + "y": 330 + }, + "slipway-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 240 + }, + "snowmobile-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 792, + "y": 330 + }, + "snowmobile-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 240 + }, + "soccer-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 814, + "y": 330 + }, + "soccer-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 240 + }, + "square-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 836, + "y": 330 + }, + "square-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 240 + }, + "square-stroked-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 858, + "y": 330 + }, + "square-stroked-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 270 + }, + "stadium-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 880, + "y": 330 + }, + "stadium-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 270 + }, + "star-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 902, + "y": 330 + }, + "star-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 270 + }, + "star-stroked-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 924, + "y": 330 + }, + "star-stroked-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 270 + }, + "suitcase-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 462, + "y": 352 + }, + "suitcase-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 270 + }, + "sushi-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 484, + "y": 352 + }, + "sushi-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 270 + }, + "swimming-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 506, + "y": 352 + }, + "swimming-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 270 + }, + "table-tennis-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 528, + "y": 352 + }, + "table-tennis-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 270 + }, + "teahouse-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 550, + "y": 352 + }, + "teahouse-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 270 + }, + "telephone-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 572, + "y": 352 + }, + "telephone-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 270 + }, + "tennis-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 594, + "y": 352 + }, + "tennis-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 270 + }, + "theatre-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 616, + "y": 352 + }, + "theatre-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 270 + }, + "toilet-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 638, + "y": 352 + }, + "toilet-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 270 + }, + "town-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 660, + "y": 352 + }, + "town-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 270 + }, + "town-hall-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 682, + "y": 352 + }, + "town-hall-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 270 + }, + "triangle-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 704, + "y": 352 + }, + "triangle-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 270 + }, + "triangle-stroked-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 726, + "y": 352 + }, + "triangle-stroked-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 0, + "y": 300 + }, + "veterinary-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 748, + "y": 352 + }, + "veterinary-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 30, + "y": 300 + }, + "viewpoint-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 770, + "y": 352 + }, + "viewpoint-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 60, + "y": 300 + }, + "village-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 792, + "y": 352 + }, + "village-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 90, + "y": 300 + }, + "volcano-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 814, + "y": 352 + }, + "volcano-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 120, + "y": 300 + }, + "volleyball-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 836, + "y": 352 + }, + "volleyball-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 150, + "y": 300 + }, + "warehouse-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 858, + "y": 352 + }, + "warehouse-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 180, + "y": 300 + }, + "waste-basket-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 880, + "y": 352 + }, + "waste-basket-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 210, + "y": 300 + }, + "watch-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 902, + "y": 352 + }, + "watch-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 240, + "y": 300 + }, + "water-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 924, + "y": 352 + }, + "water-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 270, + "y": 300 + }, + "waterfall-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 462, + "y": 374 + }, + "waterfall-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 300, + "y": 300 + }, + "watermill-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 484, + "y": 374 + }, + "watermill-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 330, + "y": 300 + }, + "wetland-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 506, + "y": 374 + }, + "wetland-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 360, + "y": 300 + }, + "wheelchair-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 528, + "y": 374 + }, + "wheelchair-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 390, + "y": 300 + }, + "windmill-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 550, + "y": 374 + }, + "windmill-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 420, + "y": 300 + }, + "zoo-11": { + "sdf": true, + "height": 22, + "pixelRatio": 2, + "width": 22, + "x": 572, + "y": 374 + }, + "zoo-15": { + "sdf": true, + "height": 30, + "pixelRatio": 2, + "width": 30, + "x": 450, + "y": 300 + } +} diff --git a/x-pack/plugins/maps/server/sprites/maki@2x.png b/x-pack/plugins/maps/server/sprites/maki@2x.png new file mode 100644 index 000000000000..e9244ba20e19 Binary files /dev/null and b/x-pack/plugins/maps/server/sprites/maki@2x.png differ diff --git a/x-pack/test/functional/page_objects/gis_page.js b/x-pack/test/functional/page_objects/gis_page.js index ca44027e6b97..94d7c4b085e7 100644 --- a/x-pack/test/functional/page_objects/gis_page.js +++ b/x-pack/test/functional/page_objects/gis_page.js @@ -213,9 +213,35 @@ export function GisPageProvider({ getService, getPageObjects }) { await testSubjects.click('addLayerButton'); } + async openSetViewPopover() { + const isOpen = await testSubjects.exists('mapSetViewForm'); + if (!isOpen) { + await retry.try(async () => { + await testSubjects.click('toggleSetViewVisibilityButton'); + const isOpenAfterClick = await testSubjects.exists('mapSetViewForm'); + if (!isOpenAfterClick) { + throw new Error('set view popover not opened'); + } + }); + } + } + + async closeSetViewPopover() { + const isOpen = await testSubjects.exists('mapSetViewForm'); + if (isOpen) { + await retry.try(async () => { + await testSubjects.click('toggleSetViewVisibilityButton'); + const isOpenAfterClick = await testSubjects.exists('mapSetViewForm'); + if (isOpenAfterClick) { + throw new Error('set view popover not closed'); + } + }); + } + } + async setView(lat, lon, zoom) { log.debug(`Set view lat: ${lat.toString()}, lon: ${lon.toString()}, zoom: ${zoom.toString()}`); - await testSubjects.click('toggleSetViewVisibilityButton'); + await this.openSetViewPopover(); await testSubjects.setValue('latitudeInput', lat.toString()); await testSubjects.setValue('longitudeInput', lon.toString()); await testSubjects.setValue('zoomInput', zoom.toString()); @@ -225,11 +251,11 @@ export function GisPageProvider({ getService, getPageObjects }) { async getView() { log.debug('Get view'); - await testSubjects.click('toggleSetViewVisibilityButton'); + await this.openSetViewPopover(); const lat = await testSubjects.getAttribute('latitudeInput', 'value'); const lon = await testSubjects.getAttribute('longitudeInput', 'value'); const zoom = await testSubjects.getAttribute('zoomInput', 'value'); - await testSubjects.click('toggleSetViewVisibilityButton'); + await this.closeSetViewPopover(); return { lat: parseFloat(lat), lon: parseFloat(lon),