How to show temperature of all countries in info window inside map in Android? -
currently working on weather application, in getting temperature of countries , need show temperature in info window inside map. 1 info window showing @ time, need show multiple info window, how accomplish ?
googlemap.setinfowindowadapter(new infowindowadapter() { @override public view getinfowindow(marker arg0) { view v = getlayoutinflater().inflate(r.layout.infowindow, null); return v; } @override public view getinfocontents(marker arg0) { return null; } }); marker marker = googlemap.addmarker(new markeroptions().position(new latlng(23.48225949, 83.24252575)) .icon(bitmapdescriptorfactory.fromresource(r.drawable.marker))); marker.showinfowindow();
you make icon markers hold information need instead of relying on showing information throught info window. can accomplished dynamically creating bitmap each marker includes whatever text want via canvas.
to avoid doing tha work try using google maps utility library , see here example on how use custom marker adapter. it's bit of work, nice library , clustering nice :)
Comments
Post a Comment