Highlighting

Create quiz-ready maps with highlighted regions.

Highlighting Regions

Highlight states, provinces, or regions on your maps. Perfect for geography quizzes.

Basic Example

Highlight Idaho on a US map:

curl -X POST 'https://api.smavatar.com/api/v1/projects/{project_id}/jobs/maps' \
  -H 'Authorization: Bearer {api_key}' \
  -H 'Content-Type: application/json' \
  -d '{
    "location_id": "bdd56f14-e776-418a-ab18-89c8138df978",
    "width": 1400,
    "height": 900,
    "theme": "modern",
    "output_format": "png",
    "configuration": {
      "highlight_subdivisions": [
        {
          "subdivision_code": "us-id",
          "fill_color": "#3498db",
          "opacity": 0.6,
          "stroke_color": "#2c3e50",
          "stroke_width": 2
        }
      ]
    }
  }'

Highlight Options

FieldTypeDefaultDescription
subdivision_codestringrequiredISO code (e.g., us-ca)
fill_colorstring#FFD700Hex color for fill
opacitynumber0.5Fill opacity (0–1)
stroke_colorstring#000000Border color
stroke_widthnumber1Border width (0–10)
show_labelbooleanfalseShow region name

Multiple Highlights

Highlight several states with different colors:

{
  "configuration": {
    "highlight_subdivisions": [
      {
        "subdivision_code": "us-ca",
        "fill_color": "#e74c3c",
        "opacity": 0.6
      },
      {
        "subdivision_code": "us-tx",
        "fill_color": "#2ecc71",
        "opacity": 0.6
      },
      {
        "subdivision_code": "us-ny",
        "fill_color": "#9b59b6",
        "opacity": 0.6
      }
    ]
  }
}

Quiz Mode

Create a quiz map without labels:

{
  "configuration": {
    "show_subdivision_labels": false,
    "show_country_labels": false,
    "highlight_subdivisions": [
      {
        "subdivision_code": "us-id",
        "fill_color": "#3498db",
        "opacity": 0.7,
        "show_label": false
      }
    ]
  }
}

Create an answer key by setting show_label: true.

Color Suggestions

PurposeColorHex
PrimaryBlue#3498db
CorrectGreen#2ecc71
IncorrectRed#e74c3c
SecondaryPurple#9b59b6
AccentOrange#e67e22

Pacific States Example

{
  "location_id": "bdd56f14-e776-418a-ab18-89c8138df978",
  "theme": "modern",
  "configuration": {
    "show_subdivision_labels": false,
    "highlight_subdivisions": [
      { "subdivision_code": "us-wa", "fill_color": "#3498db", "opacity": 0.7 },
      { "subdivision_code": "us-or", "fill_color": "#3498db", "opacity": 0.7 },
      { "subdivision_code": "us-ca", "fill_color": "#3498db", "opacity": 0.7 }
    ]
  }
}

Limits

  • Maximum 50 highlights per map
  • Subdivision must belong to the map's location
  • Invalid codes return validation errors

Next Steps

Themes

Choose a visual theme.

Rivers & Lakes

Add water features.