Skip to main content

PinpointManager

wemap-sdk-js


Class: PinpointManager

Public façade for pinpoint retrieval/search operations bound to a livemap.

Internally uses the shared pinpoint store so map preload, click resolution, and integrator searches all benefit from the same data.

Do not instantiate this directly — retrieve a configured instance with core.createPinpointManager().

Constructors​

Constructor​

new PinpointManager(baseUrl, emmid): PinpointManager

Parameters​

baseUrl​

string

emmid​

string | number

Returns​

PinpointManager

Methods​

getAll()​

getAll(): Promise<Pinpoint[]>

Fetch all pinpoints of the current livemap from API (paginated, no bounds).

Returns​

Promise<Pinpoint[]>


getById()​

getById(id): Promise<Pinpoint | null>

Parameters​

id​

number

Returns​

Promise<Pinpoint | null>

Implementation of​

PinpointResolver.getById


getCachedBbox()​

getCachedBbox(): BoundingBox | null

Cached preload bbox, or null when no preload happened yet.

Returns​

BoundingBox | null


getLoadedPinpoints()​

getLoadedPinpoints(): Pinpoint[]

Already loaded pinpoints (search + preload + click fallback).

Returns​

Pinpoint[]

Implementation of​

PinpointResolver.getLoadedPinpoints


preloadViewport()​

preloadViewport(bbox, level?): Promise<void>

Parameters​

bbox​

BoundingBox

level?​

number | null

Returns​

Promise<void>

Implementation of​

PinpointResolver.preloadViewport


release()​

release(): void

Release the shared cache when this manager is no longer needed.

Returns​

void


search(query): Promise<PinpointSearchResponse>

Parameters​

query​

PinpointSearchQuery

Returns​

Promise<PinpointSearchResponse>