google-mapsgoogle-maps-markersgoogle-indoor-maps

Google Maps: navigating between Marker and Indoor Marker


Is it possible to create a route between a Google Maps Marker and a POI of a Indoor Map using the Google Maps API? For "classic" Markers you can use the Directions API, but it seems to be limited to "classic" Markers only.

In the example below I've created a route between an address and a POI inside the Madison Square Garden with Google Maps, but how to realize it through the API?

Screenshot: https://i.sstatic.net/kFFOf.png

Source: https://www.google.com/maps/dir/40.7510242,-73.9931116/40.751578,-73.9939041/@40.7512401,-73.9939461,19.55z/data=!4m2!4m1!3e2


Solution

  • I think you can use the turn-by-turn navigation under Google Maps API. It gives turn-by-turn directions to the address or coordinate specified. Directions are always given from the users current location.

    google.navigation:q=a+street+address
    
    google.navigation:q=latitude,longitude
    

    This is the parameters that you can use.

    The below intent will give you an example of turn-by-turn navigation.

    Uri gmmIntentUri = Uri.parse("google.navigation:q=Taronga+Zoo,+Sydney+Australia");
    Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
    mapIntent.setPackage("com.google.android.apps.maps");
    startActivity(mapIntent);
    

    I hope it can help you in your problem.