gmsmapview

Why I need to tap twice a GMSMarker when it is overlapping a GMSOverlay to show its info window?

佐手、 提交于 2021-01-28 04:43:06
问题 I have an GMSOverlay in a GMSMapView, so I listen to taps into it with the method: func mapView(_ mapView: GMSMapView, didTap overlay: GMSOverlay) { // Overlay was tapped } Then I want a GMSMarker to be painted over the GMSOverlay, and I listen to taps into it with the method: func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool { // Marker was tapped return false } Every time the listener of the marker is called, its info window hides (if it's shown) or shows (if it's hidden

Custom Marker in Google Map in swift

本秂侑毒 提交于 2020-02-27 12:42:11
问题 I'm trying to show my custom view on click of pin in google map. I have mad my custom view for it in xib file and call that file in the delegate method of func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool { But when i run the app and tap the marker it does not show my view. How can i show this? This is my code for custom Xib file, class MapMarkerWindow: UIView { @IBOutlet weak var saloonImage: UIImageView! @IBOutlet weak var nameLbl: UILabel! @IBOutlet weak var addressLbl:

Limit camera only on a ground overlay? Google Map Android API v2

独自空忆成欢 提交于 2020-02-15 08:07:06
问题 I'm trying to show a ground overlay with markers on it to my users. I'm trying to restrain the view to only this image placed on the map. I want the user to only see the image as a ground overlay placed on the map and not be able to go to the surrounding map. And if they go over the edge, the gestures will be blocked. I want something like this: I don't want this: show-only-ground-overlays-map-android or this: I tried to set my map.setLatLngBoundsForCameraTarget() to my image bounds but the

Cant interact with custom infowindow in google map

半腔热情 提交于 2020-01-14 03:29:14
问题 I have a google map and I've created a custom info window for my markers. I've put a couple buttons on the window, but I can't interact with them for the life of me. Here is my custom view: class MarkerWindowView: UIView, UIGestureRecognizerDelegate { //@IBOutlet weak var thumbNail: UIImageView! @IBOutlet weak var userName: UILabel! @IBOutlet weak var videoLocation: UILabel! @IBOutlet weak var tags: UILabel! override func awakeFromNib() { println("awake From Nib") self.userInteractionEnabled

Cant interact with custom infowindow in google map

≡放荡痞女 提交于 2020-01-14 03:29:10
问题 I have a google map and I've created a custom info window for my markers. I've put a couple buttons on the window, but I can't interact with them for the life of me. Here is my custom view: class MarkerWindowView: UIView, UIGestureRecognizerDelegate { //@IBOutlet weak var thumbNail: UIImageView! @IBOutlet weak var userName: UILabel! @IBOutlet weak var videoLocation: UILabel! @IBOutlet weak var tags: UILabel! override func awakeFromNib() { println("awake From Nib") self.userInteractionEnabled

GMSMapView tracking mode heading

六眼飞鱼酱① 提交于 2020-01-03 05:41:08
问题 In my app, I am using GMSMapView , and I would like to change tracking mode. In iOS MapKit, I can change the tracking mode to MKUserTrackingModeFollowWithHeading , but don't know how to change it in GMSMapView . In the app Google Maps , it is working after second touch on myLocationButton . Is it possible? 回答1: For continuously changing the camera with the current location, you will need to update the GMSCamera for google maps to current location. You can do it in Location Manager delegate

How to apply animations to GMSMarker

眉间皱痕 提交于 2020-01-02 05:21:08
问题 I’m changing my app by migrating iOS maps to google maps using Google Maps SDK for iOS V1.1.0 and I’m trying to animate the markers while adding/removing but I didn’t find any suggestions in the documentation related to this, Please suggest me how to perform the animations on GMSMarkers 回答1: In the GMSMarker Class Reference, it says, for the appearAnimation property: Controls the animation used when this marker is placed on a GMSMapView (default kGMSMarkerAnimationNone , no animation). Using

how to show markers only in gmscircle region otherwise hide in ios

送分小仙女□ 提交于 2020-01-01 20:06:23
问题 how to show markers only in GMSCirle region otherwise hide in iOS , I have created GMSCirle using google maps, now I wanna display markers only on the region of GMSCirle otherwise hide markers. here is my code : GMSMarker *centerPoint=[GMSMarker markerWithPosition:CLLocationCoordinate2DMake(16.301687, 80.419235)]; centerPoint.icon=[UIImage imageNamed:@"PinImage.png"]; circ.fillColor = [UIColor colorWithRed:0.25 green:0 blue:0 alpha:0.05]; circ.strokeColor = [UIColor blackColor]; circ

Follow user location on google maps

拥有回忆 提交于 2020-01-01 19:44:48
问题 I have google maps sdk on ios and enabled userlocation = yes. I want to get the user location via GPS when he moves. I could not find any method in document that returns me location updates as the user keeps moving. I want to keep my user in center of the screen by continuously then updating the camera using these location. Any points on this? There is a method didchangecameraposition which updates when i apply gestures on maps, but not when the gps gets updated. 回答1: You cannot do it totally

infowindow not displaying with marker in didTapAtCoordinate method

半世苍凉 提交于 2019-12-24 05:10:22
问题 i am trying to show infowindow and marker both simultaneously. code -(void)set_markerOnMap:(double)lat longitude:(double)lon{ GMSMarker *marker = [[GMSMarker alloc] init]; marker.title = @"Location selected"; marker.position = CLLocationCoordinate2DMake(lat, lon); marker.snippet = @"Testing"; marker.icon=[UIImage imageNamed:@"red-pin.png"]; marker.map = self.MyMapView; [self.MyMapView setSelectedMarker:marker]; } - (void)viewDidLoad { [super viewDidLoad]; [self set_markerOnMap:21.214894