Well Landy I don't know about the stack trace file error but what I do
know is that the methods you are trying to use for zoom controls are
deprecated. The new method is getting your MapView like you have and
then instead of having your linear layout you simply put:

MapView map = (MapView) findViewById(R.id.mapview);
map.setBuiltInZoomControls(true);

This method does all the work for you and even hides itself if the
user isn't using it! I had this problem too. The tutorial is out of
date and there are actually two different ones on the developer
website.

Hopefully this helps!

Adam

On Apr 23, 2:17 am, Landy <[email protected]> wrote:
> Dear all,
>
> I tried using the MapActivity as given in the following 
> link.http://developer.android.com/guide/tutorials/views/hello-mapview.html
>
> I get the error in LogCat : DalvikVm: unable to open stack trace file
> android '/data/anr/traces.txt' Permission Denied. May I know why this
> happens.
>
> However, after making some changees in the code as shown below, I get
> the map view perfectly.
>
> �...@override
>     public void onCreate(Bundle savedInstanceState1) {
>         super.onCreate(savedInstanceState1);
>         setContentView(R.layout.main);
>
>         linearLayout = (LinearLayout) findViewById(R.id.zoomview);
>         mapView = (MapView) findViewById(R.id.mapview);
>         mZoom = (ZoomButtonsController)
> mapView.getZoomButtonsController();
>
>         //   linearLayout.addView( mZoom.getZoomControls());
> -------------------------------------------- If i comment here then
> there is NO Error.
>
>         mapOverlays = mapView.getOverlays();
>         drawable =
> this.getResources().getDrawable(R.drawable.androidmarker);
>         itemizedOverlay = new HelloItemizedOverlay(drawable);
>         itemizedOverlay.addOverlay(overlayitem);
>         mapOverlays.add(itemizedOverlay);
>     }
>
> Please find if any error in my code. Same code is used as mentioned in
> the linkhttp://developer.android.com/guide/tutorials/views/hello-mapview.html
>
> Landy.
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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