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.
Related
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
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.
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.
I am using google maps sdk in ios. Can we place a image in the info window which pop up when user taps the marker.
Usually infowindow provides a title and a snippet for some description. But i want to insert a image related to that place in that info window. how to do that in ios
Try to put it inside a
infowindow.setContent('<div><img src="rute.jpg>"');
infowindow.open(map,marker);
I hope it helps.
Check out the google maps API documentation too, there's a lot of infomration.
https://developers.google.com/maps/documentation/javascript/
Okay, so we have an app written in objective-c for iOS. My job is to rewrite it using html/css/javascript and phonegap as a multiplatform app for ios and android.
Part of the existing objective-c app works like this: you select an item off a list, and it loads an embedded map from ios's built-in maps (not google maps) and puts a marker on the map where that item is. You can tap on the marker and it brings up a little info box with a button to "See more info," which if pressed takes you to a separate part of the app with information regarding the item.
This is the part I'm trying to get working in html/css right now, and I don't even know if that's possible.
So here's my question: can that be done using the google maps api, the whole embedding functionality into the map? i need that little info box which brings me back to the app; that's the crucial portion. Does anyone know whether this is possible, and whether there are any good references, examples, or tutorials to help out?
In the Google Maps API you can add Markers.
You can add a "click" event listener to the Marker where you can then open an InfoWindow.
In the InfoWindow, you can place some HTML, including a link or button that invokes a JavaScript function that will take you to the next screen of your web app.