{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1767","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1767/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1767/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1767/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/1767","id":90168201,"number":1767,"title":"Mapview doesn't always load styleURL","user":{"login":"leandersikma","id":2331373,"avatar_url":"https://avatars.githubusercontent.com/u/2331373?v=3","gravatar_id":"","url":"https://api.github.com/users/leandersikma","html_url":"https://github.com/leandersikma","followers_url":"https://api.github.com/users/leandersikma/followers","following_url":"https://api.github.com/users/leandersikma/following{/other_user}","gists_url":"https://api.github.com/users/leandersikma/gists{/gist_id}","starred_url":"https://api.github.com/users/leandersikma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandersikma/subscriptions","organizations_url":"https://api.github.com/users/leandersikma/orgs","repos_url":"https://api.github.com/users/leandersikma/repos","events_url":"https://api.github.com/users/leandersikma/events{/privacy}","received_events_url":"https://api.github.com/users/leandersikma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/iOS","name":"iOS","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-22T18:01:29Z","updated_at":"2015-06-22T18:22:01Z","closed_at":null,"body":"Sometimes when I start my app (iOS) with Mapbox in it, it won't load the styles into the map. It generates the default MapKit styled map, without any markers. It's kind of annoying, because the problem is somewhat occurring on a random base. \r\n\r\nI load my custom stylesheet as a JSON file and link it to the map via the style url:\r\n\r\n```mapView?.styleURL = NSURL(string: \"asset://\\(jsonFile)\")```\r\n\r\nIs it a known issue? "},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/114207210","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/1767#issuecomment-114207210","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/1767","id":114207210,"user":{"login":"leandersikma","id":2331373,"avatar_url":"https://avatars.githubusercontent.com/u/2331373?v=3","gravatar_id":"","url":"https://api.github.com/users/leandersikma","html_url":"https://github.com/leandersikma","followers_url":"https://api.github.com/users/leandersikma/followers","following_url":"https://api.github.com/users/leandersikma/following{/other_user}","gists_url":"https://api.github.com/users/leandersikma/gists{/gist_id}","starred_url":"https://api.github.com/users/leandersikma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leandersikma/subscriptions","organizations_url":"https://api.github.com/users/leandersikma/orgs","repos_url":"https://api.github.com/users/leandersikma/repos","events_url":"https://api.github.com/users/leandersikma/events{/privacy}","received_events_url":"https://api.github.com/users/leandersikma/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T18:22:01Z","updated_at":"2015-06-22T18:22:01Z","body":"It looks like #1208 is about a wrong file path to the local style URL. My styleURL is actually working and loading, but once in 20 times (or another random number) that you open the app. The style got not applied to map. \r\n\r\nView with layout:\r\n![screen shot 2015-06-22 at 20 17 33](https://cloud.githubusercontent.com/assets/2331373/8289334/21898fcc-191c-11e5-9ab3-8f57413edd64.png)\r\n\r\nView with the default layout (hops in sometimes)\r\n![screen shot 2015-06-22 at 20 19 59](https://cloud.githubusercontent.com/assets/2331373/8289346/34653588-191c-11e5-8f27-d799a5eec60d.png)\r\n\r\nI'm trying ```-initWithFrame:styleURL:``` now. I have to say that the last 20 times I built/started my app, the problem didn't occur. So maybe this one is a little bit more 'stable'.\r\n"}}