Fixed
Status Update
Comments
fo...@gmail.com <fo...@gmail.com> #2
th...@google.com <th...@google.com>
fo...@gmail.com <fo...@gmail.com> #3
Can you please supply a short reproduction case? I can't quite see how to reproduce the issue you are seeing, and I have to be able to reproduce it to get engineering to fix it. Thanks!
sa...@gmail.com <sa...@gmail.com> #4
Sure,
1. A simple viewController is shown to the user
2. The user selects an image from the device gallery
2. The South West and North East coordinate bounds are indicated.
3. The rotation is also set
4. The code below is used to show the selected image on the map with rotation.
override func showImageOnMap() {
var southWest = CLLocationCoordinate2DMake(40.712216,-74.22655);
var northEast = CLLocationCoordinate2DMake(40.773941,-74.12544);
var overlayBounds = GMSCoordinateBounds(coordinate: southWest, coordinate: northEast)
// Image from Gallery. The image to be shown is taken from the device gallery
// This short example does not show the procedure to take the image from the
// gallery
var icon = UIImageFromGallery()
var overlay = GMSGroundOverlay(bounds: overlayBounds, icon: icon)
mapView.clear()
overlay.bearing = 47.554
overlay.map = mapView
}
The result is shown in Screenshot_iOS.png.
Let me also indicate that I follow the same procedure in a Android device (using Android API) and the result is the expected one as it is shown in the image attached (Screenshot_Android.png). The image is correctly rotated keeping the relation aspect. Comparing the two screenshots, you can see the effect I am indicating in this issue.
Let me know if you require more information to reproduce the issue
1. A simple viewController is shown to the user
2. The user selects an image from the device gallery
2. The South West and North East coordinate bounds are indicated.
3. The rotation is also set
4. The code below is used to show the selected image on the map with rotation.
override func showImageOnMap() {
var southWest = CLLocationCoordinate2DMake(40.712216,-74.22655);
var northEast = CLLocationCoordinate2DMake(40.773941,-74.12544);
var overlayBounds = GMSCoordinateBounds(coordinate: southWest, coordinate: northEast)
// Image from Gallery. The image to be shown is taken from the device gallery
// This short example does not show the procedure to take the image from the
// gallery
var icon = UIImageFromGallery()
var overlay = GMSGroundOverlay(bounds: overlayBounds, icon: icon)
mapView.clear()
overlay.bearing = 47.554
overlay.map = mapView
}
The result is shown in Screenshot_iOS.png.
Let me also indicate that I follow the same procedure in a Android device (using Android API) and the result is the expected one as it is shown in the image attached (Screenshot_Android.png). The image is correctly rotated keeping the relation aspect. Comparing the two screenshots, you can see the effect I am indicating in this issue.
Let me know if you require more information to reproduce the issue
br...@google.com <br...@google.com> #5
I'm attempting to replicate this issue given your sample code, but I'm not seeing it.
I've put up my repro code athttps://github.com/domesticmouse/DistortedGMSGroundOverlay
Please modify this sample until you get the distortion, and then create a Pull Request back to me.
Thanks!
I've put up my repro code at
Please modify this sample until you get the distortion, and then create a Pull Request back to me.
Thanks!
Description
When the polylines are using gradient spans, the line color changes as zoom level changes.
Steps to reproduce:
1. Download Google Maps SDK for iOS 1.7.0
2. Unzip and open SDKDemos project in Xcode (GoogleMapsSDKDemos/SDKDemos.xcodeproj).
3. Open SDKDemoAPIKey.h and set API key.
4. Open and modify GradientPolylinesViewController.m:
a. In GradientPolylinesViewController.m, in -viewDidLoad, add this after the last line:
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(TimerCallback:) userInfo:nil repeats:true];//leaks self, but for testing only, so who cares
b. In the same class, create a new method:
- (void)TimerCallback:(NSTimer*)timer
{
static int Counter=0;
static double ZoomArray[] = {13.5, 13.1, 13.45, 12.9};
[mapView_ animateToZoom:ZoomArray[(++Counter)%4]];
}
This makes the camera auto adjusts by itself.
6. Start the app. In the main menu, the title says "Maps SDK Demos: 1.7.0.7198".
7. Choose "Gradient Polylines". Do not move the camera.
As the zoom level is adjusted, you can see that the line segments change colors based on zoom level.
If you want to make it appear more apparent,
8. In GradientPolylinesViewController.m, -gradientSpans, change the value of hue from
(float)elevation/700
to
i/50%2/2.0*0.7
In addition to iPhone, it can also be reproduced on iPad, except that we have to zoom closer, so we use
ZoomArray[(++Counter)%4]+1
instead of
ZoomArray[(++Counter)%4]
I'm not sure if it is actually a bug, or is it by-design, that the engine is trying to do some kind of optimization, but it doesn't really look like optimization to me because in this demo, the entire polyline is always within the camera bounds anyway.
I'm not sure if it is related to
Version numbers:
Google Maps SDK for iOS version: 1.7.0 (1.7.0.7198)
Build: Xcode 5.0.2 on Mac OS 10.9.1
Run: iOS Simulator - iPhone Retina (3.5-inch) - iOS 6.0
Run: iOS Simulator - iPhone Retina (3.5-inch) - iOS 7.0
Run: iPhone 5 - iOS 7.0.4
Run: iPad 2 - iOS 7.0.4
*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************