PoiMarker<T> constructor
PoiMarker<T> ({
- 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,
- Position position = Position.CENTER,
- 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());
}
}