mapbox / mapbox/mapbox-plugins-android

Expression property in Annotations

Open
#1,171 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.