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

Response class in not NSHTTPURLResponse #1299

Closed
robipresotto opened this issue Apr 20, 2015 · 6 comments
Closed

Response class in not NSHTTPURLResponse #1299

robipresotto opened this issue Apr 20, 2015 · 6 comments
Assignees
Labels
iOS Mapbox Maps SDK for iOS

Comments

@robipresotto
Copy link

The api accept now only NSURL to set the json style,
How is possible download the json style, change it locally and reuse the data on mapstyle?

I got it all the time...
[ERROR] {0}{Map}[Setup]: loading style failed: response class is not NSHTTPURLResponse

@kkaefer
Copy link
Contributor

kkaefer commented Apr 20, 2015

You can use asset://... to load from disk, or use .setStyleJSON() to load styles directly from memory.

@robipresotto
Copy link
Author

the setStyleJSON is private on master branch... as some reason for that?

@kkaefer
Copy link
Contributor

kkaefer commented Apr 20, 2015

I don't think it's private:

void setStyleJSON(const std::string& json, const std::string& base = "");

Maybe you're running an outdated version?

@robipresotto
Copy link
Author

yeah, i know... but nothing on MGLMapView.h

@kkaefer kkaefer added the iOS Mapbox Maps SDK for iOS label Apr 20, 2015
@1ec5
Copy link
Contributor

1ec5 commented Apr 20, 2015

I got rid of the styleJSON API for now, per #1147 (comment) and #900. We'll eventually need some way to interact with styles with that kind of granularity for #837.

/cc @incanus

@1ec5
Copy link
Contributor

1ec5 commented Jan 21, 2016

Just to close the loop, if you pass a relative URL into -setStyleURL:, we’ll treat that as a local file relative to the main bundle. Absolute file URLs still lead to an error; see #3505.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

4 participants