Showing Blue Dot
import { MPPoint, MPPositionProviderInterface, MPPositionResultInterface, OnPositionUpdateListener } from "@mapsindoors/react-native-maps-indoors-mapbox";
import { MyPositionResult } from "./MyPositionResult";
export class MyPositionProvider implements MPPositionProviderInterface {
positionUpdateListeners: OnPositionUpdateListener[] = new Array()
latestPosition?: MyPositionResult;
addOnPositionUpdateListener(listener: OnPositionUpdateListener) {
this.positionUpdateListeners.push(listener);
}
removeOnPositionUpdateListener(listener: OnPositionUpdateListener) {
this.positionUpdateListeners.filter(item => item != listener);
}
getLatestPosition(): MPPositionResultInterface | undefined {
return this.latestPosition;
}
get name(): string {
return "MyPositionProvider";
}
}Last updated
Was this helpful?