UNPKG

@polar/plugin-pins

Version:

Pins plugin for POLAR that adds map interactions to client that allow users to indicate a specific point on the map.

12 lines (10 loc) 273 B
import { Style, Icon } from 'ol/style' import { getPinSvg } from './getPinSvg' export const getPinStyle = (style) => new Style({ image: new Icon({ src: `data:image/svg+xml;base64,${btoa(getPinSvg(style))}`, scale: 2, anchor: [0.5, 1], }), })