A simple questions about OverlayItem. I my map android application, tapping on a location, I would show some info like: name, infoq, info2, info3. So I extend the OverlayItems:
public class NewOverlayItem extends OverlayItem {
public NewOverlayItem(GeoPoint point, String title, String snippet1, String snippet2, String snippet3) {
super(point, title, snippet1);
}
}
and I use it :
NewOverlayItem overlayitem = new NewOverlayItem(geo, name, oferta, horario, info);
Now I don't know how use the itemizedOverlay.addOverlay(overlayitem); in order to show the news snippet.
I have change the definition class:
public class MyOverlay extends ItemizedOverlay<MyOverlayItem> {
...}
but the map still show only the first one snipped.
Tx in advance.
Well, you can extend it to store
info2andinfo3. You will have to arrange to display the data.Just make sure your
ItemizedOverlayuses the same type. So, if you extendOverlayItemto createDoxsiOverlayItem, yourItemizedOverlaydeclaration would useItemizedOverlay<DoxsiOverlayItem>instead ofItemizedOverlay<OverlayItem>.