Hi friends

I am Struggling a lot. Please help me.
I am showing some locations in the map, when i click on the particulat
overlay, i am planning to show a dialog box to show the details info
of that particular overlay.
The detailed info of overlay is there in my locations in
Mylocations.java .
So onTap, i am calling a method in Mylocations.java and starting a new
intent which will show a new layout with all detailed info.

I am getting below issue, can you please help me?

public class Mylocations extends MapActivity {

private static List<LocationInfo> locations;
@Override
public void onCreate(Bundle savedInstanceState) {
------------------
------------------
itemizedOverlay = new HelloItemizedOverlay(this, drawable);
------------------
------------------
}

----------------
----------------
public void showDetailedInfo(Context mContext, int index){
Intent intent = new Intent(mContext, ShowDetailedtInfo.class);
startActivity(intent);
}
----------------
----------------

}

public class HelloItemizedOverlay extends ItemizedOverlay {

public HelloItemizedOverlay(Context context, Drawable defaultMarker)
{
super(boundCenterBottom(defaultMarker));
mContext = context;
}
@Override
protected boolean onTap(int index) {
Mylocations mylocations = new Mylocations();
mylocations .showDetailedInfo(mContext,index);
}

}

When starting new activity @ startActivity(intent);, i am getting the
below error:

08-13 23:30:03.758: WARN/dalvikvm(1528): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-13 23:30:03.758: ERROR/AndroidRuntime(1528): Uncaught handler:
thread main exiting due to uncaught exception
08-13 23:30:03.878: ERROR/AndroidRuntime(1528):
java.lang.NullPointerException
08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at
android.app.Activity.startActivityForResult(Activity.java:2656)
08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at
android.app.Activity.startActivity(Activity.java:2700)
08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at
com.example.Mylocations.showDetailedInfo(Mylocations.java:284)
08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at
com.example.HelloItemizedOverlay$1.onClick(HelloItemizedOverlay.java:
83)


Can You please help me?

Thanks & Regards
Venkat

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

Reply via email to