Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
786
Widok
0
23/06/2022 11: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
1 Answer
0
23/06/2022 11: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";