My code:
Point p1 = supportMapFragment
.getMap()
.getProjection()
.toScreenLocation(new LatLng(20,20));
The problem is p1
returns like: Point(0, 0)
. There is a solution here, but that's useless for me. I keep that points in an arrayList
. When I want to bring points from inside arrayList
, it returns []
. I think the reason of that waiting the addOnGlobalLayoutListener
. For this reason I should to find another and fast solution to get true values of points.