* The group where the object resides in (optional).
* @param context
* A MapContext object, responsible for actual drawing.
*/
public void paint(Paintable paintable, Object group, MapContext context) {
VectorTile tile = (VectorTile) paintable;
boolean labeled = tile.getCache().getLayer().isLabelsShowing();
switch (tile.getContentType()) {
case STRING_CONTENT:
// Paint the feature content:
if (tile.getFeatureContent().isLoaded()) {
drawData(tile.getCache().getLayer().getFeatureGroup(), tile, tile.getFeatureContent(), context);
}
// Paint the label content:
if (tile.getLabelContent().isLoaded()) {
drawData(tile.getCache().getLayer().getLabelGroup(), tile, tile.getLabelContent(), context);
}
break;
case URL_CONTENT:
// paint the label url (includes features)
if (labeled && tile.getLabelContent().isLoaded()) {
drawImage(tile, tile.getLabelContent(), context);
// or Paint the feature url
} else if (tile.getFeatureContent().isLoaded()) {
drawImage(tile, tile.getFeatureContent(), context);
}
break;
}
}