OptionalcursorOnMap?: CSSCursorOptional configuration to show custom cursor on the map canvas when not interacting with any handled features.
OptionalcursorOnMouseDown?: CSSCursorOptional configuration to show custom cursor when clicking (mouse down).
OptionallongHoverDelayAfterMapMoveMS?: numberDelay to trigger a long-hover event when map has just moved (milliseconds).
OptionallongHoverDelayOnStillMapMS?: numberDelay to trigger a long-hover event when the map was still since the last long hover (milliseconds).
OptionalpaddingBoxPx?: numberOptional padding box to be inserted around the event point, in pixels.
OptionalprecisionMode?: "box" | "point" | "point-then-box"Defines the event coordinates precision mode.
Modes:
box: Features are queried within a padding box around the event point (default)point: Features are queried at the exact event point (most precise)point-then-box: Try point first, then fall back to box if nothing foundUse Cases:
box: Best for general use, easier to click small featurespoint: Precise picking for dense overlapping featurespoint-then-box: Balance between precision and usabilityThese settings affect all interactive map modules (places, POIs, routes, etc.). Fine-tuning these values can improve user experience based on your use case.
// Default configuration for desktop
const config: MapEventsConfig = {
precisionMode: 'box',
paddingBoxPx: 5,
cursorOnHover: 'pointer',
longHoverDelayOnStillMapMS: 300
};
// Mobile-optimized with larger hit area
const mobileConfig: MapEventsConfig = {
precisionMode: 'box',
paddingBoxPx: 15, // Larger touch targets
longHoverDelayAfterMapMoveMS: 1000
};
// Precise picking for dense data
const preciseConfig: MapEventsConfig = {
precisionMode: 'point', // Exact pixel matching
cursorOnHover: 'crosshair'
};
Configuration options for map user event handling.
Controls how user interactions (clicks, hovers) are detected and processed, including precision modes, cursor styles, and timing behaviors.