I need to get cities, cities, neighborhoods, etc. next to a point on google maps. I used the Google Places service on the map, but I only get hotels, shops, etc., No political places.
For example, try to get all the political places in Paris (100, rue de la Parcheminerie, 75005 PARIS) within a radius of 10,000 meters.
And you get only one result: Paris [locality, political] type.
There is no information about other areas, cities, cities, etc.
Then try a radius of 100,000 meters and zero results.
Code example:
function getPlacesOnRadius() {
var request = {
location: centerPoint,
radius: radius * 1000,
types: ['political']
};
var service = new google.maps.places.PlacesService(map);
service.search(request, callback);
}
function callback(results, status) {
if (status == google.maps.places.PlacesServiceStatus.OK) {
for (var i = 0; i < results.length; i++) {
var place = results[i];
}
}
}
By the way, I have already established the political types.
source
share