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

Response class in not NSHTTPURLResponse #1299

Closed

Description

@robipresotto

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

Activity

  1. kkaefer commented on Apr 20, 2015

    @kkaefer
    Member

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

  2. robipresotto commented on Apr 20, 2015

    @robipresotto
    Author

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

  3. kkaefer commented on Apr 20, 2015

    @kkaefer
    Member

    I don't think it's private:

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

    Maybe you're running an outdated version?

  4. robipresotto commented on Apr 20, 2015

    @robipresotto
    Author

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

  5. added
    iOS
    on Apr 20, 2015
  6. 1ec5 commented on Apr 20, 2015

    @1ec5
    Contributor

    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

  7. 1ec5 commented on Jan 21, 2016

    @1ec5
    Contributor

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

iOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions