1

Im using the SDK MonoForAndroid. I am currently trying to display my own map as an overlay onto Google maps in android.

eg: Google maps doesn't map my uni very well, I have a map of my uni that I want to stick ontop of Google maps.

I have researched a few methods such as:

1) Display the map as an image. As the uni is a very big place and the map is detailed. The image limit for bitmaps is 16MB, I want to load an image around 50MB. So this isnt really an option any more, but it lead to option two.

2) Display the image tiled. This seems to be the more common approach. But I cant find any good examples of how it is drawn on the map. I can find plenty of examples on how to cut up the image, just not drawing it on the map. Im not sure how to deal with different levels of zooming, because different details of the map would be needed.

3) Drawing a rectangles as tiles and use a paint with a bitmapShader of the image.

Things I cant find, but could be nice:

4) Is there a tiling tool for drawing a tiled bitmap?

5) A drawing vector images.

I just want to most effective/easiest way to do this

poupou
  • 43,413
  • 6
  • 77
  • 174

1 Answers1

0

Have you spent much time looking at the Google Maps APIs? I know on iOS at least the MapKit framework handles most of this stuff for you, and I’m pretty sure Android’s would be similar.

You should always start looking for the highest-level API possible to keep things simple. If you’re already thinking about bitmap sizes and generating tiles, you’re probably making it too difficult for yourself.

Here’s a tutorial that looks like a good start that covers getting set up, and adding overlays using the MapView with Mono for Android: http://docs.xamarin.com/android/tutorials/Maps_and_Location/Part_2_-_Maps_API

Once you’ve got your MapView working, there’s lots of other resources out there that should cover how to add different kinds of overlays (paths, points, etc.) – but you’ll probably find more Java examples, so you’ll have to convert it to Mono C# yourself.

Community
  • 1
  • 1
DouglasHeriot
  • 1,674
  • 2
  • 13
  • 19
  • Yeah Ive been through that tutorial. Ive managed to add overlays to mapview, rotate/stretch with a matrix. The problem is that to add an overlay you must load an image as a bitmap first. And the image I want to add as the overlay is to big to be loaded as a single image. – Brennan Hatton Jul 26 '12 at 22:15