How to place Xib on google map as marker instead of google map marker icon

I am doing a project in which I add a marker to a google map, but I want to add a custom Xib marker, as I want to add my custom view to a map instead of the default mark.icon google map

I made uiview where I load the image from it and then want to place this UIView on the map

+4
source share
1 answer

For a custom view, you can use iconViewfor as a markerGMSMarker .

- (UIView*) iconView

. , . UIView, . CALayer, , . , , clipToBounds YES, .

.: https://developers.google.com/maps/documentation/ios-sdk/reference/interface_g_m_s_marker.html#aa16a89bd5187e64e71c57c31c150a44d

iconView .

 let marker = GMSMarker()
 marker.iconView = UIView() //Your custom view here
+2

Source: https://habr.com/ru/post/1682114/


All Articles