How to open Google Maps using address?

前端 未结 7 1185
野趣味
野趣味 2021-02-07 06:57

How can I open Google Maps(using Intents or adding Google Maps into my application) with address? I have the address, but I don\'t have latitude/longitude. How can I do it? Than

7条回答
  •  忘掉有多难
    2021-02-07 07:00

    Change the bold part of this URL to your company address. It's best if you replace all spaces with a plus (+) character, but should work with spaces too: http://maps.google.com/maps/geo?q=620+8th+Avenue,+New+York,+NY+10018,+USA&output=csv&oe=utf8&sensor=false

    Raise a request to above URL. For more information refer http://androidadvice.blogspot.in/2010/09/asynchronous-web-request.html

    This will generate a code that looks something like this:

    200,8,40.7562008,-73.9903784
    

    The first number, 200, says that the address is good. The second number, 8, indicates how accurate the address is. The last two numbers, 40.7562008 and -73.9903784, are the latitude and longitude of this address. Use these to get your google map working.

    Note : The above steps have been copied from http://webdesign.about.com/od/javascript/ss/add-google-maps-to-a-web-page_2.htm

提交回复
热议问题