I want to make an Android app with a map that provides directions, but not Google Maps
Asked Answered
L

4

7

I want to make an Android App that loads a map that I have created of the inside of a building. I want it to provide directions between one room to another. And between floors if possible.

I would like the map to be zoomable, and clickable too. i.e. you can click where you are, and where you want to go, and the app will provide the directions. OR you enter into text boxes what room you are at, and where you want to go, and again, directions are provided.

I did stumble across something that allowed you to use an open source map and add your own nodes to each corner, or place of reference. But I can not find the site any more, after an hour of Google searching.

Does anyone have any idea how I could do this?

Leenaleeper answered 13/12, 2011 at 20:9 Comment(2)
one up for hopes that you get an answer to this. but i believe this is a hardware limitation. meaning that gps doesnt really work in doors. so short of doing manual triangulation between wifi or bluetooth aps its impossible. but like i said i hope u get a different answer and that im wrong.Resultant
wiki.openstreetmap.org/wiki/Indoor_Mapping maybe you can get ideas from there.Stewpan
A
3

This is one of them instances where the idea sounds simple but really is not. There are many tasks you need to resolve, some already talked about.

1) How to model the office. This needs to be done so that it is easy for you to model but the file is small. It has to be in a format that your path finding algorithm can understand. This means as you develop the path finding you will be making changes to the data.

2) Location finding / input. Done by hardware (gps will not cut it) or user says where they are. Could be done with NFC and tags placed around in the office, not an ideal solution, the tags have to be visible. The user could input their location but they may be lost and not know where they are.

3) How to present the data, you could write a magical 3D app showing a mission impossible building layout. That will be six months work in it self! Remember, your map is in 3D, road maps tend to be 2D. (with some fly overs...)

4) Progress tracking. The app really needs to know how you are doing so if you go off the route it'll tell you to go back. This again will be hard to achieve indoors. Progress tracking is one area that PND (Personal Navigation Device) manufactures spend time on as it really effects user confidence in the software.

Having worked at TomTom all I can say you could be at this for years.

As this is a collage project could I suggest a simpler project?

Do it with 2D map, simple grid based map a bit like the classic mouse in a maze problem. Implement A* for the path finding. Once done you could then if you have time extend it for your original plan.

A book I have found very good in the past is "Programming Game AI by example". ISBN 1-55622-078-2. Chapter 8 is all about path finding and has a very nice part on A*.

Good luck. :)

Aphrodite answered 13/12, 2011 at 21:24 Comment(0)
E
2

While this may not be the answer you are looking for:

You could always write an app that does this. If you are already willing to position the nodes on the map, you could hypothetically write a program that uses a (primarily used) game pathing algorithm, such as A*, and figure out a route from there. It would be tricky, but I would think that by placing Nodes and vector-mapping them with a cost associated with the vectors (maybe measured in feet/meters or something like that), you might be able to set that up with A*...

Hard to say. I tried a quick Google and came up empty as well.

Eatables answered 13/12, 2011 at 20:39 Comment(1)
I appreciate the response. But this is a college project, where I am already learning Java from scratch for, I think that is enough to try to learn for now, without having to learn A* too. But it may help none the less. Thanks again. I will let you know if I do end up using this.Leenaleeper
R
1

You can create a MapActivity which can then house a MapView (MapView can not be embedded in any other Activity), which is an honest to goodness interactive map, but it's not exactly full featured.

MapView is mainly meant to display a map of a specific area with custom overlays on it. You can set the focus of the map, the zoom level, if it displays traffic data, and a few other minor options. But beyond that, you'd have to construct the overlay of the route your self. And there's no sort of turn by turn direction functionality or anything. They are just "dumb" overlays.

Google DID however recently update the Google Maps app to include indoor maps & navigation. They provide a site that you can go to and submit a floor plan of your building, so it can be added to the official app.

Once your floor plan is officially added, you could just launch the official app to do your navigation for you using an Intent like this:

Intent intent = new Intent(android.content.Intent.ACTION_VIEW, 
Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20.5666,45.345"));
startActivity(intent);
Rockbound answered 13/12, 2011 at 21:0 Comment(0)
V
1

I had exactly faced the same sort of issue during my Masters project. However, my solution isn't really complete but this is how I planned it. I anyhow couldn't implement it fully due to various restrictions. This might sound complex but I'm not really sure how to put it across.

  1. Store maps statically and not dynamically - what I mean is, pictures/photos popping up when someone wants to go from one room to another or one floor to another. Dynamic routing is a bit difficult. Have pictures stored before hand so that they pop up.

  2. Devise shortest path algorithm something like Dijkstra's algorithm. You'll get ready-made java programs for the execution of this algorithm. Using this, you can obtain routes. Once the map is available, making it clickable and adding zooming options shouldn't be much of a problem.

Combine both steps somehow (sorry, no code here 'cuz I myself couldn't come up with one). As Richard says above, I had NFC in my mind to implement it (my entire project was based on this). NFC is basically an RFID technology and hence wireless. You can use 802.11 b/g/n for implementing the network side of it. If you need some more help, please let me know. Will help how much ever I can.

All the best.

Vertievertiginous answered 14/12, 2011 at 7:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.