Hello,

There is a task, to open from my application, the google maps application with the display of the direction point and my location.

And actually the question is how to open so that google maps opens with a zoom so that it can be seen as my location and destination point?

As I do now and it does not work:

private void startMaps(String fields) { try { Geocoder geocoder = new Geocoder(getApplicationContext()); List<Address> address = geocoder.getFromLocationName(fields, 1); Address a = address.get(0); String uri = String.format(Locale.ENGLISH,"geo:%f , %f?q=%s", a.getLatitude(), a.getLongitude(), "my+location"); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); startActivity(intent); } catch (IOException e) { e.printStackTrace(); } } 
  • Try this: http://maps.google.com/maps?saddr=60.344,64.34&daddr=my+location - JuriySPb
  • @ YuriySPb unfortunately did not succumb. I decided that it would be easier to embed a card module in an application - Eugene Suetin

1 answer 1

I realized that this is basically not possible to do without delays, I made the built-in Fragment cards and in it I already determine the location and make the camera zoom by two points with padding.