PDA

View Full Version : iOS : White images on map annotations



BunnySashka
28.10.2014, 14:15
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

1690 1691 1689

Please, could you help me with this problem

dandronic
28.10.2014, 14:23
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.

BunnySashka
28.10.2014, 14:33
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];

1692

dandronic
28.10.2014, 14:53
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:
1694

Could you check if this code works also in your project?

BunnySashka
28.10.2014, 15:05
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 ?

dandronic
28.10.2014, 15:10
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.

BunnySashka
28.10.2014, 15:12
ok, Thank you!

BunnySashka
01.11.2014, 10:51
Dandronic, this bug is still reproducible with current version (2.3)

dandronic
04.11.2014, 14:43
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?

BunnySashka
04.11.2014, 14:58
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

algrid
27.11.2014, 14:17
I also had this problem. It may have something to do with SKMapView instances sharing some common data (at least I got this problem only when I previously had created another map instance with some annotations).
I'm not sure that it's gonna help but try to clear all annotations for any newly created map before starting to use it.