开发者

Adding google maps markers by an address instead of coordinates?

开发者 https://www.devze.com 2023-02-24 08:42 出处:网络
In my Flex project, can I add markers by its address instead of this: var myGeograph开发者_如何学编程icCoordinates:LatLng = new LatLng(myLatitude, myLongitude);

In my Flex project, can I add markers by its address instead of this:

var myGeograph开发者_如何学编程icCoordinates:LatLng = new LatLng(myLatitude, myLongitude);

for example add marker by "Paris, France"


I don't think you can do so directly. Instead you need to geocode the address and then use a LatLng to store the result.

Check out google's geocoding api here:

http://code.google.com/apis/maps/documentation/geocoding/


You should read Google's developer manual on Geocoding. It explains how to convert an address to a geolocation. I recommend you try looking at the Dev manual/API/Google before posting here.

0

精彩评论

暂无评论...
验证码 换一张
取 消