5

I want to edit a custom Google map (because I need to add sidewalks for walking) with all of its original functionality for a college campus and also create the interior of building containing classrooms with multiple floor detection so I can implement it into a mobile app. Can this be done? And with Javascript? I am thinking that based on where they arrive on campus using GPS along with this customized Google map overlay, they can give the building and classroom and it will use the Google Maps API pre-built "find shortest route" method somewhere along there. First I need to build this with Android, then possibly for Iphone.

josh3736
  • 139,160
  • 33
  • 216
  • 263
Chase Rose
  • 51
  • 1
  • 2

1 Answers1

8

The native Google Maps application already has all of the functionality you describe.

Now anyone can use their built-in Maps app to get walking directions between campus buildings. (Example - notice that the route takes you through campus walkways, not along the surrounding roads.)

To see indoor maps in action, use the Maps app on your Android to zoom in on an Ikea or take a look at this video.

If you have an app you'd like to launch the Maps app from, do this:

Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?saddr=START_LOCATION&daddr=DESTINATION_LOCATION&dirflg=w"));
if (isAppInstalled("com.google.android.apps.maps")) {
    intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
}
startActivity(intent);


// helper function to check if Maps is installed
private boolean isAppInstalled(String uri) {
    PackageManager pm = getApplicationContext().getPackageManager();
    boolean app_installed = false;
    try {
        pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
        app_installed = true;
    } catch (PackageManager.NameNotFoundException e) {
        app_installed = false;
    }
    return app_installed;
}

(Code shamelessly stolen from here.)

Community
  • 1
  • 1
josh3736
  • 139,160
  • 33
  • 216
  • 263