0👍
✅
vue reuses components – use
vue reuses components – use key
to force mounting
Change
<LiefermaxMap style="width: 100%; height: 50%;" :waypoints="waypoints" :driver="driverLocation" :stopOver="showCalculatedTour"></LiefermaxMap>
to
<LiefermaxMap style="width: 100%; height: 50%;" :key="waypoints" :waypoints="waypoints" :driver="driverLocation" :stopOver="showCalculatedTour"></LiefermaxMap>
use key
to tell vue not to reuse the component – so mounted can be triggered,
or move your initMap
method.
Source:stackexchange.com