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

[core] Remove MapData dependency from StyleParser #2743

Merged
merged 2 commits into from
Oct 23, 2015
Merged

Conversation

jfirebaugh
Copy link
Contributor

Third in a series of PRs that builds towards a full-fledged programmatic style API. This is a big chunk of work, but I'm trying to break it up step by step and not create a long-lived branch with a lot of changes.

When working on other changes in this series, I found that having a MapData dependency in the style parsing code was problematic for other necessary refactoring. The parsing code is low level code that should not have a dependency on high-level objects such as MapData.

MapData was needed for two things: getting the default transition and fade durations, and detecting still rendering vs. continuous. This avoids the first by making transition durations optional, and supplying the default fallback value at evaluation time. The second did not fix the still rendering issue, and will be followed up with a different approach in a later commit.

👀 @kkaefer @brunoabinader

@brunoabinader
Copy link
Member

Looks great! 👍 Makes me wonder if we can have a similar class PainterParameters for Painter class.

This makes subsequent changes to the the parameter list less intrusive.
MapData was needed for two things: getting the default transition and
fade durations, and detecting still rendering vs. continuous.

The first is avoided by making transition durations optional, and
supplying the default fallback value at evaluation time. The second did
not fix the still rendering issue, and will be followed up with a
different approach in a later commit.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants