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

Polygon Styling #87

Open joshharington opened 7 years ago

joshharington commented 7 years ago

Is there a way to change the colour of the polygon and add a label?

xkjyeah commented 7 years ago

If nothing happens when you change the options, try changing the key. e.g.

<gmap-polygon v-for="item in items" :key="item.id" :options="item.options" />
{
    data() {
        return { items: [{ id: 1, options: {...} }] }
    },

    methods: {
        something() {
             this.items[0].id++
             this.items[1].options = newOptions
        }
    }
}