Google Maps API Webservice usage in windows forms application - google-maps

My requirement is this.I need to get the latitude and longitude for a given address using Google Maps API. I found in the Google Developers site the following web service which takes address as input and returns so much information of the given site which includes latitude and longitude also. I checked this by executing this URL in the browser.
Latitude and longitude information is coming under geometry/location section. I want to use this web service in windows based application and gets the latitude and longitude of different sites by passing different sites information to this web service each time in a loop.How can I do this?

Looks like you will have to either establish a static list of sites to iterate through them and modify the url accordingly or assemble the same url for the site that is requested by the user.
Also, you will need an XML parser:
http://msdn.microsoft.com/en-us/library/9d83k261.aspx

Related

Ionic2/3: Is it possible to open google map APP by passing custom lat- long?

Currently i am working with ionic 3 project.
I have latitude and longitudes of particular location and want to get root of that location using google map Mobile Application, Just want to open that location by navigating to google map app.
do anyone here with any suggestions or idea ?
Thanks
As of 2017 the recommended by Google method is the Google Maps URLs:
https://developers.google.com/maps/documentation/urls/guide#directions-action
You can create a cross-platform universal URL for Google directions following the documentation and use the URL in your intents. For example the URL might be something like
https://www.google.com/maps/dir/?api=1&destination=60.626200,16.776800&travelmode=driving
You can use Ionic Native Launch Navigator now to load the native maps app to a destination. You can specify the app launchnavigator.APP.GOOGLE_MAPS or the user can specify.
Pass the lat long as first argument as shown here
this.launchNavigator.navigate([50.279306, -5.163158], options)
.then(
success => console.log('Launched navigator'),
error => console.log('Error launching navigator', error)
);
The recommended by Google way is using the Google Maps URLs API:
https://developers.google.com/maps/documentation/android-api/intents
Using Maps URLs, you can build a universal, cross-platform URL to launch Google Maps and perform searches, get directions and navigation, and display map views and panoramic images. These universal URLs allow for broader handling of the maps requests no matter which platform the user is on.

What data is sent to Google Maps API

I have searched for information on data and data security when using the Google Maps API, but I haven't been able to find anything that answers my specific question. We were looking to use Google Maps to to plot our customers and overlay some other information on top. I have all the customer details (name, address, postcode, Lat, Lon and other key details) in a file and have been using some test data. I have successfully been able to plot the test data on Google Maps and it looks like it is exactly what I would want to use.
The question I have is what data is sent to Google for the map to be rendered - does all of my data go external, or am I just pulling the maps back to the browser and rendering the data locally within the browser (ie. no data goes externally).
Thanks
Your additional data are never sent to Google servers. All the map is built in JS, so once you have loaded Gmap scripts, there is no need to sent data.
You can check that in your browser developer console : no additional AJAX request are made to Google, once the first one for displaying map is finished.
If you use geocoder or directions service (and maybe other services, but I have never use them), you have to send addresses or LatLng to Google via AJAX in order to make calculation.

how to integrate google latitude into a google map

I am setting up a website that shows a Google map and the location of various Google Latitude users on that map via markers.
Thing is, I can't find the exact code to do that. I have trawled through the Google API docs which are extensive but lacking in examples, actual examples of how a finished page might look.
So, I have my Google Map in place and I have registered an account on the Google API and set up OAUTH2 (got my clientID etc.) but I am stuck as to what to do next.
Any suggestions much appreciated.
The Latitude API documentation will tell you all the specific things it can do. It won't do general things for you like "put markers on a Google map"- it is meant to be used rather separately from Maps API. Your application will have to get Latitude oauth authorization for each of the users and use access tokens to request their locations. Only then will you start using Maps API to plot markers of those locations.
It sounds like you have no prior knowledge of any particular framework, so I'll outline how I would do it with Rails, which I believe to be easiest:
Build Omniauth into a new application, so that the user can sign in with Google. There are tutorials to assist you. The sign-in will result in an access token being stored in your database.
Add the latitude 'scope' to your omniauth implementation. The scope can be found in the latitude documentation, and the syntax to add it is found in the omniauth documentation.
For security reasons peculiar to latitude, you'll have to store the 'refresh token' that's supplied only on the first google sign-in for each user and exchange it hourly for a new access token as explained in the google oauth documentation.
Once you have a valid access token for each user at all times, you can use a library such as HTTParty to complete the GET described in the latitude documentation and retrieve a location.
Build a Google Map into a rails view as described in the Maps API documentation. In the controller action that processes that view, you can pass in the user locations for use as markers.
Good luck.

Using Custom Google Map in my Web App is legal or not?

I am developing a web application, i have following uses of google maps
List some facilities like film theater in map as thumbnail with contact details (i have kept latitude and longitude in my database)
show route and directions from user location to that facility
is this legal to use in an application for public use..?
if there is no problem with that, please suggest your developing ideas...
thanks in advance....
Showing the facilities will likely be done via the Maps API and adding markers
https://developers.google.com/maps/documentation/staticmaps/#Markers
showing route/directions will use the Directions API
https://developers.google.com/maps/documentation/directions/#DirectionsRequests

Get latitude / longitude / Reverse Geocoding without displaying maps

Using a website, I am trying to capture user's latitude / longitude point and based on that grab his current address.
I am able to do this using Google Maps API: geolocation and Reverse GeoCoding. But, my requirement is to get this information without displaying the map. As far as I have read, Google Maps Term of Use prohibits such thing.
Can anyone let me know if there is any other service which can serve my purpose without displaying maps or does Google Maps allow such thing? I am not sure about Bing, Yahoo.
EDIT: On page load, I need to grab user's latitude and longitude and based on that get address information. I am planning to use this address information for displaying nearby locations/places to visit. I have to achieve this without displaying any map.
Yahoo PlaceFinder does it. If you pass through the latitude and longitude in the location parameter and gflags=R, it should return address data.
You'll have to get a Yahoo APP id, but its free and pretty easy to set up.
EDIT: I see you want to do geolocation too, if you can't use google I would investigate html5 geolocation and or use freegeoip.net to geolocate by ip address.
I don't know if Im mistaken this post, but if you read this:
(viii) store or allow end users to store map imagery, map data or geocoded location information from the Yahoo! Maps APIs for any future use;
(ix) use the stand-alone geocoder for any use other than displaying Yahoo! Maps or displaying points on Yahoo! Maps;
It's mean that you can't store the information, or make use of it, without maps.
So the google api and the yahoo api need to have a map...
note- I take that lines from the terms of yahoo: http://info.yahoo.com/legal/us/yahoo/maps/mapsapi/mapsapi-2141.html
EDIT - Now I'm trying to use http://www.geonames.org/export/reverse-geocoding.html It's easy, and works fine for me. I just need the city and maybe a postal code.
I don't think Yahoo requires you to show a map and it also has a higher quota.
http://developer.yahoo.com/geo/placefinder/
There are a number of geolocation APIs - here is a really good one:
https://geoip.nekudo.com/
You merely make a GET request to
http://geoip.nekudo.com/api/{ip}/{language}/{type}
where ip, language and type are optional.
E.g. in Angular 5, using HttpClient:
this.http.get('http://geoip.nekudo.com/api/')
.subscribe(
data => { console.log('SUCCESS! Your coords are lat:', data.location.latitude, 'long:', data.location.longitude); },
error => { console.log('ERROR!', error); }
);
Also, note that the geoip service is written in PHP and open source (https://github.com/nekudo/shiny_geoip) so you can house your own implementation to reduce third party dependencies.