that's still way too much code just to enable map zoom IMHO... a
map.showZoomControls(true) should be all that's needed, but thanks for
sharing, appreciated :-)

On Oct 17, 5:06 pm, "shailesh prakash" <[EMAIL PROTECTED]> wrote:
> Guys let me end the discussion with this,
>
>                 //-------------------------------
>                 final ZoomControls zoomControls = (ZoomControls)
> findViewById(R.id.ZoomControls);
>
>                 zoomControls.setOnZoomInClickListener(new 
> ZoomControls.OnClickListener() {
>                                         public void onClick(View v) {
>                                                         
> zoomControls.setIsZoomInEnabled(tMapCtrl.zoomIn());
>                                                         
> zoomControls.setIsZoomOutEnabled(true);
>                                         }
>                                 });
>
>                 zoomControls.setOnZoomOutClickListener(new 
> ZoomControls.OnClickListener() {
>                                         public void onClick(View v) {
>                                                 
> zoomControls.setIsZoomOutEnabled(tMapCtrl.zoomOut());
>                                                 
> zoomControls.setIsZoomInEnabled(true);
>                                         }
>                                 });
>
> On Fri, Oct 17, 2008 at 8:26 PM, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
> > Matthias wrote:
> >> Just to get this straight, one has to *subclass* MapView in order to
> >> enable simple things such as zooming?
>
> > No.
>
> > Step #1: Put a spot for the zoom controls in your layout (e.g., a
> > LinearLayout named R.id.zoom)
>
> > Step #2: Tell Android where the zoom controls go:
>
> > ViewGroup zoom=(ViewGroup)findViewById(R.id.zoom);
>
> > zoom.addView(map.getZoomControls());
>
> > Step #3: There is no Step #3.
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com
> > _The Busy Coder's Guide to Android Development_ Version 1.3 Published!
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to