toJson method

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

Converts the MPBuilding to a JSON representation that can be parsed by the MapsIndoors Platform SDK

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    "id": id.value,
    "administrativeId": administrativeId,
    "externalId": externalId,
    "venueId": venueId,
    "anchor": _anchor,
    "buildingInfo": _buildingInfo,
    "geometry": geometry,
    "floors": _floors
        ?.map((key, value) => MapEntry(key.toString(), value.toJson())),
    "defaultFloor": _defaultFloor,
    "address": _address,
    "boundingBox": bounds?.toJson()
  };
}