/**
 * 구역 레이어 (deck.gl ScatterplotLayer 활용)
 */
import { createRadiusLayer } from './markers';

interface ZoneData {
  name: string;
  lat: number;
  lng: number;
  color: string;
  radiusM?: number;
}

/** 원형 구역들을 ScatterplotLayer로 생성 */
export function createZoneLayer(
  id: string,
  zones: ZoneData[],
  defaultRadiusM = 50000,
  opacity = 0.08,
) {
  return createRadiusLayer(
    id,
    zones.map(z => ({
      lat: z.lat,
      lng: z.lng,
      radius: z.radiusM ?? defaultRadiusM,
      color: z.color,
    })),
    opacity,
  );
}
