0

I'm trying to make an Android application that will display a map of a local area only (a big building and surroundings), and I want to know if it's possible to take the Google Maps API and modify the map it's using to be the map I made myself.

If this cannot be done, I will ask my question in a broader sense: How can I create an interactive map app for Android that will use an image made by myself?

JS Rolón
  • 273
  • 1
  • 9
  • You can't change the map but I think you could use your map as an overlay on top of googles map. – zapl Mar 18 '12 at 23:03
  • Could you explain that further, please? If I'm right, that would mean putting an image over Google's Map that will be my image? – JS Rolón Mar 18 '12 at 23:05
  • Yes, like in [here](http://developer.android.com/resources/tutorials/views/hello-mapview.html) instead of that android icon. It's still a bit tricky since you need to draw the image yourself with the right projection etc. Maybe [that](http://stackoverflow.com/questions/2848189/efficient-map-overlays-in-android-google-map) helps (draw your image where they draw lines) – zapl Mar 18 '12 at 23:39

1 Answers1

1

I want to know if it's possible to take the Google Maps API and modify the map it's using to be the map I made myself.

Not through the Google Maps add-on for Android.

How can I create an interactive map app for Android that will use an image made by myself?

The same way you implement 2D games: draw it yourself, probably using the Canvas 2D API.

It is possible that there is a third-party library for handling this. For example, you might peek at the OSMDroid code, as that is open source and handles map tiles coming from OpenStreetMap. In theory, one should be able to create a general purpose "map" widget with pluggable tile sources, where the widget handles pan, zoom, etc.

I note that you have the app-inventor tag on this question -- App Inventor is going to be incapable of doing this any time soon.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Ok, thanks. So you say that it _is_ possible, by using the Canvas 2D API, to make what I want? Yeah, I think it was a mistake to put that tag there. – JS Rolón Mar 18 '12 at 23:09
  • @Teckizt: "So you say that it is possible, by using the Canvas 2D API, to make what I want?" -- sure. As I pointed out, OSMDroid is capable of showing OpenStreetMap map tiles. By definition, therefore, somebody else can create a map widget that uses some other tile source. – CommonsWare Mar 18 '12 at 23:12
  • And those tiles are my tiles, right? Okay, thank you. That's a great idea. – JS Rolón Mar 18 '12 at 23:15
  • @Teckizt: "And those tiles are my tiles, right?" -- well, I have no way to tell. For all I know, you broke into a tile store and walked out with a whole bunch of somebody else's tiles. :-) – CommonsWare Mar 18 '12 at 23:16