I have quite some trouble to get the markers to show up for some
reasons.
This is what i have done:
public void addOverlayBusinessItems()
{
Drawable defaultMarker = getResources().getDrawable
(R.drawable.pin);
defaultMarker.setBounds(0, 0, defaultMarker.getIntrinsicWidth(),
defaultMarker.getIntrinsicHeight());
myMapView.getOverlays().add(new MyItemizedOverlay
(defaultMarker));
myMapView.postInvalidate();
}
class MyItemizedOverlay extends ItemizedOverlay<OverlayItem>
{
//create a list of overlay items from the JSON response we get
from Yelp
private List<OverlayItem> mItemList = new ArrayList<OverlayItem>
()
public MyItemizedOverlay(Drawable defaultMarker)
{
super(defaultMarker);
GeoPoint gp = new GeoPoint(5309691, 8851933);
mItemList.add(gp, "test", "first marker");
populate();
}
@Override
protected OverlayItem createItem(int index)
{
return mItemList.get(index);
}
@Override
public int size()
{
return mItemList.size();
}
}
yet nothing shows up on the my mapview. Are there more that i need to
do?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---