android - How to display balloon on the MapView, once map is shown? -


i use android-mapviewballoons library show balloons. so, once user clicks on marker, balloon shown.

the question have: how display balloon particular item without waiting user click?

upd. how identify i? have following:

public class map extends mapactivity {     public void oncreate(bundle savedinstancestate) {         // here have extras.getdouble("lat") , extras.getdouble("lng") -          // location balloon should shown         ...         itemizedoverlay = new mapoverlay(drawable, mapview);         (int = 0; < items.getcount(); i++) {            // here add markers, 1 of them have lat , lng equal             // values passed in extras      public class mapoverlay extends balloonitemizedoverlay<overlayitem> {         ...         protected overlayitem createitem(int i) { 

also, regards following code:

//  balloonoverlayview raw type. references generic type balloonoverlayview<item> should parameterized balloonoverlayview bov = new balloonoverlayview(context, 50); // item there? should getitem(i)? bov.setdata(item); // method setposition(int) undefined type balloonoverlayview balloonoverlayview.setposition(i); 

plase refer this tutorial.

in @override protected overlayitem createitem(int i) method can inflate ballon ovarlay particular index. suppose specific point 2 can following in above method

if(i==2){ balloonoverlayview bov = new balloonoverlayview(context, 50);           bov.setdata(item);           balloonoverlayview.setposition(i);           balloonoverlayview.setgeopoint(geopoint);            mapview.layoutparams params = new mapview.layoutparams(layoutparams.wrap_content, layoutparams.wrap_content, geopoint,mapview.layoutparams.bottom_center);           params.mode=mapview.layoutparams.mode_map;           mapview.addview(bov, params); } 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -