addMarker method
Adds a new marker. Note that you may need to call setRepaint() afterwards. It is not called automatically because often we want to modify many markers at once without repainting after every modification.
Implementation
void addMarker(Marker marker) {
_markers.add(marker);
if (_previousBoundingBox != null &&
marker.shouldPaint(_previousBoundingBox!, _previousZoomLevel))
_previousMarkers.add(marker);
}