NathanAP / vue-google-maps-community-fork

The community fork for Vue Google Maps library
https://vue-google-maps-community-fork.netlify.app
MIT License
108 stars 33 forks source link

Filters markers slow #89

Open lecappa opened 10 months ago

lecappa commented 10 months ago

Hello ! I need to filters marker into GMapCluster but it's very very slow (1400 markers).

const moviesFilter = computed(() => { return movies.value.filter((movie) => { return platforms.value.includes(movie.type) }).filter((movie) => { if (departments_selected.value.length > 0) { return departments_selected.value.filter((department) => { return movie.departments.indexOf(department) !== -1; }).length > 0; } return true; }) })

Maybe with setVisible ?

Thx for you help

PS : Sorry for my english ;-)

IBakeCookies commented 4 months ago

I noticed that the cluster makes many pins x10 slower. I know this is not a solution but try to remove the whole cluster thingy and use pins only. If you need a cluster, I suggest rewriting the map with the native google map API, because the slowness comes from the overhead of Vue.