I am trying to make a marker's window clickable so it can lead to a new view
From previous stackoverflow answers, they have said to use
-(UIView*)mapView:(GMSMapView *)mapView markerInfoWindow:(id<GMSMarker>)marker {
}
However, when I use the method, xcode says "Cannot find protocol declaration for GMSMarker" and highlights
(id<GMSMarker>)
How would I solve this problem?
There is no such protocol as GMSMarker. There is no such method as -(UIView*)mapView:(GMSMapView *)mapView markerInfoWindow:(id<GMSMarker>)marker
in docs either.
GMSMarker
is a class, not a protocol. The existing method - (UIView *) mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker
has pointer to GMSMarker
object as second parameter, not an object conforming to GMSMarker protocol.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.