ios - Position GMSMarker on bottom when clicked -


when gmsmarker clicked , infowindow opened camera moves point gmsmarker @ center of gmsmapview. how change camera move position marker @ bottom when moved?

when implement gms didtapmarker delegate method without infowindow fine:

func mapview(mapview: gmsmapview, didtapmarker marker: gmsmarker) -> bool {      var point = mapview.projection.pointforcoordinate(marker.position)     point.y = point.y - 200      let camera = gmscameraupdate.settarget(mapview.projection.coordinateforpoint(point))     mapview.animatewithcameraupdate(camera)      return true } 

it positions marker on bottom. if return false shows infowindow , marker centered again.

mapview.selectedmarker = marker missing in didtapmarker delegate method. method should this:

func mapview(mapview: gmsmapview, didtapmarker marker: gmsmarker) -> bool {      var point = mapview.projection.pointforcoordinate(marker.position)     point.y = point.y - 150      let camera = gmscameraupdate.settarget(mapview.projection.coordinateforpoint(point))     mapview.animatewithcameraupdate(camera)     mapview.selectedmarker = marker     return true } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -