gmsmapview

GMSMapView animateToCameraPosition zoom in - zoom out animation

安稳与你 提交于 2019-12-01 03:34:05
问题 I am using Google maps services in iOS (Swift) and Android. In android, the map view has a method called animatreCamera that has an animation in which the movement has a "zoom out - zoom in" effect (if both cameras have the same zoom, the map view will zoom out the first part of the movement and then zoom in the second part). I want to achieve this effect with the GMSMapView in iOS, I have tried te following methods: animateToCameraPosition , animateToLocation , animateWithCameraUpdate ,

Rotate GMSMarker in direction at which user facing

落花浮王杯 提交于 2019-11-30 03:28:59
I have requirement like on my current location one view will display. It will rotate if device was rotate or location will be change.I research lot but got all the code which have a fix location or angle at some location but i haven't fix location. Can anyone drive me at right direction. I also used rotation property of the GMSMarker but it is not working. - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading { if (newHeading.headingAccuracy < 0){ NSLog(@"heading accuracy < 0"); return; } // Convert Degree to Radian and move the needle float oldRad = (-

How do I move marker along with moving of Google Map in iOS?

好久不见. 提交于 2019-11-30 01:27:49
I am displaying a marker in a particular place, along with displaying the current address in the address label on Google Maps. Now, I want to change the location by moving the Google Map, but the problem is that when I am moving the map, I should simultaneously move the marker along with the map, and I should display the address of that location in the address label. How can I do that? I tried this: let destinationMarker = GMSMarker(position: self.destinationLocation.coordinate) let image = UIImage(named:"sourcemarker") destinationMarker.icon = image destinationMarker.draggable = true

Rotate GMSMarker in direction at which user facing

走远了吗. 提交于 2019-11-29 01:06:22
问题 I have requirement like on my current location one view will display. It will rotate if device was rotate or location will be change.I research lot but got all the code which have a fix location or angle at some location but i haven't fix location. Can anyone drive me at right direction. I also used rotation property of the GMSMarker but it is not working. - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading { if (newHeading.headingAccuracy < 0){ NSLog

How do I move marker along with moving of Google Map in iOS?

孤街浪徒 提交于 2019-11-28 21:33:01
问题 I am displaying a marker in a particular place, along with displaying the current address in the address label on Google Maps. Now, I want to change the location by moving the Google Map, but the problem is that when I am moving the map, I should simultaneously move the marker along with the map, and I should display the address of that location in the address label. How can I do that? I tried this: let destinationMarker = GMSMarker(position: self.destinationLocation.coordinate) let image =

How do I prevent 'GMSMapView' from Infinite horizontal scrolling?

给你一囗甜甜゛ 提交于 2019-11-28 09:56:54
问题 How do I prevent 'GMSMapView' on IOS 7 from Infinite horizontal scrolling? I am using a 'MKTileOverlay' and 'kGMSTypeNone' to show a custom image which stretches all over the world. (When the user scrolls to the left the image is repeated again. I would like the scrolling to stop here.) 回答1: Hmm, my initial idea would be to use delegate method - (void)mapView:(GMSMapView *)mapView willMove:(BOOL)gesture; to move the camera back when your scrolling limit is reached. Using this, your map view

Replace blue dot in GMSMapView by an arrow - Swift

大憨熊 提交于 2019-11-27 22:49:33
问题 I use the Google SDK for an application iOS8 (Swift). I want to replace the blue dot (my location) in a GMSMapView by an arrow witch rotate according to the orientation of the smartphone. How can I do that? EDIT : I managed to see my arrow but I have three problems : 1 : The arrow is cut and I do not find as enlarge the area 2 : The position of the arrow is not exactly on my location I solve this problem by delete "0,5" : CGContextTranslateCTM(context, size.width, size.height) 3 : The

How to force refresh contents of the markerInfoWindow in Google Maps iOS SDK

℡╲_俬逩灬. 提交于 2019-11-27 13:32:32
I'm returning a UIImageView in - (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker; This UIImageView loads images dynamically through a URL using SDWebImage . As the documentation says about marker info windows: Note: The info window is rendered as an image each time it is displayed on the map. This means that any changes to its properties while it is active will not be immediately visible. The contents of the info window will be refreshed the next time that it is displayed. The point is that after downloading the image the info window doesn't refresh and keep

How to get animated polyline route in GMSMapView, so that it move along with map when map is moved?

元气小坏坏 提交于 2019-11-27 03:51:33
I have created animated polyline like CAShapeLayer by following code, I have added CAShapeLayer as sublayer to GMSMapiew but, if I move the map the layer won't moves. where to add the layer, so that it move along with map? func layer(from path: GMSPath) -> CAShapeLayer { let breizerPath = UIBezierPath() let firstCoordinate: CLLocationCoordinate2D = path.coordinate(at: 0) breizerPath.move(to: self.mapView.projection.point(for: firstCoordinate)) for i in 1 ..< Int((path.count())){ print(path.coordinate(at: UInt(i))) let coordinate: CLLocationCoordinate2D = path.coordinate(at: UInt(i))

How to force refresh contents of the markerInfoWindow in Google Maps iOS SDK

坚强是说给别人听的谎言 提交于 2019-11-26 18:18:03
问题 I'm returning a UIImageView in - (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker; This UIImageView loads images dynamically through a URL using SDWebImage . As the documentation says about marker info windows: Note: The info window is rendered as an image each time it is displayed on the map. This means that any changes to its properties while it is active will not be immediately visible. The contents of the info window will be refreshed the next time that it is