Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

SpriteImageException when using a vector with non-whole number width/height #5149

Closed
puttputt opened this issue May 26, 2016 · 1 comment
Closed
Labels
crash iOS Mapbox Maps SDK for iOS

Comments

@puttputt
Copy link

Hi not sure if this is the right project, but.

ios SDK 3.0.1

I'm getting this error:
mbgl::util::SpriteImageException: Sprite image pixel count mismatch

With this code:

func mapView(mapView: MGLMapView, imageForAnnotation annotation: MGLAnnotation) -> MGLAnnotationImage? {

        return MGLAnnotationImage(image: UIImage(named: "marker")!, reuseIdentifier: "note")
    }

I've discovered that it was because the pdf image I am using had a height of 35.36 pixels. Rounding this down to 35 pixels resolved the issue.

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS crash labels May 26, 2016
@1ec5
Copy link
Contributor

1ec5 commented May 26, 2016

This issue was previously reported in #2198 and fixed in #3561, which made it into Mapbox iOS SDK v3.1.0 and above. Please upgrade to the latest version of the SDK (currently 3.2.2; 3.3.0 alphas are also available) and let us know if the problem persists. Thanks!

@1ec5 1ec5 closed this as completed May 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crash iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

2 participants