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(); } }
http://maps.google.com/maps?saddr=60.344,64.34&daddr=my+location- JuriySPb ♦