GuillaumeLeclerc / vue-google-maps

Google maps component for vue with 2-way data binding
560 stars 653 forks source link

Render Multiple Maps on the Same Page #103

Open randyrankin opened 7 years ago

randyrankin commented 7 years ago

I am trying to render multiple maps on the same page. I can render the maps, with a unique marker based on the location on each map, but the controls are not independent and I receive the this error in the console: Unhandled promise rejection TypeError: Cannot read property 'getElementsByClassName' of null. Is doing this possible? Would I need to place an id on each map instance (I've actually tried this with no success). Any thoughts or assistance is appreciated.

GuillaumeLeclerc commented 7 years ago

It should be possible, I never tested it though. Do you have a jsfiddle with the error ?

randyrankin commented 7 years ago

Here is a fiddle: https://jsfiddle.net/rrrankin/bq9ozmt8

BUT, no errors and everything works as expected. I will go back and review my project and try to determine what is happening.