mapzen / ios

Where you can find everything iOS from Mapzen
https://mapzen.com/projects/mobile/
Apache License 2.0
40 stars 24 forks source link

Styles, Themes, and 512 Tiles support #366

Closed msmollin closed 6 years ago

msmollin commented 6 years ago

Overview

This change overhauls how the SDK interacts with style sheets. Previously, we utilized a minimal but functional interface for loading stylesheets using a simple enumeration and correlative array. This works well, but it has two major downsides:

1) It allows leakage of underlying framework and stylesheet changes because it is so minimal. For example, the deprecation and removal of the Zinc standalone stylesheet would effectively break public-facing API if we continued to stick with this method. 2) An enumeration we control means that support custom or remotely-deployed stylesheets would be a fairly large hack to enable either of those major requested features in the existing API.

This change thus introduces a StyleSheet and Theme protocol, which allows us to express the current style sheets Mapzen provides, and the themes attached to them. Analogous to this are the introduction of loading functions for these, as well as refactoring across the sample app to support these.

Proposed Changes

msmollin commented 6 years ago

@karimnaaji / @sarahlensing I have an outstanding support request to fix the circle ci builds for these. If you want to test things manually, when you pull the branch down make sure you run git submodule sync to get the new changes, and then pod install so you get new tangram and pelias.

msmollin commented 6 years ago

Builds are fixed!