defaultMarkerWithHue static method

BitmapDescriptor defaultMarkerWithHue(
  1. double hue
)

创建引用默认着色的BitmapDescriptor

Implementation

static BitmapDescriptor defaultMarkerWithHue(double hue) {
  assert(0.0 <= hue && hue < 360.0);
  String filename = "BLUE.png";
  if (hue == hueRed) {
    filename = "RED.png";
  } else if (hue == hueOrange) {
    filename = "ORANGE.png";
  } else if (hue == hueYellow) {
    filename = "YELLOW.png";
  } else if (hue == hueGreen) {
    filename = "GREEN.png";
  } else if (hue == hueCyan) {
    filename = "CYAN.png";
  } else if (hue == hueAzure) {
    filename = "AZURE.png";
  } else if (hue == hueBlue) {
    filename = "BLUE.png";
  } else if (hue == hueViolet) {
    filename = "VIOLET.png";
  } else if (hue == hueMagenta) {
    filename = "MAGENTA.png";
  } else if (hue == hueRose) {
    filename = "ROSE.png";
  }
  return BitmapDescriptor._(<dynamic>[
    'fromAssetImage',
    "packages/amap_map/res/$filename",
    AMapUtil.devicePixelRatio
  ]);
}