Use of Unresolved Identifier ‘GMSServices’
I have solved the problem by “import GoogleMaps” in the AppDelegate.swift.
I have solved the problem by “import GoogleMaps” in the AppDelegate.swift.
NSString *urlString = [NSString stringWithFormat: @”%@?origin=%f,%f&destination=%f,%f&sensor=true&key=%@”, @”https://maps.googleapis.com/maps/api/directions/json”, mapView.myLocation.coordinate.latitude, mapView.myLocation.coordinate.longitude, destLatitude, destLongitude, @”Your Google Api Key String”]; NSURL *directionsURL = [NSURL URLWithString:urlString]; ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:directionsURL]; [request startSynchronous]; NSError *error = [request error]; if (!error) { NSString *response = [request responseString]; NSLog(@”%@”,response); NSDictionary *json =[NSJSONSerialization JSONObjectWithData:[request responseData] options:NSJSONReadingMutableContainers error:&error]; GMSPath *path =[GMSPath pathFromEncodedPath:json[@”routes”][0][@”overview_polyline”][@”points”]]; GMSPolyline *singleLine … Read more
From what I can tell, they are not using 3D objects. They are also not animating between 400 images of a car at a different angle. They’re doing a mix of rotating image assets and animating between ~50-70 images of a car at different angles. The illusion is perfect because it really does look like … Read more
To understand the underlying concept of this double map solution, please have a look at this WWDC 2011 video (from 22’30). The Map kit code is directly extracted from this video except a few things that I described in a few notes. The Google Map SDK solution is just an adaptation. Main idea: a map … Read more
Based on other answers, here are three ways that actually work. Put a view on the XIB and change its class to GMSMapView in XIB builder. See *map1 below. Or… Code it all. Add the map as a subview of the main view. See *map2 below. Or… Add the map as a subview of another … Read more
why don´t you try to use google API for direction, based on basic http requests. https://developers.google.com/maps/documentation/directions/ . (check the conditions on licensing and nº of requests). And then plot the the data with IOS MKPolyline. i´m Sure you will have better performance. And you will only depend on google for the positioning data. to convert … Read more
You will want to use the markerInfoWindow delegate method along with setting the infoWindowAnchor. When you create your marker, set the anchor: GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = MARKER_POSITION; marker.infoWindowAnchor = CGPointMake(0.44f, 0.45f); marker.icon = [UIImage imageNamed:@”CustomMarkerImageName”]; then create the delegate method: – (UIView *)mapView:(GMSMapView *)mapView markerInfoWindow:(GMSMarker *)marker { InfoWindow *view = [[[NSBundle … Read more
– (void)focusMapToShowAllMarkers { GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] init]; for (GMSMarker *marker in <An array of your markers>) bounds = [bounds includingCoordinate:marker.position]; [<yourMap> animateWithCameraUpdate:[GMSCameraUpdate fitBounds:bounds withPadding:30.0f]]; } UPDATE: are you sure there is nothing wrong in you array of markers and the coordinates? I’ve tried this code and is working perfectly. I’ve put this on … Read more
The instructions are kinda lacking. Launch Xcode (easy) Drag the GoogleMaps.framework bundle to the Frameworks group of your project. When prompted, select Copy items into destination group’s folder. Right-click GoogleMaps.framework in your project, and select Show In Finder. What it doesn’t say is…Then go into the child folder called Resources Drag the GoogleMaps.bundle from the … Read more
I got this answer from pressinganswer.com, i think it may helps you. As currently I cannot use the “position” keypath for animating, I ended up animating it using the “latitude” and “longitude” keypaths separately. First calculate the points and add them to 2 separate arrays, one for latitude value (y) and one for longitude (x) … Read more