InfoWindows on Markers in StreetView - iOS, Swift - ios

I'm trying to add a Marker with an Infowindow attached to it in Streetview view. I'm using XCode and developing for iOS. I successfully created the marker following this guide, but failed to add the Infowindow. According to developers.google.com, not all marker features are available when using GMSPanoramaView, but in a thread in this forum a user claims that he was able to do it in Javascript - and i know nothing of Javascript. I've searched everywhere on the web, but there is almost nothing regarding this issue, plus dev.google does not mention it at all, i'm stucked on this for about two days, so is this really possible? Any help is really appreciated.
EDIT: My first try was using marker.title property, which is able to display the infowindow in MapView but still not in PanoramaView.
The closest thing to an Infowindow that i was able to add was a UIImageView which appears when the marker is tapped. I implemented the GMSPanoramaViewDelegate protocol and used didTapMarker method to achieve this, see https://developers.google.com/maps/documentation/ios-sdk/reference/protocol_g_m_s_panorama_view_delegate-p.html#a51b56fb6bb2cc49ee5142cd1d4f20ec4.

Related

How to implement clickable info-bubble on tap of marker in HERE maps in iOS?

I have integrated HERE maps successfully in my iOS app, but now I am facing an issue in implementing info-bubble on tap of markers on HERE map.I have searched on HERE documentation for iOS SDK, but can't find anything relevant. There are many solutions for JS, but nothing for iOS.
This feature doesn't seem to exist on iOS and Android. In order to create a similar behaviour in iOS, you should use NMAMapOverlay instead and add your own subviews/styling to it.
The iOS SDK documentation states that NMAMapOverlay can be used to display custom UIView-based content at a fixed location on the map. (...) Then, give the overlay a NMAGeoCoordinates location and add it to a map. The overlay will automatically be repositioned on the screen as the map moves.
You can find more information about the best practices for the implementation here:
https://developer.here.com/documentation/ios-premium/3.15/api_reference_jazzy/Classes/NMAMapOverlay.html

swift - update directions when user moves

I am writing an app where a user can select a location and then it will display the directions to it on the map. This functionality works fine, however I need the route to update on the map as the user moves. Currently I am using the didupdatelocations method and creating a new direction line from the new user location, however this results in the polyline being completely redrawn. I am trying to find a way to update the directions as the user moves similar to how apple maps/google maps does this. I do not want to use the navigation window if possible.
I am using the Apple mapKit.
i have looked for similar problems this one with google maps but there have been no replies.
I have seen another example (sorry cannot find link again) which makes an array of all the coordinates in the polyline although im not sure where i would use this or how to use this to slice or remove the unwanted part of the polyline.
At the moment my code does remove all overlays when a new direction is called, but if the overlays are not removed then I will end up with loads of lines on the map. I have tested removing the first polyline after the second polyline is created but that doesn't seem a very efficient way of dealing with this.
would appreciate any suggestions.

Is it possible to change a route by dragging its polyline in a GMSMapView?

I'm currently working on an app using the latest version of the Google Maps SDK for iOS and I've been wondering if it's possible to achieve the same "drag and drop" feature available in the web version of Google Maps to get a custom route.
After completely reading the official documentation I still haven't found an answer or guidance related to this feature, so any help will be appreciated.
Enabling the drag and drop feature can be done by creating an instance of GMDraggableMarkerManager and sets itself as the delegate in order to be notified of drag events.
Steps given in google-maps-sdk-ios-drag-drop are as follows:
To initialize the drag & drop functionality you have to import
the GMDraggableMarkerManager.h in your UIViewController displaying
the map.
Create a property for the GMDraggableMarkerManager.
After the initialization of the Google Maps View you have to
initialize the draggableMarkerManager.
Please note that to fully implement drag and drop feature, a long press on the marker enables you to drag it around and set it to another position
This SO post -
How to implement GMSMarker drag drop on GMSMapView? might also help.

iOS Custom InfoWindow Google Maps SDK 1.7.2

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!
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.
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.

frame for the MKPolygonView is [[0,0][0,0]], or a dot, when adding a kml overlay to a MKMapView

I am creating an iOS application for an iPhone, and am trying to add overlays on top of my map view. I am using Google Earth to create the paths that I want to use, and followed apples KMLViewer demonstration. The kml file seems to be parsed correctly according to apples instructions, and my code does not crash, but the frame MKPolygonView that is returned is [[0,0],[0,0]] and obviously is not displaying my path on the MapView.
Been trying to research and find a solution for a while with no luck.
Thanks in advance if anyone can help.

Resources