iOS Question Set Padding Values in GoogleMap View

Mr.Coder

Member
Licensed User
Longtime User
Hi,

I use GoogleMap view in my app and i want to change the padding property values, I tried this code :


B4X:
   Dim no As NativeObject = Me
   Dim ngm As NativeObject = gm
   Dim EdgeInsets As NativeObject = no.MakeEdgeInsets(50,50,50,50)
   ngm.SetField("Padding", EdgeInsets)

but nothing happended.


thank you.
 

Mr.Coder

Member
Licensed User
Longtime User
Thank you Erel, What I'm trying to do is move the Google logo from the bottom of the map to a higher postion, Because I want to show a view at the bottom of the map and I don't want to cover the Google logo, How can I doing that.
 
Upvote 0

Mr.Coder

Member
Licensed User
Longtime User
Upvote 0

Mr.Coder

Member
Licensed User
Longtime User
Hi Erel,

I did the implemention this way :

B4X:
Sub SetGoogleMapPadding(gMapView As GoogleMap,gTop As Float,gLeft As Float,gBottom As Float,gRight As Float)
    Try       
    Dim NO As NativeObject = Me
    NO.RunMethod("SetMapPadding:::::", Array As Object(gMapView,gTop,gLeft,gBottom,gRight)) 
    Return
    Catch     
         'Log(LastException)     
         Return     
    End Try
End Sub

#If OBJC
- (void) SetMapPadding:(GMSMapView *)gMapView :(float)gTop :(float)gLeft :(float)gBottom :(float)gRight {
   UIEdgeInsets mapInsets = UIEdgeInsetsMake(gTop, gLeft, gBottom, gRight);
   gMapView.padding = mapInsets;
   }
#End If

And it works fine. Does this inline code need to import any library?.

Thank you.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…