On Aug 30, 2011, at 9:11 AM, Tomasz Cielecki wrote:
> I am currently trying to make an application using a Google Maps map, where I 
> need to present various things and be able to launch other
> activities by clicking of some of the presented things. I know that in Java 
> you just extend MapActivity and make a simple resource to show a
> MapView. This is as far as I could find out not possible in MonoDroid as of 
> yet. I tried using this example
> https://github.com/mono/monodroid-samples/tree/master/GoogleMaps and it seems 
> to work, though in the emulator I do not get shown a map, just a grid. Also 
> the instructions are a bit complicated just to get a map shown on your screen.

A lot of that complication is due to Android itself. For example, the "normal" 
emulator Targets (e.g. "Android 2.2 - API Level 8") lack Google Maps support, 
and you need to use a different Target when creating the emulator (e.g. "Google 
APIs (Google Inc.) - API Level 8"). This adds complexity, as you can't use any 
previously created emulator devices, you need to create (and remember to run!) 
a new one.

Then we get to the Google Maps API itself, which further requires that your app 
have an API key, which you need to separately obtain and insert into the 
Resources\Layout\Map.axml file. If you don't get your own API key, then you get 
just a grid and not a map (as you see).

I'm sorry that it's so complicated, but the above is "necessary" complexity (at 
least until Google decides to simplify things). Even when Mono for Android 
allows you to subclass MapActivity from C#, you will still need to remember to 
create an emulator with the appropriate Target, and you will still need to 
separately obtain an API key for the Google Maps API. There's not a lot that 
Mono for Android can do there, and Java is no better. :-(

If you have any suggestions on how to improve the README file to clarify any 
questions, I would be more than happy to improve it.

Thanks,
 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to