Using C++ with Google Maps API. Only text info required - google-maps

Is it possible to call Google Maps API using a C++ code to retrieve text info about nearby locations.
I am trying to make a simple application (C++) which gives the information about Nearby places on entering longitude and latitude info. Only data I am looking for is the Name of Nearby place and its distance from mentioned location.
Is it possible?

I think your best option would be to use the Google Places API with the JSON format for request.
I don't know about any library that would perform the thing automatically, but there is a thread on StackOverflow about JSON parsing in C++ . Even it does not provide an answer it as good votes scores.
I guess the web call could be made with something like curl.

Related

google places JS API localized place type

I am currently working on a project using the google maps JS API. i would like to display the place type in a similar fashion to how a google search would result (example below).
Using the getDetails method in PlacesService (as show here), i can receive an array of types for a place, yet they are not descriptive as what a google search shows, and are not localized. is it possible to achieve using the API?
Currently, the API doesn't provide this information.
There are a couple of feature requests in the Google issue tracker that might match your requirement:
https://issuetracker.google.com/issues/35822953
https://issuetracker.google.com/issues/35827225
You can star these feature requests to add your vote and subscribe to further notifications.

Api suggestion for location finding

I have a growing index of company names, city and state (Sometimes zip/neighborhood, but specifically never address) that I need to get the lat long pair / address for so I can show them on a map.
Anyone have a suggestion the best api to do this with? (its going to be done ~100k times)
you can easily do it by using the google's location Library.
The complete documentation and tutorial video is at
Google Maps Javascript API at https://developers.google.com/maps/documentation/javascript/places-autocomplete

get position of marker in google maps

I would like to extract from google maps a list of marker (bus stop), does exits a way to obtain this list? Can i obtain this information using the google maps API?
More precisely i want to extract the bus stop of my local transport company (CSTP):
https://maps.google.it/maps?q=cstp+Campania&hl=it&ll=40.708751,14.758759&spn=0.489271,0.850067&sll=40.674744,14.792656&sspn=0.06119,0.106258&t=h&hq=cstp&hnear=Campania&fll=40.708751,14.758759&fspn=0.489271,0.850067&z=10
I want some information like position of the marker (long,lat) and the name of the bus stop.
Since now i have tried to use python and the googlemaps library, but other way, like javascript with xml or json, will be well accepted.
i have found out how it should be done. The answer is in the "Nearby Search Requests" of https://developers.google.com/maps/documentation/javascript/places#place_search_requests

How can I use Google Maps with Processing?

I want to use Google Maps API with Processing. Until now I was just able to get Google Places data, but I'm struggling with the map itself. I know about other map options, like unfold or modestMaps, but I need Google. In particular because of the directions API in further progress. I've searched this forum and the web, without any help. I thought it should be quite
easy.
How can I use Google Maps with Processing?
I'm not sure about getting a full featured, dynamic Google Maps within your Processing app, but you might be able to modify the Processing library for the Google Weather API to instead use the Directions or Static Maps APIs. http://www.onformative.com/lab/google-weather-library-for-processing/
If you download the source and check out GoogleWeather.java you can see the constructor is calling the WeatherAPI and getting back the XML result. I think you could do the same thing except use the Directions API in it's place.
Here's a post on a Java blog about showing Static Maps API results in Java, which might be translatable into Processing: http://weblogs.java.net/blog/cajo/archive/2010/10/16/adding-google-maps-your-java-application
For something more dynamic, you might be able to adapt JXMapViewer, check out this article: http://today.java.net/pub/a/today/2007/10/30/building-maps-into-swing-app-with-jxmapviewer.html

Google Maps API - Get Coordinates of address

I would like to convert addresses into long/lat.
Is there any way to do this without using JavaScript? Because in my case there is no need to display anything since the conversion is in the background.
What you are looking for is called Geocoding.
Google provides a Geocoding Web Service which should do what you're looking for. You will be able to do geocoding on your server.
JSON Example:
http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA
XML Example:
http://maps.google.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA
Edit:
Please note that this is now a deprecated method and you must provide your own Google API key to access this data.
Althugh you asked for Google Maps API, I suggest an open source, working, legal, free and crowdsourced API by Open street maps
https://nominatim.openstreetmap.org/search?q=Mumbai&format=json
Here is the API documentation for reference.
Edit: It looks like there are discrepancies occasionally, at least in terms of postal codes, when compared to the Google Maps API, and the latter seems to be more accurate. This was the case when validating addresses in Canada with the Canada Post search service, however, it might be true for other countries too.
Geocoding through Javascript:
https://developers.google.com/maps/documentation/javascript/geocoding
A Nuget solved my problem:Geocoding.Google 4.0.0.
Install it so not necessary to write extra classes etc.
https://www.nuget.org/packages/Geocoding.Google/