Gary Rowell
Gary Rowell

Reputation: 23

Navigation controls on a mapview

Im asking a question here without any code because I don't even know if its possible. I have a MapView on an Android application which fills the width of its parent layout but not the height because the map displays a few overlays of locations and then below is a list of the locations and the user can select the one they want or to add a new location to the database. So it goes like this:

Scroll View LinerLayout Map View Text View (of the overlay names on map) /LinearLayout /Scroll View

The problem here is that when I try to navigate north and south on the map it just scrolls with the scroll view. I expected it to move the map and only the scroll view if I clicked outside the map. It moves left and right as expected.

So what I was wondering was is it possible to either have some sort of lock function on the map so when you click on it you can navigate around it fine and then click else where on the screen and then you will navigate up and down using the scroll view. Or is there someway to have the up down left and right arrows on the map like the standard google maps do?

(I can navigate around the map fine if I use the roller ball (using the G1 phone) but it is incredibly slow)

Hope this makes sense

Upvotes: 0

Views: 1067

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006674

Do not put a MapView in a ScrollView. It simply does not work, as you are discovering. Do not put anything that knows how to vertically scroll (MapView, ListView, WebView) in a ScrollView.

Or is there someway to have the up down left and right arrows on the map like the standard google maps do?

You are welcome to create something, but there is no built-in capability for this.

Upvotes: 2

Related Questions