Supply chain / trade network map
Trade flows, logistics corridors, migration patterns, and sanctions chains all share the same shape: a set of hubs connected by directed paths. This recipe shows how to combine markers (hubs), routes (connections), and annotations (tooltip context) into a single embeddable map with no client-side JavaScript.
What you'll build
A world map with five hub airports, great-circle routes between them, and hover tooltips on each marker.
Steps
-
Identify your hubs and their coordinates. For city-level precision, use
lat,lonliterals rather than ISO country codes — ISO codes resolve to geographic centroids, which rarely fall on the airport or port you care about.Hub Lat Lon Washington DC 38.90 -77.04 Berlin 52.52 13.40 Tokyo 35.68 139.69 Beijing 39.90 116.40 Sydney -33.87 151.21 -
Define your markers. Use
lat,lon:icon:labelsyntax, semicolons between markers. Choose an icon that communicates the hub type —airportfor air freight,anchorfor ports,factoryfor manufacturing sites,buildingfor offices.markers=38.90,-77.04:airport:Washington;52.52,13.40:airport:Berlin;35.68,139.69:airport:Tokyo;39.90,116.40:airport:Beijing;-33.87,151.21:airport:Sydney -
Define your routes. Use
from>tosyntax with the samelat,lonliterals so routes terminate exactly at the marker position. Add per-route styling —arrowfor directed flow,dashedfor a different tier or status,#rrggbbfor color coding.routes=38.90,-77.04>52.52,13.40:arrow;38.90,-77.04>35.68,139.69:arrow;52.52,13.40>39.90,116.40:%2360a5fa:2:dashed:arrow;35.68,139.69>-33.87,151.21:arrow;39.90,116.40>20.59,78.96:%23ec4899:2:arrowURL-encode
#as%23and>as%3Ewhen the URL is assembled by a server or template engine. In a plain browser address bar the literal characters work in most cases. -
Add a title and choose a dark theme. Dark themes (
dark,dark-blue,dark-mono) make routes and markers stand out more clearly than light backgrounds.theme=dark&title=Global+logistics+network&subtitle=Air+freight+corridors+2025 -
Assemble the final URL.
https://api.maproll.io/map.svg?scope=world&theme=dark&title=Global+logistics+network&subtitle=Air+freight+corridors+2025&routes=38.90,-77.04>52.52,13.40:arrow;38.90,-77.04>35.68,139.69:arrow;52.52,13.40>39.90,116.40:%2360a5fa:2:dashed:arrow;35.68,139.69>-33.87,151.21:arrow;39.90,116.40>20.59,78.96:%23ec4899:2:arrow&markers=38.90,-77.04:airport:Washington;52.52,13.40:airport:Berlin;35.68,139.69:airport:Tokyo;39.90,116.40:airport:Beijing;-33.87,151.21:airport:Sydney;20.59,78.96:airport:India -
Add hover tooltips via annotations. Annotations attach free text to the
<title>element of each region path. Use them on country-level entries to add context that appears on hover without adding visual clutter:annotations=US:Primary+hub,DE:EU+distribution+center,CN:Manufacturing+origin,JP:Asia+gateway,AU:Pacific+relaySee Annotations for the full syntax.
Variations
-
Star topology (hub and spoke). Radiate all routes from a single origin — a classic for trade or distribution diagrams:
routes=US>GB:arrow;US>FR:arrow;US>DE:arrow;US>JP:arrow;US>AU:arrow;US>BR:arrow -
Color-code route tiers. Use one color for primary corridors, another for secondary:
routes=US>DE:%23ffffff:3:arrow;US>CN:%23ffffff:3:arrow;US>BR:%2360a5fa:1:dashed:arrow -
Add a choropleth layer. Shade countries by shipment volume to combine flow information with a quantitative layer:
data=US:500,DE:320,CN:450,JP:280,AU:150&proportional=US:500,DE:320,CN:450 -
Use the POST endpoint when your route list is generated dynamically:
curl -X POST https://api.maproll.io/render/map \-H 'content-type: application/json' \-d '{"scope": "world","theme": "dark","title": "Supply chain Q2 2025","markers": [{ "lat": 38.90, "lon": -77.04, "icon": "airport", "label": "Washington" },{ "lat": 52.52, "lon": 13.40, "icon": "airport", "label": "Berlin" }],"routes": [{ "from": "US", "to": "DE", "arrow": true, "color": "#60a5fa" }]}'When mixing lat/lon markers with ISO-code routes, note that ISO routes resolve to the country centroid — use
fromLatLon/toLatLonin the JSON body for city-level precision.
Related
- Markers — 30-icon library, label positioning, JSON-only fields (
color,size,rotation) - Routes — great-circle paths, per-route styling, lat/lon literals vs ISO codes
- Annotations — per-region hover tooltips
- Themes — dark vs light theme highlight and route contrast