Highlight states, provinces, or regions on your maps. Perfect for geography quizzes.
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
}
]
}
}'
| Field | Type | Default | Description |
|---|---|---|---|
subdivision_code | string | required | ISO code (e.g., us-ca) |
fill_color | string | #FFD700 | Hex color for fill |
opacity | number | 0.5 | Fill opacity (0–1) |
stroke_color | string | #000000 | Border color |
stroke_width | number | 1 | Border width (0–10) |
show_label | boolean | false | Show region name |
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
}
]
}
}
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.
| Purpose | Color | Hex |
|---|---|---|
| Primary | Blue | #3498db |
| Correct | Green | #2ecc71 |
| Incorrect | Red | #e74c3c |
| Secondary | Purple | #9b59b6 |
| Accent | Orange | #e67e22 |
{
"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 }
]
}
}