-
iOS : White images on map annotations
Hello,
I have strange bug with representing map
From time to time I see white images on places, where must be my annotations
iOS 8.1
IMG_1736.jpg IMG_1735.jpg IMG_1734.jpg
Please, could you help me with this problem
-
Dev platform evangelist
Could you share with us the code you are using to add the annotation?
And please add also the image file you are using as an icon.
-
SKAnnotation *annotation;
annotation = [SKAnnotation annotation];
annotation.identifier = tag;
annotation.location = CLLocationCoordinate2DMake([[coordinateArray lastObject] floatValue], [[coordinateArray firstObject] floatValue]);
annotation.offset = CGPointMake(kXOffsetScobblerMap, kYOffsetScobblerMap);
NSString *imageString;
NSString *poiName = POI[@"name"];
imageString = [[G4MMediaManager sharedManager] stringGreyMarkerImageForCategory:POI[@"c"]];
annotation.imagePath = imageString;
annotation.imageSize = kAnnotationImageSize;
SKAnimationSettings *animationSettings = [SKAnimationSettings animationSettings];
[self.mapView addAnnotation:annotation withAnimationSettings:animationSettings];
marker_gray-ico_poi_Building_scobbler.png
-
Dev platform evangelist
I've used the following code in our demo project (after adding the icon file to the Resources folder):
SKAnnotation *annotation;
annotation = [SKAnnotation annotation];
annotation.identifier = 200;
annotation.location = CLLocationCoordinate2DMake(52.5233, 13.4127);
annotation.offset = CGPointMake(0, 32);
annotation.imagePath = [[NSBundle mainBundle]pathForResource:@"marker_gray-ico_poi_Building_scobbler" ofType:@"png"];;
annotation.imageSize = 128;
[self.mapView addAnnotation:annotation withAnimationSettings:animationSettings];
and the result was:
iOS Simulator Screen Shot 28 Oct 2014 14.48.31.jpg
Could you check if this code works also in your project?
-
Dandronic, in my project this problem manifests itself sometimes, it does not appear every time and I caught this only on iOS 8.1
In application I use also MKMapKit. From time to time I see white images after closing MKMapKit view and opening SKMap view, maybe SKMap has conflict with MKMapKit ?
-
Dev platform evangelist
It depends a lot of your implementation details, so we couldn't tell what the issue might be without looking at more code & debugging.
Our 2.3 SDK update is coming in a couple of days and we since did make some minor changes regarding iOS 8.1 there it could be worthwhile testing the same code once you update to 2.3.
Otherwise, the best way to proceed is to send us a short screencast of the problem.
-
-
Dandronic, this bug is still reproducible with current version (2.3)
-
Dev platform evangelist
We've tested 2.3, with the provided code:
SKAnnotation *annotation;
annotation = [SKAnnotation annotation];
annotation.identifier = 200;
annotation.location = CLLocationCoordinate2DMake(52.5233, 13.4127);
annotation.offset = CGPointMake(0, 32);
annotation.imagePath = [[NSBundle mainBundle]pathForResource:@"marker_gray-ico_poi_Building_scobbler" ofType:@"png"];;
annotation.imageSize = 128;
[self.mapView addAnnotation:annotation withAnimationSettings:animationSettings];
on multiple devices, and multiple OS versions (8.1 included) and everything works as expected.
Can you attempt to reproduce your issue in our demo project and share with us the code?
-
Dandronic
On last weak I send mail with test project and video, which demonstrate bug
If you didn't get it, I can send it one more time
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks