Hello,
I'm going through that tutorial and find a mistake here:
http://developer.android.com/resources/tutorials/views/hello-mapview.html
the line
HelloItemizedOverlay itemizedoverlay = new
HelloItemizedOverlay(drawable);
has to be changed to
HelloItemizedOverlay itemizedoverlay = new
HelloItemizedOverlay(drawable, this);
if you don't want to get ForceCloses everytime clicking on an Icon in
that MapView
(a NullPointerException iss triggered, since mContext isn't
initialized correctly while trying to get the AlertDialog.Builder)
I would also suggest to change the second Constructor from
public HelloItemizedOverlay(Drawable defaultMarker, Context context) {
super(defaultMarker);
mContext = context;
}
to
public HelloItemizedOverlay(Drawable defaultMarker, Context context) {
this(defaultMarker);
mContext = context;
}
This can be very irritating for new Devs trying to get a working
MapView
--
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