iOS Question IGoogleMaps Marker anchor point

marcick

Well-Known Member
Licensed User
Longtime User
I was using in B4A (GoogleMapsExtras) a parameter to offset the anchor point of a marker because I need it centered on the bitmap.
How can I obtain this in B4I ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Add this code to GoogleMapsExtra class:
B4X:
'Sets the icon anchor. Both values should be between 0 to 1.
Public Sub SetGroundAnchor(Marker As Marker, X As Double, Y As Double)
   Dim m As NativeObject = Marker
   m.RunMethod("setGroundAnchor:", Array(m.MakePoint(X, Y)))
End Sub
https://www.b4x.com/android/forum/threads/56871/#content
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Thank you so much, Erel.
Would be much interesting to know, if not so difficult, where did you look into to find the function and implement it in b4i.
It seems easy to add a sub to call an existing method and maybe there are other useful functions in googlemap.
 
Upvote 0
Top