0

I am trying to fix a bug from QA team. When Android starts the intent to search for a specific address it zooms in too far(~200ft) Would like it set the distance further away around 1000ft Its like maps is ignoring the z param completely if I give it a query.

I have tried every way I can think of, even went thru google docs and tried this:

 Uri gmmIntentUri = Uri.parse("geo:37.7749,-122.4194?z=10&q=restaurants");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);

But it still ignored the zoom level with address in there.

Here is my code now:

String geo = "geo:" +(mCampground.latitude + "," + mCampground.longitude);
String maplLabel =(mCampground.title);
String query  =Uri.encode(mCampground.address1 + "(" + maplLabel+")");
String uriString = geo + "?q=" + query + "&z=10";
Uri uri = Uri.parse(uriString);

Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setPackage("com.google.android.apps.maps");
startExternalActivity(intent);
Cœur
  • 37,241
  • 25
  • 195
  • 267

0 Answers0