mapbox / mapbox/mapbox-plugins-android
Expression property in Annotations
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 242
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Hello.
I am trying to change line-width from simple float, to interpolated expression, something like:
PropertyFactory.lineWidth(
Expression.interpolate(
Expression.exponential(2f),
Expression.zoom(),
Expression.stop(10, 1f),
Expression.stop(18, 3f)
)
)
Unfortunately, I cannot find way how to do it with LineManager. It accepts only float as line-width, and I cannot write into jsonObject to use data driven styling without using reflection. How should I do it?
Or maybe there is new fancy way that will disable ugly polyline scaling on zooming out, and I shouldn't bother with line-width anyway?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing LineManager's line-width API and the PropertyFactory and Expression classes mentioned in the issue. Determine whether annotation properties can accept interpolated expressions, then verify the supported behavior and document or test the result; the issue is done when the intended approach is clear and usable without reflection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100