Recommended Free Tools
To find places near a latitude and longitude in JavaScript, send those coordinates as the center of a nearby-place search, define the search area, and request only the place data your interface needs. With Google Maps JavaScript, the current Places API flow is Place.searchNearby(); browser geolocation is a separate step needed only when your app must obtain the visitor’s current position.
Nearby search or reverse geocoding?
Choose a nearby search when the question is “What places are around this point?” It returns points of interest, such as restaurants or parks, within a defined area. Reverse geocoding answers a different question: “What address or place name corresponds to these coordinates?” Mapbox describes reverse geocoding as converting coordinates into address or place text, and its Search Box API supports POI search and coordinate reverse lookup. Mapbox Search documentation
As an Amazon Associate I earn from qualifying purchases.
If you already have latitude and longitude and need nearby categorized places for a map, Google Maps JavaScript provides a direct route through the Places library. Mapbox is another option for applications already using its search and geocoding stack. The right choice depends on required categories and fields, ranking, geographic coverage, map compatibility, billing, and regional terms; the available documentation does not establish one provider as universally best.
Search nearby places with Google Maps JavaScript
Enable Places API (New) in the Google Cloud project used by your Maps JavaScript application, load the Places library, then call Place.searchNearby(). The request needs a location restriction centered on the coordinate, a field list, and any filters or ranking preference the feature requires. Google’s example requests display name, location, formatted address, and Google Maps URI; request only fields your interface uses. Google Maps JavaScript Nearby Search
#1 Best Overall
- Bright, high-resolution 5” glass capacitive touchscreen display lets you easily view your route
- Get more situational awareness with alerts for school zones, speed changes, sharp curves and more
- View food, fuel and rest areas along your active route, and see upcoming cities and milestones
- View Tripadvisor traveler ratings for top-rated restaurants, hotels and attractions to help you make the most of road trips
- Directory of U.S. national parks simplifies navigation to entrances, visitor centers and landmarks within the parks
const { Place } = await google.maps.importLibrary("places");
const request = {
fields: ["displayName", "location", "formattedAddress", "googleMapsURI"],
locationRestriction: {
center: { lat: 37.7749, lng: -122.4194 },
radius: 1500
},
includedPrimaryTypes: ["restaurant"],
rankPreference: "DISTANCE"
};
const { places } = await Place.searchNearby(request);
Replace the sample center and radius with your application’s values. Add includedPrimaryTypes only when the feature should constrain results to a category; use a supported primary type for the API. Set ranking to distance when the closest results matter most, or popularity when prominence is more useful. Google’s JavaScript example also shows deriving a radius from map bounds and capping it at 50,000 meters.
The returned place objects can be used to create map markers or populate a list. Handle an empty result set and request failures in the same way you handle other network-dependent UI states; do not assume every coordinate or category will return a result.
Rank #2
- 6” high-resolution navigator includes map updates of North America
- Hands-free calling when paired with your compatible smartphone with BLUETOOTH technology and convenient Garmin voice assist lets you ask for directions to places you want to go
- Road trip–ready features include the HISTORY database of notable sites, a U.S. national parks directory, Tripadvisor traveler ratings and millions of Foursquare POIs
- Driver alerts for things such as school zones, sharp curves and speed changes help encourage safer driving and increase situational awareness
- Access live traffic, fuel prices, parking, weather and smart notifications when you pair this navigator with your compatible smartphone running the Garmin Drive app
Use the Places API web service instead
If your application calls Google’s Places API (New) web service rather than the Maps JavaScript library, send an HTTP POST to https://places.googleapis.com/v1/places:searchNearby. Put the search center and radius in locationRestriction.circle, provide the API key, and include an X-Goog-FieldMask header listing the response fields.
POST https://places.googleapis.com/v1/places:searchNearby
X-Goog-Api-Key: YOUR_API_KEY
X-Goog-FieldMask: places.displayName,places.location,places.formattedAddress
Content-Type: application/json
{
"locationRestriction": {
"circle": {
"center": { "latitude": 37.7749, "longitude": -122.4194 },
"radius": 1500
}
},
"includedPrimaryTypes": ["restaurant"],
"rankPreference": "DISTANCE"
}
For this web-service endpoint, the radius must be greater than zero and no more than 50,000 meters. Google requires a field mask: a request without one returns an error. Field masks also let you avoid requesting unneeded data; Google notes that requested fields affect processing and billing, with different fields associated with different SKU groupings. Check the current field and billing documentation before choosing a mask. Google Places API Nearby Search
Rank #3
- Explore confidently with the reliable handheld GPS
- 2.2” sunlight-readable color display with 240 x 320 display pixels for improved readability
- Preloaded with Topo Active maps with routable roads and trails for cycling and hiking
- Support for GPS and GLONASS satellite systems allows for tracking in more challenging environments than GPS alone
- 8 GB of internal memory for map downloads plus a micro SD card slot
Get coordinates from the browser only when needed
If the feature searches around the visitor, obtain the current coordinates using browser geolocation, then pass latitude and longitude to the nearby-search request. If coordinates are already supplied by the user or application data, skip geolocation. It is not part of the place search itself. The W3C Geolocation specification is the standards reference for browser device location. W3C Geolocation
Because geolocation obtains device location, design the feature so the user can understand why it is requested and what the app will do with the result. Keep the search function independent: it should accept a coordinate regardless of whether it came from geolocation, a saved location, or another input.
Quick Recap
Best Value
- Bright, high-resolution 5” glass capacitive touchscreen display lets you easily view your route
- Get more situational awareness with alerts for school zones, speed changes, sharp curves and more
- View food, fuel and rest areas along your active route, and see upcoming cities and milestones
- View Tripadvisor traveler ratings for top-rated restaurants, hotels and attractions to help you make the most of road trips
- Directory of U.S. national parks simplifies navigation to entrances, visitor centers and landmarks within the parks
Rank #4
- 8” navigator with high-resolution, dual-orientation display and map updates of North America .Special Feature:Large Display; Voice Assist; Hands-Free Calling; Live Traffic and Weather; Traffic Cams and Parking; Smart Notifications,Driver Alerts; Tripadvisor; National Parks Directory; Find Places by Name; Garmin Real Directions Feature.
- Hands-free calling when paired with your compatible smartphone with BLUETOOTH technology and convenient Garmin voice assist lets you ask for directions to places you want to go
- Road trip–ready features include the HISTORY database of notable sites, a U.S. national parks directory, Tripadvisor traveler ratings and millions of Foursquare POIs
- Driver alerts for things such as school zones, sharp curves and speed changes help encourage safer driving and increase situational awareness
- Access live traffic, fuel prices, weather, parking and smart notifications when you pair this navigator with your compatible smartphone running the Garmin Drive app
Choose an API around the feature you are building
- Place categories: confirm the provider supports the categories the interface needs.
- Returned fields: identify the data used for markers, cards, or navigation, then request only those fields.
- Ranking: decide whether proximity or prominence better serves the user.
- Map and search stack: account for compatibility with the mapping and search services already in the application.
- Geography and terms: verify coverage and applicable regional terms for the places and users involved.
- Billing: compare the cost implications of the specific fields and request patterns in your project; there is no universal cost winner established by the API documentation.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →




