admin管理员组

文章数量:1396739

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.

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.

Share Improve this question edited Jan 31, 2012 at 20:17 josh3736 145k34 gold badges226 silver badges271 bronze badges asked Jan 31, 2012 at 18:21 Chase RoseChase Rose 511 silver badge2 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

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

  • Google recently released indoor mapping. Go to maps.google./floorplans to upload your buildings' floor plans.
  • Use Google Map Maker to add walking paths to your campus.

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./maps?saddr=START_LOCATION&daddr=DESTINATION_LOCATION&dirflg=w"));
if (isAppInstalled(".google.android.apps.maps")) {
    intent.setClassName(".google.android.apps.maps", ".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.)

本文标签: javascriptAndroid mobile app indoor mapswalking directionsStack Overflow