public final class UserDataKeyValueMapConverter extends Object implements IUserDataConverter
Map where the keys are String and values are Object. Supports
converting a specific map key to a user id. If the key to user id conversion fails, the error occurs silently
and the id is discarded.IUserDataConverter| Constructor and Description |
|---|
UserDataKeyValueMapConverter()
Does not set feature id.
|
UserDataKeyValueMapConverter(String idKey)
Tries to set feature id using provided user data
Map key. |
| Modifier and Type | Method and Description |
|---|---|
void |
addTags(Object userData,
MvtLayerProps layerProps,
VectorTile.Tile.Feature.Builder featureBuilder)
Convert user data to MVT tags.
|
public UserDataKeyValueMapConverter()
public void addTags(Object userData, MvtLayerProps layerProps, VectorTile.Tile.Feature.Builder featureBuilder)
IUserDataConverterConvert user data to MVT tags. The supplied user data may be null. Implementation should update layerProps and optionally set the feature id.
SIDE EFFECT: The implementation may add tags to featureBuilder, modify layerProps, modify userData.
addTags in interface IUserDataConverteruserData - user object may contain values in any format; may be nulllayerProps - properties global to the layer the feature belongs tofeatureBuilder - may be modified to contain additional tagsCopyright © 2022. All rights reserved.