How can I find the number of businesses in a certain radius? - google-maps-api-3

Given the following:
Coordinates of a certain place
Radius in meters
A business category, aka "supported place type" (like "art_gallery")
I can get details of all (limited by 20) art galleries in that given area, by calling:
https://maps.googleapis.com/maps/api/place/search/json?location=51.4918296,-0.1926405&radius=1000&types=art_gallery&sensor=false&key=MY_KEY
Since the use of this API is limited to 20 results (lately paging is possible, but it's slow and limited as well), questions like "What's the number of restaurants in a two mile radius?" are not practical.
Note: I don't need the details of the businesses - just the total number.
Is there an alternative to the API mentioned? using Google API or others?
As I get no answers (perhaps because there isn't an answer other than "No"), here is an alternative question:
Is there an API that can supply a static map image, showing all businesses of a certain type in a certain area? i.e. for "Interior Design shops in Hampstead, London" show me:
I know there's Google Static Maps API, but I couldn't find any integration with Google Places API.

Couldn't you use Google Maps Image APIs for part of your question?
IE:
<img src="https://maps.googleapis.com/maps/api/staticmap?center=-15.800513,-47.91378&zoom=11&size=400x150&sensor=false&types=art_gallery">
for
See https://developers.google.com/maps/documentation/imageapis/

Related

Can I get reviews or stars for hotels or restaurants in HERE Geocoding & Search API?

I can't seem to find anything in the documentation (link), but the previous version of the Places API (link) said:
Certain types of categories, such as restaurants or hotels, are ranked via a "recommendations-style" algorithm where measures of popularity or quality, such as number of stars or reviews, are taken into account.
Does that mean that I would be able to retrieve info on number of starts for a hotel or ratings for restaurants?
Rating is Rich content. Rich content is not covered within the base or extended content and is generally provided by third-party data
suppliers.
See more on references from Geocoding and Search API 7 Discover API here https://developer.here.com/documentation/geocoding-search-api/dev_guide/topics/endpoint-discover-brief.html

How do you query all points whose radius contains another point in Firebase's Firestore?

Problem
You have a food delivery app where you need show a user a list of restaurants that'll deliver food to it's house.
Constraints
Each restaurant has a potentially different delivery radius.
Your restaurant database is Firebase's Firestore.
Keep in mind
This is a web-based project and I'm using Firebase's frontend JavaScript library.
However, if you feel like you can answer the question in an abstract way or with a different implementation please go ahead.
I'm not interested in a real-time implementation, just a simple one-off listing of restaurants that fit the criteria.
I'm familiar with using geohashes to query nearby points using geofirestore-js or geofirex. There are a few StackOverflow questions about that. However, this is not what I'm asking, as delivery radius of each queried point needs to be taken into account. It doesn't matter how close the restaurants are to the user, just if their delivery radius covers its location.
Any geohash implementation should provide a solution for dealing with it's edge cases.
Example
We have 3 restaurants, A, B, and C. These are stored in our Firestore database as a document containing position (lat/lng, geohash, both, whatever you choose) and delivery radius in km (though unit is not important).
We also have the user's current position, in our delivery app's client client.
You'll notice that restaurant C is the closest one to our user yet it's the only one that doesn't deliver to our user's location. Therefore, our query should only return restaurants A and B.
So, my question is:
How do you query all points whose radius contains another point in Firebase's Firestore?
Or, in this scenario:
How do you query all restaurants whose delivery radius contains our user's location in Firebase's Firestore?
I'm sure there are better ways to put this, but this is as far as my knowledge on the subject has taken me. Thanks in advance.
Icons made by Smashicons from www.flaticon.com
Icons made by Freepik from www.flaticon.com

How to get accurate/fresh POIs with Map tiles REST API?

A tile sent from Nokia Here-Map tiles API, contains at least two POIs that do not exists in real life and also not on other Map services like Google Maps and OpenStreetMap. How can i get accurate/fresh POIs with the Map Tiles Api?
I'm using the service with LeafletJs, and i use a hybrid.day base map and a base one, with the pois parameter set to true and map version set to "newest". The tiles i'm getting effectively contains POIs but it doesn't seem accurate. I wrote to the sales support at Nokia Here, i'm not sure they can help me, but the website also indicate to use stackoverflow for technical questions. Mine doesn't seem like a sales related question or a technical one but i see no other alternative contact.
This is a link to get a tile with incorrect POIs:
https://4.base.maps.cit.api.here.com/maptile/2.1/maptile/bd9e007617/normal.day/17/59178/60113/256/png8?app_id=mVrBstuYsfUVga31l6IX&app_code=xphvU-Uj071dI-UkNaxMrg&lg=fre&pois=true&style=default
The tile contains two POIs that do not exists in real life or on other map services like OpenStreetMap. The two are: "Ecobank" and "Restorant Aku".
The place the map shows is around these coordinates: lat:14.729235451930021
lng:-17.46165559897639
The returned tile shouldn't contains inexistant POIs.
This is an error in HERE database. You should report it through HERE Map Creator
It will go through some kind of quality moderation, so it may take a few weeks. Maybe adding a fresh photo would speed up things.

Insta-like filters on Google Street view imagery

Is it eligible to apply real-time insta-like filters on Google Street View imagery retrieved via the google street view API that will be published online as a part of a slideshow in a web app?
No Google street view Content will be cached on a third party server in the process.
Do you think this would be in alignment with google's terms?
Streetview seems to be under the Google Maps umbrella as far as the api TOS goes. The document isn't that long, but your use case doesn't seem to be in direct violation. I would still be wary of something such as Section 8.3 (a):
Content (including but not limited to map data, traffic, directions,
and places) is provided for planning purposes only. You may find that weather conditions, construction projects, closures, or other events may cause road conditions or directions to differ from the results depicted in the Content. You should exercise judgment in your use of the Content.
Although that seems more like a caveat emptor warning admonishing them of liability if their data is inaccurate and tells you to turn left off of a cliff. I insist that you should really read the actual terms. There are a lot of little things that they seem to be worried about in there and I would definitely recommend having an attorney help you navigate what's going on in there.
I'd hazard to say you'd be fine especially with no caching, but you should really consult with an attorney and read the terms.

Is it possible to merge Google Places API with Google Geocoding API?

I am in the process of building a booking system and I'm wanting to do a lookup, based on a text field, that searches both businesses and addresses.
For example, a user is presented with an Input Box that asks them to enter a location. I want it to support Businesses and Addresses.
My current implementation uses the Geocoding web service, but it's unable to find businesses, so I need to bring in the Places API.
I also need to find the distance between these places using the Google Distance Matrix Web Service.
I thought I'd solved my problem by JUST using the Google Places API, but not all addresses are listed on it.
Any ideas / previous experience is greatly appreciated.
You can use both of these on the page, and place a condition for an unsuccessful search on one (i.e. missing or empty variable) to trigger the other.

Resources