Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Custom Map

I am developing an Indoor Positioning System for Android. I need to draw a custom floor plan of a building and overlay a pointer on it.

In this scenario, which software/API I should use to draw custom floor plan?

Thanks in advance.

like image 290
alvin8866 Avatar asked Oct 26 '11 06:10

alvin8866


2 Answers

I recently did a library floorplan thing as part of my master's thesis. I settled for a simple custom Drawable that just scaled a Bitmap (floorplan) to fit the screen and then draws some translucent rectangles (book shelves) on top of it. My layout has a generic View with fill_parent for both directions and gets the custom Drawable via setBackgroundDrawable() in Activity.onCreate().

If you have high-resolution maps (more than fits into app memory in one piece), want zooming or even rotation, it's going to be a lot of work. I tried to use the Google IO app code mentioned by Reno in his answer, custom Google Maps overlays (can't zoom in close enough), an offline WebView (for the "free" zooming functionality) and even pondered a custom tile-based rendering system -- in the end using a simple Bitmap was the least hassle and worked surprisingly well for my use case.

I'd be very much interested in a solution that does zoomable, rotating, tiled-based rendering, though :)

like image 99
Philipp Reichart Avatar answered Sep 18 '22 19:09

Philipp Reichart


Google did this for their Google I/O event. Too bad they used javascript :( I'm no good at it.

They loaded the map.js in a MapFragment, which contains a WebView.

like image 28
Reno Avatar answered Sep 18 '22 19:09

Reno