tag property

String tag

Property that defines the line tag according to its current properties.

Example

LineEntity line = LineEntity(
  id: "123abc",
  coordinates: [
    {
      'lng': 32,
      'lat': -74,
      'altitude': 0,
    },
    {
      'lng': 34,
      'lat': -78,
      'altitude': 0,
    },
  ],
)
line.tag => '''
  <Polygon id="123abc">
    <extrude>0</extrude>
    <altitudeMode>relativeToGround</altitudeMode>
    <outerBoundaryIs>
      <LinearRing>
        <coordinates>
          32,-74,0 34,-78,0
        </coordinates>
      </LinearRing>
    </outerBoundaryIs>
  </Polygon>
'''

Implementation

String get tag => '''
    <Polygon id="$id">
      <extrude>0</extrude>
      <altitudeMode>$altitudeMode</altitudeMode>
      <outerBoundaryIs>
        <LinearRing>
          <coordinates>
            $linearCoordinates
          </coordinates>
        </LinearRing>
      </outerBoundaryIs>
    </Polygon>
  ''';