import "codable.dart";

class CameraPosition implements Codable {
  double? longitude;

  double? latitude;

  int zoom;

  CameraPosition({
    required this.longitude,
    required this.latitude,
    required this.zoom,
  });

  @override
  Map<String, dynamic> toJson() {
    return {
      'longitude': longitude,
      'latitude': latitude,
      'zoom': zoom,
    };
  }

  factory CameraPosition.fromJson(Map<String, dynamic> map) {
    return CameraPosition(
      longitude: map['longitude'],
      latitude: map['latitude'],
      zoom: map['zoom'],
    );
  }
}
