2

Say you have a fixed pin in the middle of the screen using an UIImageView on top of the GMSMapView. At some point in the flow I need to remove the fixed pin and add it as a marker in the map.

One could do so by setting the fixed pin hidden property to true and then adding a GMSMarker in the center of the map using the same asset as the UIImageView. That works except that there is a visual glitch since adding the marker touches the OpenGL layer whether hiding the pin uses UIKit.

Is there any way to synchronize these two operations?

genpfault
  • 51,148
  • 11
  • 85
  • 139
fz.
  • 3,233
  • 22
  • 20

1 Answers1

1

Not really. See this question for a discussion on OpenGL-UIKit syncing — the conclusion is that Apple has access to the private CAEAGLLayer.synchronized and nobody else does.

This is part of the reason why Google limits their SDK map views to 30fps, I'd imagine. Developing on top of a third-party SDK especially limits your syncing possibilities, as you have no/extremely-limited access to GLKView, CAEAGLLayer, or EAGLContext.

I'd suggest investigating Mapbox GL for iOS if you're looking for more wiggle-room and openness. See this issue about ongoing efforts to improve inter-layer view syncing.

Community
  • 1
  • 1
friedbunny
  • 2,421
  • 1
  • 23
  • 38