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.

get/setStyleJSON should not be public API #900

Closed

Description

@ljbade

We only want to support setting a style via the URL (and asset://) mechanism provided by get/setStyleURL

Helps avoid issues with a style URL loading after the JSON is set directly.

Currently get/setStyleJSON is only needed in the tests to rewrite port numbers. We should find a way to expose this to the tests but not make it a public API.

/cc @kkaefer

Activity

  1. mikemorris commented on Feb 18, 2015

    @mikemorris
    Contributor

    How are you defining public API @ljbade? I'm currently using setStyleJSON at https://github.com/mapbox/node-mapbox-gl-native/blob/master/src/node_map.cpp#L132 to set data loaded directly from a custom FileSource implementation. Does setStyleURL correctly use the map's FileSource to load data?

  2. incanus commented on Mar 31, 2015

    @incanus
    Contributor

    Does setStyleURL correctly use the map's FileSource to load data?

    Yes, this API now supports both regular HTTP URLs as well as mapbox://user.style map IDs.

  3. mikemorris commented on Mar 31, 2015

    @mikemorris
    Contributor

    What I was asking was if it supports the refactored FileSource interface @incanus, such that when used with Node.js bindings I can plug in a custom FileSource object rather than having something like curl baked in.

  4. friedbunny commented on Jun 8, 2015

    @friedbunny
    Contributor

    We did this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions