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

get coordinates from address #509

Closed MR-Shegby closed 5 years ago

MR-Shegby commented 6 years ago

How to get coordinates to set a marker if I got addresses like "louvre, paris, france" ? Is there a special method?

micardona96 commented 5 years ago

Hello, Have you used the component? with an @place_changed props, this event returns an object with the location data, I'm sorry my English is not very good I hope it helps you

mydnic commented 5 years ago

Did you find a way to do this ?

marncz commented 5 years ago

@MRShegby

<gmap-autocomplete
    @place_changed="getPlace"
</gmap-autocomplete>

Then this function:

methods: {

...
getPlace(place) {
  console.log(place);
}
...

}
MR-Shegby commented 5 years ago

Thanks to all. For now I'm a bit out of this. But I think I'll return soon to google maps and check solutions. Thanks again