{
  "type": "fused-map",
  "description": "Interactive map with tile and vector layers.",
  "hasChildren": false,
  "propsSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
      "basemap": {
        "default": "mapbox://styles/mapbox/dark-v11",
        "description": "Mapbox style URL",
        "type": "string"
      },
      "centerLng": {
        "default": -98,
        "type": "number"
      },
      "centerLat": {
        "default": 39.5,
        "type": "number"
      },
      "zoom": {
        "default": 4,
        "type": "number"
      },
      "minZoom": {
        "description": "Minimum zoom level (0-24)",
        "type": "number"
      },
      "maxZoom": {
        "description": "Maximum zoom level (0-24)",
        "type": "number"
      },
      "layers": {
        "default": [],
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Unique layer identifier"
            },
            "name": {
              "description": "Display name for the layer",
              "type": "string"
            },
            "type": {
              "type": "string",
              "enum": [
                "mvt",
                "raster",
                "geojson",
                "h3",
                "heatmap",
                "arc",
                "scatterplot",
                "deck-geojson"
              ],
              "description": "Layer type: mvt/raster/geojson (Mapbox native), h3/heatmap/arc/scatterplot/deck-geojson (deck.gl)"
            },
            "visible": {
              "default": true,
              "type": "boolean"
            },
            "tileUrl": {
              "description": "Tile URL template with {x}/{y}/{z} placeholders (mvt, raster, tiled h3)",
              "type": "string"
            },
            "minZoom": {
              "description": "Minimum zoom for tiled layers (mvt, raster, tiled h3)",
              "type": "number"
            },
            "maxZoom": {
              "description": "Maximum zoom for tiled layers (mvt, raster, tiled h3)",
              "type": "number"
            },
            "zoomOffset": {
              "description": "Zoom offset for tiled layers (useful for hex tile generalization)",
              "type": "number"
            },
            "maxRequests": {
              "description": "Maximum parallel tile requests for tiled layers",
              "type": "number"
            },
            "sourceLayer": {
              "description": "Source layer name for MVT tiles (defaults to 'default')",
              "type": "string"
            },
            "data": {
              "description": "Inline GeoJSON FeatureCollection (geojson type)"
            },
            "sql": {
              "description": "DuckDB SQL query with {{udf_name}} placeholders. Rows are converted to GeoJSON for rendering.",
              "type": "string"
            },
            "geometryColumn": {
              "description": "Column containing GeoJSON geometry strings (use ST_AsGeoJSON in SQL). Defaults to 'geometry'.",
              "type": "string"
            },
            "h3Column": {
              "description": "Column containing H3 hex indexes (for h3 layer type).",
              "type": "string"
            },
            "latColumn": {
              "description": "Column for latitude (point data). Defaults to 'lat'.",
              "type": "string"
            },
            "lngColumn": {
              "description": "Column for longitude (point data). Defaults to 'lng'.",
              "type": "string"
            },
            "tooltip": {
              "description": "Show tooltip on hover. true = all properties, string[] = specific properties.",
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "legend": {
              "description": "Show color legend for this layer. true = auto title, {title} = custom title. Only applies when fillColor or lineColor is data-driven.",
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    }
                  }
                }
              ]
            },
            "style": {
              "type": "object",
              "properties": {
                "fillColor": {
                  "description": "Fill color: [r,g,b], CSS string, or data-driven {type:\"continuous\"|\"categorical\", attr, ...}"
                },
                "lineColor": {
                  "description": "Stroke color: [r,g,b], CSS string, or data-driven {type:\"continuous\"|\"categorical\", attr, ...}"
                },
                "lineWidth": {
                  "description": "Stroke width in pixels",
                  "type": "number"
                },
                "opacity": {
                  "description": "Layer opacity 0-1",
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "pointRadius": {
                  "description": "Circle radius for point features",
                  "type": "number"
                },
                "coverage": {
                  "description": "H3 hex coverage 0-1 (1 = no gap, 0.8 = small gaps)",
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "extruded": {
                  "description": "Enable 3D extrusion (h3, deck-geojson)",
                  "type": "boolean"
                },
                "elevationAttr": {
                  "description": "Feature property to use for extrusion height",
                  "type": "string"
                },
                "elevationScale": {
                  "description": "Multiplier for extrusion height values",
                  "type": "number"
                }
              }
            }
          },
          "required": [
            "id",
            "type"
          ]
        }
      },
      "showControls": {
        "default": true,
        "description": "Show zoom navigation controls",
        "type": "boolean"
      },
      "showScale": {
        "default": true,
        "description": "Show scale bar",
        "type": "boolean"
      },
      "showBasemapSwitcher": {
        "default": true,
        "description": "Show dark/light/satellite basemap toggle",
        "type": "boolean"
      },
      "showLegend": {
        "default": true,
        "description": "Show color legend for layers with data-driven colors",
        "type": "boolean"
      },
      "showLayerPanel": {
        "default": true,
        "description": "Show layer controls panel for toggling visibility and opacity",
        "type": "boolean"
      },
      "param": {
        "description": "Canvas parameter name to sync viewport bounds [west, south, east, north]",
        "type": "string"
      },
      "autoSend": {
        "default": false,
        "description": "Automatically send bounds on pan/zoom",
        "type": "boolean"
      },
      "autoSendDebounceMs": {
        "default": 600,
        "description": "Debounce ms for auto-send (0 = send on every move)",
        "type": "number"
      },
      "style": {
        "description": "Inline CSS styles as a plain CSS string",
        "type": "string"
      }
    },
    "description": "Interactive map with Mapbox GL (mvt, raster, geojson) and deck.gl (h3, heatmap, arc, scatterplot) layers."
  }
}
