O'Reilly logo

Learning Android Google Maps by Raj Amal W.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Searching for a location

In the previous section, we displayed a location on the map using its coordinates. Now, let's discuss how to search for and display a location using a string query. It can be done in the following ways:

  • geo:latitude,longitude?q=my+street+address
  • geo:0,0?q=my+street+address
  • geo:0,0?q=latitude,longitude(label)

For zoom, we use the z parameter. Here, we used q as the parameter. In the second and third way, we used 0,0 as the latitude and longitude and passed the query. The map takes the coordinates 0,0 as the base and begins its search. There may be situations where the same address may exist in many places all over the world. To prevent this confusion, we use the latitude and longitude as a specified value instead of 0,0. So, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required