let id;
const getContinuousPosition = () => {
id = navigator.geolocation.watchPosition((position) => {
const { latitude, longitude } = position.coords;
continousCoordinates.value = [
longitude,
latitude
]
}, error, options);
};
...
onUnmounted(() => {
if(id){
navigator.geolocation.clearWatch(id);
}
})
export default { someConstant: 1, data: {...} }
set (localPage) {
this.page = localPage
}