toJsonLd method

  1. @override
Map<String, dynamic> toJsonLd()
override

Serialize SchemaGeoShape to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'GeoShape',
      'address': convertToJsonLd(address, [SchemaPostalAddress, String]),
      'addressCountry':
          convertToJsonLd(addressCountry, [SchemaCountry, String]),
      'box': convertToJsonLd(box, [String]),
      'circle': convertToJsonLd(circle, [String]),
      'elevation': convertToJsonLd(elevation, [String, num]),
      'line': convertToJsonLd(line, [String]),
      'polygon': convertToJsonLd(polygon, [String]),
      'postalCode': convertToJsonLd(postalCode, [String]),
    });