M.SH
M.SH

Reputation: 378

Can i get population and Area code of the city from google maps API

I have this code

address = "11533"
geocoder.geocode({"address" : address}, function(results, status)
            {
                if(status == google.maps.GeocoderStatus.OK)
                {
                    map.setCenter(results[0].geometry.location);
                    var marker = new google.maps.Marker({
                        map: map,
                        position: results[0].geometry.location
                    });

                    var str = results[0].formatted_address + "";
                    var info = new google.maps.InfoWindow({
                        content : str
                    });
                    google.maps.event.addListener(marker, "click", function()
                    {
                        info.open(map, marker);
                    });
                }
                else
                    alert("Error in address");

I want to add information about the population of the city and its area code. Any help?

Thanks

Upvotes: 2

Views: 6269

Answers (1)

geocodezip
geocodezip

Reputation: 161334

That information (population and Area code) is not available as part of the Google Maps API v3. You will need to find a data source for that (it is possible it might be publicly available in FusionTables). In the US, the population is publicly available from the census. Not sure where to get the area code.

Upvotes: 4

Related Questions