Reputation: 1
Hey I am trying to find a way to create a golf cart map for android devices using the Google API's and Google Maps. I have an API key from google and did the basic tutorial already. I create a custom Google map that I want to implement in the application (all i really had to do was turn the bicycle map on). So what I am trying to do is program my custom map into an android application so people can use it as a GPS while driving on Golf Carts. I would greatly appreciate any advice to get me started because I haven't been able to find out how to do this in the Google API reference.
Upvotes: 0
Views: 1804
Reputation: 11941
I would suggest extending the MapActivity class and use Overlays to draw any additional 'Golf' features you want to add e.g. the location of the user. As they move about in the golf cart you could keep their position static, with respect to the screen e.g. keep them centered, and scroll the map in whatever direction they are travelling. An additional aspect to keeping them centred is to also keep the map with North pointing upwards, and provide some additional directional feedback to the user such as an arrow showing their direction of travel e.g. if the user was travelling east, an icon showing their location would be in the center of the screen with an arrow pointing east, with the map scrolling from right to left.
Upvotes: 0
Reputation: 27970
You will have to create your own extended version of MapView. override the onDraw method when you extend and apply your logic.
http://developer.android.com/guide/topics/ui/custom-components.html :documentation link which can help you creating a custom control.
Upvotes: 1