Back to all examples
Minimal map agent
The smallest conversational map agent: a map, a chat box and the Agent Toolkit, in plain TypeScript
Type a request in the chat, and the map searches, pins and frames the answer while the reply streams in beside it.
createMapAgentbinds a model to this map with the default tools and system prompt, so there is no tool or schema to write.agent.streamruns a whole turn: it picks the tools, calls the TomTom services, draws the results and streams the reply.- What the agent draws stays in
agent.statebetween turns, so a follow-up such as “only the closest ones” works on the same pins.
Related examples
3D terrain map
Render the map surface in 3D using terrain elevation data
Getting Started
Terrain and 3D
Plugins
Web
3D Landmarks plugin
Render TomTom Orbis 3D Landmarks on a TomTomMap with the Landmarks 3D plugin
Getting Started
Terrain and 3D
Plugins
Web
Map Chat Agent
Ask a chat beside the map for places, routes or traffic, and watch the map search, draw and frame the answer
Playground
AI
Search and Geocoding
Places and POIs
Map Style
Base Map
Geometry
Traffic
Routing
Plugins
Web
React
Map Chat Agent State Playground
A map chat whose every result lands in a side panel, where you can show, hide or drop it yourself
Playground
AI
Search and Geocoding
Places and POIs
Map Style
Base Map
Geometry
Traffic
Routing
Bring Your Own Data
Plugins
Web
React