Question

I have been searching and coding with the Google Maps iOS SDK 1.7.2

I need to build an app that displays custom InfoWindow after the marker is tapped.

Google posted a YouTube Video, that shows how to do it with just ONE marker.

The practical use scenario uses more than ONE marker, but if we follow the example of YouTube Video adding more than one marker, all the markers would show the same info inside the custom InfoWindows.

I did a iOS sample and uploaded to GitHub Sample Here

My Question is: Could anyone download the sample at GitHub and help me to implement that feature, display more than one marker with custom InfoWindow displaying different info for each marker ? In my sample inside the InfoWindow there is a WebView. For my use scenario I would need to load for each marker a different WebView(url) for each marker on the map but I couldn't load the WebView inside the custom InfoWindow. That WebView would be the size of the custom InfoWindow.I would load all the info for the markers as different webpages in the size of the info window.

It also would help a lot of other people that right now can't find a complete and fully working sample of that custom InfoWindow for iOS.

Thanks and Cheers!

Was it helpful?

Solution

Another vote for SMCalloutView. Check out my answer here for a quick start on implementing it.

Sorry to not actually answer your question per se, but Google's rendered UIView info windows are more hassle than they're worth, I think. You may be able to get a webview to load inside one of them, but the Maps SDK takes the custom UIView you set and then renders it into OpenGL, ignoring most (all?) updates you try to make.

Using SMCalloutView skips all of that and we put its view on top of the map, allowing you better control before and after drawing.

OTHER TIPS

SMCalloutView helps you to custom the InfoWindow, you can download the Sample project and run it.

For displaying multiple InfoWindows, you have to treat GoogleMaps SDK (GMSMapView has a @property(nonatomic, strong) GMSMarker *selectedMarker property, which is not a Set), see the Sample project, in mapView:didTapAtMarker: delegate method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top