help needed with mapview

electronik54

Member
Licensed User
Longtime User
:sign0085:
hi there
i am using mapview in my project. the map is to be displayed on the scrollview so that the whole list is scrollable with the map. i am not able to do that as map always floats above the scrollview and wont scroll with the scrollview.
is there a way to make map scroll with the scrollview??
 
I'm not sure what is the problem, you have to add the mapview to the scrollview, not to the activity.
 
Upvote 0
i am new to programming(and so to B4A). some detailed explaination might be helpful
i am using following code to do it
Code:
OSMMapView.Initialize("")
   Activity.AddView(OSMMapView, 0, 0, 100%x, 47%y)
i know this will just call a floating map over the existing scrollview

how do i add it to the scrollview? i want the map to scroll with the scrollview(like the text in the scrollview that is scrollable with the list i want the mapview to be scrolled)
here>>
Untitled.jpg


1.image on the left is what i have. here my map view wont scroll with scrollview. the scroll view disappears under the mapview.
2.image on the left is what i want. i want the map to be scrollable with the scrollview(kind of bake mapview on the scrollview).
 
Last edited:
Upvote 0
How and with what kind of views do you populate the ScrollView?
To add OSMMapView on the ScrollView you must add it onto the ScrollView.Panel like:
Code:
ScrollView1.Panel.AddView(OSMMapView, 0, 0, ScrollView1.Panel.Width, 47%y)
Add the other views below OSMMapView.
And then set ScrollView1.Panel.Height to the appropriate value.

Best regards.
 
Upvote 0
How and with what kind of views do you populate the ScrollView?
To add OSMMapView on the ScrollView you must add it onto the ScrollView.Panel like:
Code:
ScrollView1.Panel.AddView(OSMMapView, 0, 0, ScrollView1.Panel.Width, 47%y)
Add the other views below OSMMapView.
And then set ScrollView1.Panel.Height to the appropriate value.

Best regards.

other views work fine, i had problem with Mapview. i will try your solution
 
Upvote 0
Back
Top