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 city: landmarks, buildings and surfaces
A whole 3D city round the Eiffel Tower, from the rippling Seine and the trees on the Champ de Mars to the buildings and the tower, lit by one sun from dawn to dusk
Getting Started
Terrain and 3D
Plugins
Web
3D Landmarks plugin
Render TomTom Orbis 3D Landmarks in seven cities on a TomTomMap with the Landmarks 3D plugin, and tune their look
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