docs: public InternalTile paint(InternalTile tileToPaint) throws RenderException {
  		if (tileToPaint != null && null != tileToPaint.getFeatures()) {
  			tile = tileToPaint;
  			Collections.sort(tile.getFeatures()); // make sure features are sorted by style, needed for grouping
  
  			// Create the SVG / VML feature fragment:
  			if (paintGeometries && featureDocument == null) {
  				StringWriter writer = new StringWriter();
  				try {
  					featureDocument = createFeatureDocument(writer);
  					featureDocument.setRootId(layer.getId());
  					featureDocument.writeObject(tile, false);
  					featureDocument.flush();
  				} catch (RenderException e) {
  					log.error("Unable to write this tile's feature fragment", e);
  				}
  				tile.setFeatureContent(writer.toString());
  			}
  
  			// Create the SVG / VML label fragment:
  			if (paintLabels && labelDocument == null) {
  				StringWriter writer = new StringWriter();
  				try {
  					labelDocument = createLabelDocument(writer, style.getLabelStyle());
  					labelDocument.setRootId(layer.getId());
  					labelDocument.writeObject(tileToPaint, false);
  					labelDocument.flush();
  				} catch (RenderException e) {
  					log.error("Unable to write this tile's label fragment", e);
  				}
  				tile.setLabelContent(writer.toString());
  			}
  			return tile;
  		}
  
  		return tileToPaint;
  	}