createVectorTileValue function

VectorTile_Value createVectorTileValue({
  1. String? stringValue,
  2. double? floatValue,
  3. double? doubleValue,
  4. Int64? intValue,
  5. Int64? uintValue,
  6. Int64? sintValue,
  7. bool? boolValue,
})

Create a value that will be attach into layers

In order to support values of varying string, boolean, integer, and floating point types, the protobuf encoding of the value field consists of a set of optional fields. BUT A value MUST contain exactly one of these optional fields.

@spec: https://github.com/mapbox/vector-tile-spec/blob/master/2.1/README.md#41-layers

Implementation

VectorTile_Value createVectorTileValue({
  String? stringValue,
  double? floatValue,
  double? doubleValue,
  Int64? intValue,
  Int64? uintValue,
  Int64? sintValue,
  bool? boolValue,
}) {
  return VectorTile_Value(
    stringValue: stringValue,
    floatValue: floatValue,
    doubleValue: doubleValue,
    intValue: intValue,
    uintValue: uintValue,
    sintValue: sintValue,
    boolValue: boolValue,
  );
}