AlpVir Well-Known Member Licensed User Longtime User Dec 19, 2013 #1 Zoom control can be placed in another part of the screen ? Tanks in advance.
warwound Expert Licensed User Longtime User Dec 20, 2013 #2 Hi. I've taken a look at the source code for OSMDroid and it is not possible to re-position the zoom buttons. The zoom buttons are within a FrameLayout in a class that is not exposed to the library methods. Your only option i think is to not display the built in zoom controls but create your own custom zoom buttons. Martin. Upvote 0
Hi. I've taken a look at the source code for OSMDroid and it is not possible to re-position the zoom buttons. The zoom buttons are within a FrameLayout in a class that is not exposed to the library methods. Your only option i think is to not display the built in zoom controls but create your own custom zoom buttons. Martin.
AlpVir Well-Known Member Licensed User Longtime User Dec 20, 2013 #3 Your only option i think is to not display the built in zoom controls but create your own custom zoom buttons. Click to expand... Tanks Martin It 'just what I've done (see attached image). But now I have to manage the touch on MapView when the map is moved Attachments Martin.jpg 59.7 KB · Views: 930 Upvote 0
Your only option i think is to not display the built in zoom controls but create your own custom zoom buttons. Click to expand... Tanks Martin It 'just what I've done (see attached image). But now I have to manage the touch on MapView when the map is moved
warwound Expert Licensed User Longtime User Dec 20, 2013 #4 AlpVir said: But now I have to manage the touch on MapView when the map is moved Click to expand... Your custom zoom controls interfere with the default map touch actions do they? Martin. Upvote 0
AlpVir said: But now I have to manage the touch on MapView when the map is moved Click to expand... Your custom zoom controls interfere with the default map touch actions do they? Martin.
AlpVir Well-Known Member Licensed User Longtime User Dec 20, 2013 #5 Yes, I two buttons (Zoom+ and Zoom-) should behave exactly like those of the your "zoom control". In addition there is a "C" button (top left) which should center the map. The navigator TwoNav has just these 3 buttons that disappear when the map stops and they appear when it is moved. Actually, for some reason unknown to me now, the event ZoomChanged and is not trapped ZoomChanged. the code Code: Sub MapView1_ZoomChanged Log("MapView1_ZoomChanged") LbZoom.Text = "Z"&CStr(MapView1.Zoom) End Sub is not executed (MapView1 is declared in Sub Globals) ??? Maybe everything would be resolved if we could intercept the event MapView1_Move (which does not exist !) Upvote 0
Yes, I two buttons (Zoom+ and Zoom-) should behave exactly like those of the your "zoom control". In addition there is a "C" button (top left) which should center the map. The navigator TwoNav has just these 3 buttons that disappear when the map stops and they appear when it is moved. Actually, for some reason unknown to me now, the event ZoomChanged and is not trapped ZoomChanged. the code Code: Sub MapView1_ZoomChanged Log("MapView1_ZoomChanged") LbZoom.Text = "Z"&CStr(MapView1.Zoom) End Sub is not executed (MapView1 is declared in Sub Globals) ??? Maybe everything would be resolved if we could intercept the event MapView1_Move (which does not exist !)
warwound Expert Licensed User Longtime User Dec 21, 2013 #6 Hi again. If the ZoomChanged event is not being raised then first check that you are passing the correct EventName to the MapView Initialize method. There is no MapView Move event but there is a MapView CenterChanged event, this event is raised when the map is scrolled. I think this event is raised continuously while the map is being panned/scrolled and not raised just once when the pan/scroll ends. Can you try to listen for the CenterChanged event? If neither of these events are raised we'll have to debug you code. Martin. Upvote 0
Hi again. If the ZoomChanged event is not being raised then first check that you are passing the correct EventName to the MapView Initialize method. There is no MapView Move event but there is a MapView CenterChanged event, this event is raised when the map is scrolled. I think this event is raised continuously while the map is being panned/scrolled and not raised just once when the pan/scroll ends. Can you try to listen for the CenterChanged event? If neither of these events are raised we'll have to debug you code. Martin.
AlpVir Well-Known Member Licensed User Longtime User Dec 23, 2013 #7 Thanks Martin It was my mistake: I had written MapView1.Initialize ("") Sorry ! Upvote 0