Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
84
rated 0 times [  88] [ 4]  / answers: 1 / hits: 6453  / 10 Years ago, fri, july 25, 2014, 12:00:00

I am trying to get my feet on solid ground so if this is really easy forgive me for being a n00b.



I want to use angular-google-maps and I have the address at the client (don't have lat and lon stored currently) and would like to display a map of the address. It looks very simple when I have the lat and lon:



angular.module('myApplicationModule', ['google-maps']);

$scope.map = {
center: {
latitude: 45,
longitude: -73
},
zoom: 8
};

//html
<google-map center=map.center zoom=map.zoom></google-map>


so i am just missing the step of converting the address to lat and lon, thanks for your suggestions.


More From » angularjs

 Answers
7

To convert from a plain address (I assume this isn't a Google Maps location object you're dealing with here, but just a plain string address) to a latitude/longitude, you'll need to use the Google geocoding library. This will return an object with a geometry property - this will contain your latitude and longitude.


[#43588] Thursday, July 24, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wilson

Total Points: 27
Total Questions: 93
Total Answers: 93

Location: Tajikistan
Member since Sun, Aug 29, 2021
3 Years ago
wilson questions
Tue, Aug 9, 22, 00:00, 2 Years ago
Wed, May 11, 22, 00:00, 2 Years ago
Wed, May 20, 20, 00:00, 4 Years ago
Wed, May 13, 20, 00:00, 4 Years ago
;