PoiMarker<T> constructor

PoiMarker<T>({
  1. Display display = Display.ALWAYS,
  2. required String src,
  3. double width = 20,
  4. double height = 20,
  5. required ILatLong latLong,
  6. int minZoomLevel = 0,
  7. int maxZoomLevel = 65535,
  8. int bitmapColor = 0xff000000,
  9. double rotation = 0,
  10. T? item,
  11. MarkerCaption? markerCaption,
  12. required DisplayModel displayModel,
  13. Position position = Position.CENTER,
  14. bool rotateWithMap = true,
})

Implementation

PoiMarker({
  Display display = Display.ALWAYS,
  required String src,
  double width = 20,
  double height = 20,
  required ILatLong latLong,
  int minZoomLevel = 0,
  int maxZoomLevel = 65535,
  int bitmapColor = 0xff000000,
  double rotation = 0,
  T? item,
  MarkerCaption? markerCaption,
  required DisplayModel displayModel,
  this.position = Position.CENTER,
  this.rotateWithMap = true,
})  : assert(minZoomLevel >= 0),
      assert(maxZoomLevel <= 65535),
      assert(rotation >= 0 && rotation <= 360),
      assert(width > 0),
      assert(height > 0),
      super(
        markerCaption: markerCaption,
        display: display,
        minZoomLevel: minZoomLevel,
        maxZoomLevel: maxZoomLevel,
        item: item,
        latLong: latLong,
      ) {
  base = ShapeSymbol.base();
  setLatLong(latLong);
  base.setBitmapPercent(100 * displayModel.getFontScaleFactor().round());
  base.bitmapSrc = src;
  base.setBitmapColorFromNumber(bitmapColor);
  base.setBitmapMinZoomLevel(DisplayModel.STROKE_MIN_ZOOMLEVEL_TEXT);
  base.theta = Projection.degToRadian(rotation);
  base.setBitmapWidth(width.round());
  base.setBitmapHeight(height.round());
  base.position = position;
//    setBitmapColorFromNumber(bitmapColor);
  if (markerCaption != null) {
    markerCaption.latLong = latLong;
  }
  if (markerCaption != null) {
    markerCaption.setSymbolBoundary(base.calculateBoundary());
  }
}