renderBitmap method
renders the bitmap portion of this marker. This method is called by render() which also call the render method for the caption
Implementation
@override
void renderBitmap(MapCanvas flutterCanvas, MarkerContext markerContext) {
// prepareScalePaintMixin(zoomLevel);
// prepareScaleBitmapSrcMixin(zoomLevel);
if (mapRect == null || lastZoomLevel != markerContext.zoomLevel) {
// cache the rect in pixel-coordinates
Mappoint minmappoint = markerContext.projection.latLonToPixel(minLatLon);
Mappoint maxmappoint = markerContext.projection.latLonToPixel(maxLatLon);
mapRect = GraphicFactory().createRect(
minmappoint.x, maxmappoint.y, maxmappoint.x, minmappoint.y);
lastZoomLevel = markerContext.zoomLevel;
}
MapRect mr =
mapRect!.offset(-markerContext.mapCenter.x, -markerContext.mapCenter.y);
// mr = GraphicFactory().createRect(mr.getLeft() * 2, mr.getTop() * 2,
// mr.getRight() * 2, mr.getBottom() * 2);
if (!isFillTransparent())
flutterCanvas.drawRect(mr, getFillPaint(markerContext.zoomLevel));
if (!isStrokeTransparent())
flutterCanvas.drawRect(mr, getStrokePaint(markerContext.zoomLevel));
}