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

Loading individual component? #133

Open SkaterDad opened 7 years ago

SkaterDad commented 7 years ago

I really like what you've done with this! It was super easy to get started with no prior google maps experience.

Is there a way to just load & use an individual component, rather than globally install the plugin via Vue.use()?

Specifically, I would just like to import the Autocomplete component on a route, so that Webpack can code-split it.

admcfajn commented 7 years ago

I'm also looking for something like this, so I can control if the google-maps api is called at all.

admcfajn commented 7 years ago

We might be able to tie in to this import {load, Map, Marker} from 'vue-google-maps' from the parent-branch. Will keep you posted.

lobosan commented 7 years ago

Hi, I'm having the error "You have included the Google Maps API multiple times on this page." and I think is because I'm loading the plugin globally. And I just need to import it inside one component.

Any updates about this request?

xkjyeah commented 7 years ago

You should call Vue.load only once

On 19 Jul 2017 5:58 am, "Santiago Galindo" notifications@github.com wrote:

Hi, I'm having the error "You have included the Google Maps API multiple times on this page." and I think is because I'm loading the plugin globally. And I just need to import it inside one component.

Any updates about this request?

— 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/133#issuecomment-316210442, or mute the thread https://github.com/notifications/unsubscribe-auth/ACiTR3EIJadBrlreg_GDhbK_tR-jnzrMks5sPSqBgaJpZM4N31JR .

xkjyeah commented 7 years ago

Sorry, Vue.use

On 19 Jul 2017 7:58 am, "Daniel Sim" daniel_sim@data.gov.sg wrote:

You should call Vue.load only once

On 19 Jul 2017 5:58 am, "Santiago Galindo" notifications@github.com wrote:

Hi, I'm having the error "You have included the Google Maps API multiple times on this page." and I think is because I'm loading the plugin globally. And I just need to import it inside one component.

Any updates about this request?

— 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/133#issuecomment-316210442, or mute the thread https://github.com/notifications/unsubscribe-auth/ACiTR3EIJadBrlreg_GDhbK_tR-jnzrMks5sPSqBgaJpZM4N31JR .