使用BitMapDescriptor上的Android和iOS上的不同颜色

发布于 2025-02-13 01:09:43 字数 945 浏览 0 评论 0原文

我正在使用bitmapdescriptor根据地图上的状态设置颜色,但是iOS颜色的Android颜色(正确)存在差异,其中iOS黄色上的黄色显示为深绿色。有任何建议制作iOS颜色,例如android颜色吗?

android ios

这是de color:

  _status_icon(status) {
    if (status == "Free") {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueBlue);
    } else if (status == "Low") {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen);
    } else if (status == "Moderate") {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueYellow);
    } else if (status == "Abundant") {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueOrange);
    } else {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRed);
    }
  }

I'm using BitmapDescriptor to set color based on status on the map, but there is a difference in Android colors (which are correct) with iOS colors, where on iOS yellow appears as dark green. Any suggestions to make iOS colors like Android colors?

Android
iOS

Here is de color:

  _status_icon(status) {
    if (status == "Free") {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueBlue);
    } else if (status == "Low") {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueGreen);
    } else if (status == "Moderate") {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueYellow);
    } else if (status == "Abundant") {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueOrange);
    } else {
      return BitmapDescriptor.defaultMarkerWithHue(BitmapDescriptor.hueRed);
    }
  }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文