xkjyeah / vue-google-maps

Google maps component for vue with 2-way data binding
https://xkjyeah.github.io/vue-google-maps/
1.88k stars 475 forks source link

Cannot read property 'removeMarker' of null #394

Open Sukmaarifin opened 6 years ago

Sukmaarifin commented 6 years ago

Hello ! I got an error when moving page.

Error Message : Cannot read property 'removeMarker' of null

Code :

<gmap-map :center="center" ref="mapRef" :zoom="zoom" :map-type-id.sync="mapType"
            style="width: 100%; height: 500px">
              <gmap-cluster :grid-size="gridSize" :styles="clusterStyles">
                  <gmap-marker v-for="(m, index) in markers" 
                  :position="m.position"
                  :clickable="true" :draggable="true"
                  @click="center=m.position"
                  :key="index"
                  ></gmap-marker>
              </gmap-cluster>
            </gmap-map>

How can I fix it? Thanks.

xkjyeah commented 6 years ago

I'll need more information about your setup. Are you using Nuxt or vanilla Vue?

On Tue, 24 Apr 2018, 12:45 Sukmaarifin, notifications@github.com wrote:

Hello ! I got an error when moving page.

Error Message : Cannot read property 'removeMarker' of null

Code :

<gmap-marker v-for="(m, index) in markers" :position="m.position" :clickable="true" :draggable="true" @click https://github.com/click="center=m.position" :key="index"

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xkjyeah/vue-google-maps/issues/394, or mute the thread https://github.com/notifications/unsubscribe-auth/ACiTR6-ftagkysnT3mLy6A2L8KmxNdepks5trq3XgaJpZM4Tg_tX .

Sukmaarifin commented 6 years ago

@xkjyeah im using nuxt

xkjyeah commented 6 years ago

hmmmm.... ok i looked into it. should be working in v0.9.6!