/** * DrawRegularPolygonFromClick Interaction. * * @typedef {Object} DrawRegularPolygonFromClickOptions * @property {number} [angle=0] Angle in radians. A value of 0 will have one of the shape's point facing up * @property {number} radius Radius size in map units. * @property {number} [sides=3] The number of sides for the regular polygon. */ /** * This interactions allows drawing regular polygons of a pre-determined number * of sides and size a a clicked location on the map. * * @hidden */ export default class _default extends olInteractionInteraction { /** * @fires DrawEvent * @param {DrawRegularPolygonFromClickOptions} options Options */ constructor(options: DrawRegularPolygonFromClickOptions); /** * @type {number} * @private */ private angle_; /** * @type {number} * @private */ private radius_; /** * @type {number} * @private */ private sides_; /** * @type {import('ol/events').EventsKey[]} * @private */ private listenerKeys_; /** * Enable the interaction. Called when added to a map AND active. * * @private */ private enable_; /** * Disable the interaction. Called when removed from a map or deactivated. * * @private */ private disable_; /** * Called the the map is clicked. Create a regular polygon at the clicked * location using the configuration * * @param {Event|import('ol/events/Event').default} evt Map browser event. * @private */ private handleMapClick_; } /** * DrawRegularPolygonFromClick Interaction. */ export type DrawRegularPolygonFromClickOptions = { /** * Angle in radians. A value of 0 will have one of the shape's point facing up */ angle?: number; /** * Radius size in map units. */ radius: number; /** * The number of sides for the regular polygon. */ sides?: number; }; import olInteractionInteraction from 'ol/interaction/Interaction';