Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps API v3 Geocoding Business Names

Is it possible to Geocode with the name of a business instead of an exact street address? The following geocoding request returns 0 results. I want to be able to send a business name, city, and state and retrieve the latitude and longitude. Here is what I have so far:

var business = "Neighborhood Theatre, Charlotte, NC 28205";
geocoder.geocode({'address' : business, 'region' : 'us'}, function(results, status) {
    console.log(status);
});
like image 583
Colin Avatar asked Feb 26 '26 03:02

Colin


2 Answers

No, Geocoding is specifically targeted at postal addresses.

Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739),

To geolocate business names, you want to use something like the Places API

The Google Places JavaScript library's functions enable your application to search for Places (defined in this API as establishments, geographic locations, or prominent points of interest) contained within a defined area, such as the bounds of a map, or around a fixed point.

like image 78
geocodezip Avatar answered Feb 28 '26 16:02

geocodezip


This is a better fit for gis.stackexchange.com, but at any rate, look into google places. Geocoding revolves around addresses and the google places API revolves around places of interest like businesses.

like image 41
Peter Smith Avatar answered Feb 28 '26 15:02

Peter Smith