Maps - position of zoom controls

by Neilz » Mon, 25 Apr 2011 17:29:38 GMT


Sponsored Links
 When I tap my map, the zoom controls appear in the center of the
screen at the bottom.

Is it possible to control where they sit? I notice on the google maps
app, they are aligned into the bottom right corner of the map, which
is what I'd like to do in my own map activity.

Thanks.

-- 



Re: Maps - position of zoom controls

by Filip Havlicek » Mon, 25 Apr 2011 18:18:55 GMT


 Here you go

 http://tinyurl.com/3fha8xl 

2011/4/25 Neilz <neilhorn...@gmail.com>


-- 


Sponsored Links


Re: Maps - position of zoom controls

by Neilz » Mon, 25 Apr 2011 19:32:20 GMT


 Oh my sides are splitting.


Ok, I've done some searching, and found a half solution... but it's
not without issues:

I've set my own ZoomControls object, in the layout xml, and added
listeners to activate the zooms (as per this link...
 http://stackoverflow.com/questions/920741/always-show-zoom-controls-on-a-mapview )

But the only issue is that the zoom buttons don't disable themselves
when fully in/out. It says you can use the following line to rectify
this:

mapView.getZoomButtonsController().setAutoDismissed(false);

...but because I'm not using the built-in-zoom-controls, this doesn't
work. There doesn't seem to be a way of accessing and controlling the
buttons from my own ZoomControls object...




-- 



Re: Re: Maps - position of zoom controls

by Filip Havlicek » Mon, 25 Apr 2011 19:37:45 GMT


 Why didn't you try the Reto Meier solution? Third link from the Google
search.

 http://stackoverflow.com/questions/263507/placing-zoom-controls-in-a-mapview 

And if you want help, post your XMLs and code samples.

2011/4/25 Neilz <neilhorn...@gmail.com>



-- 



Re: Maps - position of zoom controls

by Neilz » Mon, 25 Apr 2011 20:07:22 GMT


 Yes, this solution does work, thanks.

Actually it was the first solution I looked at - problem was it uses a
deprecated method, and there doesn't seem to be a way of doing it
without using the method - so for some reason I decided against trying
it out. But hey if it works, that's good enough.





-- 



Re: Re: Maps - position of zoom controls

by Filip Havlicek » Mon, 25 Apr 2011 20:48:44 GMT


 Oh I see. Took a brief look at the deprecated method and didn't find any
easy way to do that, so I suggest you test it on the various OS versions in
the emulator and on some of the devices you have access to and if it works
on all of them, then it's probably fine. I haven't done anything with
MapView for a while now, so can't really give any real-life experience.

Best regards,
Filip Havlicek

2011/4/25 Neilz <neilhorn...@gmail.com>




-- 



Other Threads

1. AndroidAPI App

I wrote my first "Hello World" App for Android: AndroidAPI

It should be useful for Android developers

Actually it provides full Android Java API on your Android phone and
does not require connection

Search for AndroidAPI in Market


--~--~---------~--~----~------------~-------~--~----~

2. how to disable auto-rotation feature

Hi,

I have a apk file, where i dont have the source for it.

When i run the apk, it automatically rotates the screen,

/WindowManager(  879): Setting rotation to 1, animFlags=0
I/WindowManager(  879): Config changed: { scale=1.0 imsi=0/0 locale=en_US
touch=1 key=2/1/2 nav=3 orien=1 }

then after closing the application or coming out from the application,

I/WindowManager(  879): Setting rotation to 0, animFlags=0
I/WindowManager(  879): Config changed: { scale=1.0 imsi=0/0 locale=en_US
touch=1 key=2/1/2 nav=3 orien=2 }

how to disable the rotation.

Thanks and Regards,
HarishKumar.V

--~--~---------~--~----~------------~-------~--~----~

3. easiest way to set an ImageButton background to be transparent

4. Using sensors and orientation - lat/lon point to screen coordinates

5. Loading default preferences on startup

6. I am trying to log my gps location to a website.

7. AppWidgetHost - what is the hostId for?