Skip to main content

Map Icons API

Map markers carry the icon a client should draw, and the map icon legend endpoint returns every icon a department's map can show. Both are part of the v4 API and are built from the same department data, so a client that draws its markers and its legend from them always matches the web map. For what the icons mean and how departments set them up, see Icons by status and priority, Map icon legend and Custom map icons.

Endpoints Overview​

EndpointMethodAuthDescription
/api/v4/Mapping/GetMapDataAndMarkersGETBearer token, Call_ViewThe department map: markers for calls, units, stations, personnel, POIs and hydrants
/api/v4/Mapping/GetUnitMapDataGETBearer token, Call_ViewOne unit and the members seated in its roles
/api/v4/Mapping/GetMapIconLegendGETBearer token, Call_ViewEvery icon the department's map can show, for an in-app legend
/api/v4/TypeIcons/{key}GETAnonymousA department's uploaded icon (128 × 128 PNG); ?s={style} adds a badge in the style's color
/api/v4/TypeIcons/Pins/{base}-{style}GETAnonymousA built-in pin recolored to a style (32 × 37 PNG, tip at the bottom center)

Icon and pin URLs carry v= (the palette version) and are served with Cache-Control: public, max-age=31536000, immutable. A changed upload gets a new key and a changed palette a new v, so a cached image is never stale.

Marker icon fields​

Call (Type 0), unit (1) and personnel (3) markers carry four icon fields:

FieldDescription
IconUrlThe department's uploaded icon: the one uploaded for the current priority or status, else the type's or role's own icon with a badge in the color of IconStyle. Null when there is none
PinIconUrlThe built-in pin the type picked (or the default call, unit or person pin), recolored to IconStyle
ImagePathThe plain bundled icon name (fire, ambulance, Call, Engine_Responding, Person_RespondingCall), for clients without styled pins
IconStyleThe style of the priority or status (see Styles)

Draw IconUrl if set, else PinIconUrl, else the bundled ImagePath image. If a remote image fails to load, fall back to the next one. Stations, POIs and hydrants have no PinIconUrl or IconStyle; POIs and POI layers carry their own IconUrl when the POI type has an uploaded icon.

Styles​

A style is the color group of a status or priority meaning. Keys are stable wire values.

KeyColorCovers
available#2E9E44Available, Cleared, On Patrol, Completed, In Quarters
dispatched#B7791FDispatched
responding#D93A1EResponding, En Route
onscene#1D5FD1On Scene, Made Contact, Investigating, At Patient, Searching
transporting#7A3EBETransporting, Delivering, Loading, At Hospital
returning#0C8C99Returning
staging#8A6A3AStaging, Standby
delayed#607D8BOn Break
unavailable#3D3D3DUnavailable, Maintenance, Not Responding
low / medium / high / emergency#2E8B3E / #B59A00 / #E07800 / #C8102ECall priorities by meaning
unknown#8A8A8AA status or priority with no meaning whose name suggests none, or a unit or member with no status

A member On Unit takes the style of their unit's latest status.

Get Map Icon Legend​

GET /api/v4/Mapping/GetMapIconLegend

Returns the department's legend in the standard v4 envelope. Everything in it comes from the department's own setup: call types, priorities, unit types and their status sets, personnel statuses, roles, POI types, the built-in icon each type picked and every uploaded icon. Fetch it when the legend is opened rather than caching it, so a change shows on the next open.

Response data​

FieldDescription
StatusStylesThe nine status styles in legend order, then unknown. Each has Key, Color, Meanings (status meaning values), UnitStatuses and PersonnelStatuses (the department's own status names in that style), UnitPinIconUrl and PersonPinIconUrl
PriorityStyleslow, medium, high, emergency, then unknown. Each has Key, Color, Priorities (the department's own priority names) and CallPinIconUrl
CallsCalls with no type first (Id null), then each call type by name; one state per active priority
UnitsUnits with no type first (Id null), then each unit type by name; one state per status of the type's status set (StatusSetName, null for the built-in unit statuses)
PersonnelMembers with no role icon first (Id null), then each role with an uploaded icon, in role order; one state per personnel status
PoiTypesEach POI type: PoiTypeId, Name, Color, PoiImage, ImagePath, Marker, IconUrl

A row has Id, Name, StatusSetName (units), its own icon (IconUrl, ImagePath) and States. The Name of an Id-null row is a generic label in the server's language; clients should show their own localized label. A state has:

FieldDescription
IdThe stored priority id or status id
NameThe department's name for it
ColorThe priority's or status's own hex color, or null
IconStyleIts style; unknown when it has no meaning
IconUrl, PinIconUrl, ImagePathThe icon a marker of the row shows in it, as on markers
IsVariantTrue when IconUrl was uploaded for this very priority or status
FollowsUnitStatusTrue for the built-in On Unit personnel status: on the map the member takes their unit's style, and the gray pin given here applies only when there is no unit status to follow

Example​

{
"Data": {
"StatusStyles": [
{
"Key": "available",
"Color": "#2E9E44",
"Meanings": [0, 7, 19, 22, 23],
"UnitStatuses": ["Available", "In Quarters"],
"PersonnelStatuses": ["Standing By"],
"Priorities": [],
"UnitPinIconUrl": "https://api.resgrid.com/api/v4/TypeIcons/Pins/engine-available?v=1",
"PersonPinIconUrl": "https://api.resgrid.com/api/v4/TypeIcons/Pins/person-available?v=1",
"CallPinIconUrl": null
}
],
"PriorityStyles": [
{
"Key": "emergency",
"Color": "#C8102E",
"Meanings": [],
"UnitStatuses": [],
"PersonnelStatuses": [],
"Priorities": ["P1 Life threat"],
"UnitPinIconUrl": null,
"PersonPinIconUrl": null,
"CallPinIconUrl": "https://api.resgrid.com/api/v4/TypeIcons/Pins/call-emergency?v=1"
}
],
"Calls": [
{
"Id": 11,
"Name": "Structure Fire",
"StatusSetName": null,
"IconUrl": null,
"PinIconUrl": null,
"ImagePath": "fire",
"States": [
{
"Id": 901,
"Name": "P1 Life threat",
"Color": "#ff0000",
"IconStyle": "emergency",
"IconUrl": null,
"PinIconUrl": "https://api.resgrid.com/api/v4/TypeIcons/Pins/fire-emergency?v=1",
"ImagePath": "fire",
"IsVariant": false,
"FollowsUnitStatus": false
}
]
}
],
"Units": [],
"Personnel": [],
"PoiTypes": []
},
"PageSize": 1,
"Status": "success"
}

The Responder, Unit and IC apps show this legend as a sheet over their maps; the web app shows it at Mapping → Map Icon Legend. Both are built by MapIconLegendBuilder from the department's MapIconResolver.