Re: [android-developers] Help me with adding overlays in google maps

2011-09-12 Thread Logesh rajendren
i found the problem. the problem is actually in manifest file . i didnt
include HelloItemizedOverlay activity in the manifest file.

On Mon, Sep 5, 2011 at 8:20 AM, TreKing treking...@gmail.com wrote:

 On Mon, Sep 5, 2011 at 6:24 AM, Logesh rajendren loges...@gmail.comwrote:

 *When i execute this application , i m getting the following error .*

 *
 application MapsOverlay(process.com.maps) has stopped unexpectedly.
 Please try again  *


 *can u please help me now .. ?*


 Use LogCat and your debugger to debug your application.



 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Help me with adding overlays in google maps

2011-09-05 Thread Logesh rajendren
*This is my main.xml layout file .*

?xml version=1.0 encoding=utf-8?
com.google.android.maps.MapView
 xmlns:android=http://schemas.android.com/apk/res/android;
 android:id=@+id/mapview
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:clickable=true
 android:apiKey=0RpY75HF_fGbjp8flqnOd0gS9T8CpZrsiiqVA_g
/

*and the manifest file contains *

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.maps
  android:versionCode=1
 android:versionName=1.0 
   uses-sdk android:minSdkVersion=7 /
 application android:icon=@drawable/icon
android:label=@string/app_name
 activity android:name=.MapsOverlayActivity
android:label=@string/app_name
android:theme=@android:style/Theme.NoTitleBar
 intent-filter
 action android:name=android.intent.action.MAIN /
 category android:name=android.intent.category.LAUNCHER /
 /intent-filter
 /activity
 uses-library android:name=com.google.android.maps /
 /application
 uses-permission android:name=android.permission.INTERNET /
/manifest


*The MapsOverlayActivity.java contains

*package com.maps;
import java.util.List;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

public class MapsoverlayActivity extends  MapActivity
{
 @Override
 public void onCreate(Bundle savedInstanceState)
 {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);

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

 ListOverlay mapOverlays = mapView.getOverlays();
 Drawable drawable = this.getResources().getDrawable(R.drawable.icon);
 HelloItemizedOverlay itemizedoverlay = new
HelloItemizedOverlay(drawable,this);
 GeoPoint point = new GeoPoint(30443769,-91158458);
 OverlayItem overlayitem = new OverlayItem(point, Laissez les bon temps
rouler!, I'm in Louisiana!);

 GeoPoint point2 = new GeoPoint(17385812,78480667);
 OverlayItem overlayitem2 = new OverlayItem(point2, Namashkaar!, I'm
in Hyderabad, India!);

 itemizedoverlay.addOverlay(overlayitem);
 itemizedoverlay.addOverlay(overlayitem2);

 mapOverlays.add(itemizedoverlay);
 }
 @Override
 protected boolean isRouteDisplayed()
 {
 return false;
 }
}


*And this is my HelloItemizedOverlay.java file *


package com.maps;
import java.util.ArrayList;
import android.app.AlertDialog;
import android.content.Context;
import android.graphics.drawable.Drawable;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class HelloItemizedOverlay extends ItemizedOverlayOverlayItem
{
 private ArrayListOverlayItem mOverlays = new ArrayListOverlayItem();
 private Context mContext;

 public HelloItemizedOverlay(Drawable defaultMarker, Context context)
 {
 super(boundCenterBottom(defaultMarker));
 mContext = context;
 }

 public void addOverlay(OverlayItem overlay)
 {
 mOverlays.add(overlay);
 populate();
 }
 @Override
 protected OverlayItem createItem(int i)
 {
 return mOverlays.get(i);
 }
 @Override
 public int size()
 {
 return mOverlays.size();
 }
 @Override
 protected boolean onTap(int index)
 {
 OverlayItem item = mOverlays.get(index);
 AlertDialog.Builder dialog = new AlertDialog.Builder(mContext);
 dialog.setTitle(item.getTitle());
 dialog.setMessage(item.getSnippet());
 dialog.show();
 return true;
 }
}


*
When i execute this application , i m getting the following error .*

*
application MapsOverlay(process.com.maps) has stopped unexpectedly. Please
try again  *


*can u please help me now .. ?*




On Sun, Sep 4, 2011 at 1:24 PM, TreKing treking...@gmail.com wrote:

 On Sat, Sep 3, 2011 at 9:33 AM, Logesh loges...@gmail.com wrote:

 hello guys , i am just trying to add overlays and markers in google maps
 in my android application


 How? What are you trying?


 I am very new to android development . I have tried with all the examples
 and snippets given .


 What samples and snippets? Given by whom?


  But nothing is working for me .


 What does nothing is working mean?


  whatever i do i am getting only error message


 Want to share the error message, or should we guess?


  please help me to debug it !!


 How precisely would you like us to do that when you provide almost no
 information?


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 

Re: [android-developers] Help me with adding overlays in google maps

2011-09-05 Thread TreKing
On Mon, Sep 5, 2011 at 6:24 AM, Logesh rajendren loges...@gmail.com wrote:

 *When i execute this application , i m getting the following error .*

 *
 application MapsOverlay(process.com.maps) has stopped unexpectedly. Please
 try again  *


 *can u please help me now .. ?*


Use LogCat and your debugger to debug your application.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Help me with adding overlays in google maps

2011-09-05 Thread Logesh rajendren
thank you , i will look into it.

On Mon, Sep 5, 2011 at 8:20 AM, TreKing treking...@gmail.com wrote:

 On Mon, Sep 5, 2011 at 6:24 AM, Logesh rajendren loges...@gmail.comwrote:

 *When i execute this application , i m getting the following error .*

 *
 application MapsOverlay(process.com.maps) has stopped unexpectedly.
 Please try again  *


 *can u please help me now .. ?*


 Use LogCat and your debugger to debug your application.



 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Help me with adding overlays in google maps

2011-09-04 Thread Logesh
hello guys , i am just trying to add overlays and markers in google
maps in my android application . I am very new to android
development . I have tried with all the examples and snippets given .
But nothing is working for me .
whatever i do i am getting only error message . please help me to
debug it !!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Help me with adding overlays in google maps

2011-09-04 Thread TreKing
On Sat, Sep 3, 2011 at 9:33 AM, Logesh loges...@gmail.com wrote:

 hello guys , i am just trying to add overlays and markers in google maps in
 my android application


How? What are you trying?


 I am very new to android development . I have tried with all the examples
 and snippets given .


What samples and snippets? Given by whom?


  But nothing is working for me .


What does nothing is working mean?


  whatever i do i am getting only error message


Want to share the error message, or should we guess?


  please help me to debug it !!


How precisely would you like us to do that when you provide almost no
information?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en