· 5 years ago · Jun 05, 2020, 05:50 PM
1<script>
2
3// latitude and longitude value goes here
4
5var lat = 'number';
6
7var lng = 'number';
8
9// api call using axios library
10
11this.axios.get("https://maps.googleapis.com/maps/api/geocode/json?latlng=" + lat + "," + lng + "&key='api key here")
12
13.then((response) => {
14
15console.log(response)
16
17// Ideally you'd search for the index with type = sublocality in address_components