Just to get this straight, one has to *subclass* MapView in order to
enable simple things such as zooming? I can't help it, but to me it
seems that with every step forward, Android takes two steps backwards.

On Aug 28, 8:42 pm, marcel-182 <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I extended the MapActivity with some basic functionality for my
> project to avoid redundant work. Zoom controls are also working fine.
> So if anyone is interested, you can get a demo 
> here:http://www.marcelp.info/files/BasicMapDemo.zip
>
> Feel free to use it in your applications.
>
> On 27 Aug., 16:28, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
>
> > How to controlzoom"steps":
> > In my application when Izoomin and out, I can't control how much
> > this willzoombut in the standard map application zooms "less" at
> > each step than in my application. I tried setZoomSpeed on ZoomControls
> > but it deals with the animation speed, not thezoomstep.
>
> > On 27 août, 08:00, Amos <[EMAIL PROTECTED]> wrote:
>
> > > I think you're right. It's probably a better idea to add the mapview
> > > to the relativelayout. The "layout" is not necessary.
>
> > > On Aug 27, 3:29 am, jokochi <[EMAIL PROTECTED]> wrote:
>
> > > > That's a neat solution. It works! Thank you, Amos.
> > > > I really know how to use RelativeLayout.
>
> > > > It's just a small question comes to me, why mapview was stacked on
> > > > layer "layout"?
> > > > I think mapview is able to be on top layer like as before.
>
> > > > On 8月26日, 午後9:38, Amos <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi All,
>
> > > > > There's no need to manually handle touch events for displaying the
> > > > >zoomcontrols. The following works for me:
>
> > > > > My layout xml file is...
>
> > > > > <?xml version="1.0" encoding="utf-8"?>
> > > > > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
> > > > > android"
> > > > >         android:layout_width="fill_parent"
> > > > >         android:layout_height="fill_parent">
>
> > > > >    <LinearLayout android:id="@+id/layout"
> > > > >         android:layout_width="fill_parent"
> > > > >         android:layout_height="fill_parent"
> > > > >         />
>
> > > > >    <LinearLayout android:id="@+id/layout_zoom"
> > > > >         android:layout_width="wrap_content"
> > > > >         android:layout_height="wrap_content"
> > > > >         android:layout_alignParentBottom="true"
> > > > >         android:layout_centerHorizontal="true" />
>
> > > > > </RelativeLayout>
>
> > > > > ... And in my onCreate I do:
>
> > > > >                 //...
> > > > >                 LinearLayout 
> > > > > lay=(LinearLayout)findViewById(R.id.layout);
> > > > >                 
> > > > > LinearLayoutzoom=(LinearLayout)findViewById(R.id.layout_zoom);
> > > > >                 _map= new MapView(this, 
> > > > > MyConstants.GOOGLE_MAPS_API_KEY);
> > > > >                 _map.setClickable(true);
> > > > >                 _map.setEnabled(true);
>
> > > > >                 _map.displayZoomControls(true);
>
> > > > >                 lay.addView(_map, new LinearLayout.LayoutParams(
> > > > >                                 LayoutParams.FILL_PARENT,
> > > > >                                 LayoutParams.WRAP_CONTENT));
>
> > > > >                 View zoomView = _map.getZoomControls();
> > > > >                zoom.addView(zoomView, new LinearLayout.LayoutParams(
> > > > >                                 LayoutParams.WRAP_CONTENT,
> > > > >                                 LayoutParams.WRAP_CONTENT));
> > > > >                 //...
>
> > > > > Hope this helps.
>
> > > > > Amos
>
>
--~--~---------~--~----~------------~-------~--~----~
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