Show a geocoded location
Geocode a place name, open the map framed on its extent and pin it
A place name goes in, and the map opens framed on the whole city with a pin on its centre.
geocodeOnereturns one GeoJSON feature rather than a result list, so there is no best match to pick.- Its
bboxgoes straight into the map’sboundsoption, so the opening view fits a street or a region with no zoom worked out by hand. PlacesModule.showdraws the pin and its label from that same feature, with no source or layer to register.
Related examples
Add Stops to Route
Find stops along a route within a one-minute detour and insert them all at optimal positions in a single call.
Getting Started
Routing
Search and Geocoding
Electric Vehicles
Utilities
Web
Along route search
Find the beaches and viewpoints within a one-minute detour of a coastal drive
Getting Started
Routing
Search and Geocoding
Web
Basic geometry
Show geometry around the search area
Getting Started
Geometry
Search and Geocoding
Web
EV chargers nearby
Fast charging stations near one location, filtered by connector and power, with each station's connectors on click
Getting Started
Electric Vehicles
Search and Geocoding
Places and POIs
Web