marcick Well-Known Member Licensed User Longtime User Jan 29, 2016 #1 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 ?
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 Jan 31, 2016 #2 Add this code to GoogleMapsExtra class: Code: Copy '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
Add this code to GoogleMapsExtra class: Code: Copy '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
marcick Well-Known Member Licensed User Longtime User Jan 31, 2016 #3 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
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.
Erel B4X founder Staff member Licensed User Longtime User Jan 31, 2016 #4 Here: https://developers.google.com/maps/documentation/ios-sdk/reference/interface_g_m_s_marker Upvote 0
marcick Well-Known Member Licensed User Longtime User Jan 31, 2016 #5 Erel said: Here: https://developers.google.com/maps/documentation/ios-sdk/reference/interface_g_m_s_marker Click to expand... Uhm... I just can guess I can add this also: Code: Copy Public Sub SetInfoWindowAnchor(Marker As Marker, X As Double, Y As Double) Dim m As NativeObject = Marker m.RunMethod("setInfoWindowAnchor:", Array(m.MakePoint(X, Y))) End Sub Is it correct? But all the rest is over my capabilities... Upvote 0
Erel said: Here: https://developers.google.com/maps/documentation/ios-sdk/reference/interface_g_m_s_marker Click to expand... Uhm... I just can guess I can add this also: Code: Copy Public Sub SetInfoWindowAnchor(Marker As Marker, X As Double, Y As Double) Dim m As NativeObject = Marker m.RunMethod("setInfoWindowAnchor:", Array(m.MakePoint(X, Y))) End Sub Is it correct? But all the rest is over my capabilities...
Erel B4X founder Staff member Licensed User Longtime User Feb 1, 2016 #6 marcick said: Is it correct? Click to expand... Yes. Upvote 0