GoogleMaps: custom ItemizedOverlay and OverlayItem, the correct way to show different marker

非 Y 不嫁゛ 提交于 2019-11-28 22:09:54

Ok, after repeated tests it seems that this:

drawable.setBounds(-drawable.getIntrinsicWidth()/2, -drawable.getIntrinsicHeight(), drawable.getIntrinsicWidth() /2, 0);

placed in the getMarker method of OverlayItem for the drawable that has to ber returned does the job (as boundBottomCenter does in ItemizedOverlay). Now all is working fine, and even the non-default markers are displayed correctly.

Cheers!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!