Notifications
Clear all
BugOverflow
1 Posty
1 Users
0 Likes
85 Widok
0
23/06/2022 10:38 pm
Topic starter - setMap(null) not removing any makers or lines using vue
- setMap(null) on polyline does not remove it from map until zoom change
This topic was modified 2 miesiące temu by mrmucha
1 Answer
0
23/06/2022 10:41 pm
Topic starter 1. do not define any markers or polylines inside data { }
2. define variables inside setup { } and remove reactivity (do not use ref(var)). Example below.
setup() { let marker = null; let gmap = null; let currentPolygon = null; return { marker, gmap, currentPolygon } },
problem with reactivity has been confirmed with
import {Loader} from "@googlemaps/js-api-loader";