mapbox / mapbox/mapbox-plugins-android

Expression property in Annotations

未关闭
#1,171 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Java
星标
242
派生
116
PR 合并指标
30 天内没有已合并 PR

描述

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?

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先跟踪 LineManager 的 line-width API,以及 issue 中提到的 PropertyFactory 和 Expression 类。确定注解属性是否可以接受插值表达式,然后验证受支持的行为并记录或测试结果;当预期的方法明确且无需 reflection 即可使用时,issue 即告完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
mobile
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。