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.

port Tileset encoding parameter to SDKs #11224

Closed

Description

@mollymerp

follow up to #10931 where I added an encoding option on the Tileset class to allow users to specify the encoding of the raster-dem source their using. currently only supports mapbox (default) and terrarium.

looks like i need to add it in the following places for ios and android
https://github.com/mapbox/mapbox-gl-native/blob/master/platform/darwin/src/MGLTileSource.h
https://github.com/mapbox/mapbox-gl-native/blob/master/platform/darwin/src/MGLTileSource.mm
and the style author guides

https://github.com/mapbox/mapbox-gl-native/blob/master/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java

happy to do this if these are the right places to make changes @tobrun @1ec5

Activity

  1. added
    GL JS parity
    iOS
    Android
    on Feb 16, 2018
  2. 1ec5 commented on Feb 20, 2018

    @1ec5
    Contributor

    For iOS and macOS, this task would consist of the following changes:

    • Define a MGLTileSourceOptionRasterDEMEncoding constant of type MGLTileSourceOption (either in MGLTileSource.h or MGLRasterDEMSource.h).
    • Factor out the call to MGLTileSetFromTileURLTemplates() inside -[MGLRasterSource initWithIdentifier:tileURLTemplates:options:] into an instance method.
    • Override that method in MGLRasterDEMSource to apply MGLTileSourceOptionRasterDEMEncoding.
    • Mention the new option in this documentation and run make darwin-style-code to update the iOS and macOS guides.
  3. mollymerp commented on Feb 21, 2018

    @mollymerp
    ContributorAuthor

    thanks @1ec5 – I'm working on a branch this morning.
    one question: what is an "instance method" in the context of the second step you outlined above?

  4. 1ec5 commented on Feb 21, 2018

    @1ec5
    Contributor

    Factor out the call to MGLTileSetFromTileURLTemplates() inside -[MGLRasterSource initWithIdentifier:tileURLTemplates:options:] into an instance method.

    To expand on this, there’s currently a call to MGLTileSetFromTileURLTemplates() inside -[MGLRasterSource initWithIdentifier:tileURLTemplates:options:]. Instead, -initWithIdentifier:tileURLTemplates:options: should call -tileSetWithURLTemplates:options:, which in turn calls MGLTileSetFromTileURLTemplates(). MGLRasterDEMSource can override -tileSetWithURLTemplates:options: to first call super’s implementation then add its own option handling.

  5. mollymerp commented on Mar 1, 2018

    @mollymerp
    ContributorAuthor

    done in #11274 and #11339

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

    AndroidGL JS parityiOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions