Google Maps JS API FusionTableLayer - Get LatLng From Geocoded Location - google-maps-api-3

I've searched google every way from Sunday that I could think of but I cannot seem to find an answer to my question.
Right now I have a map that is using a FusionTableLayer to display the location of geocoded addresses. Does anyone know if it's possible to get the LatLng coordinates of the geocoded address without having to do a secondary geocoder call to geocode the address? Or maybe get an array of all of the markers currently displayed?
like myFusionTableLayer.getMarkers() or myFusionTableLayer.getMarkerLocation(index) or something would be helpful.

It is not possible to retrieve the locations from geocoded addresses in FusionTables. It used to be possible, but that capability was removed, I believe for legal reasons.
If you geocode the addresses outside of FusionTables and store the coordinates in the table, they will be available.

Related

Is it possible to include businesses in the HERE Geocoder Autocomplete Search?

Use Case:
I've got a search box where the intention is to search for addresses, cities and businesses, and up to 5 matching locations will be returned. Then, I'll use the geocoder to get lat/lon coordinates for a selected location based upon locationId.
Desired Outcome: The geocoder autocomplete API works well for cities/states/addresses/etc., but I'd like for the results to include businesses as well (where a business result would come with a locationId). Is this going to be possible with the Here API? Using the Places segment of the API would be an option as well if there's a path forward along that route.
NO, Geocoder API helps to find only addresses based on housenumber, street, country ,county, pincode but it does not tell you if the address is of a business category.
You can try Places API and check if it works for your usecase. Read more at developer.here.com/documentation/places/topics/quick-start-find-text-string.html.
Below is an example of Hotel category(Business) in Sunny Vale, CA. You can get the id and location details here.
https://places.cit.api.here.com/places/v1/discover/explore?at=37.370831%2C-122.024636&cat=500-5000-0000&cs=pds&Accept-Language=en-US%2Cen%3Bq%3D0.5&app_id=xxxx&app_code=xxxx

Finding Places without providing nearby location

In Google Maps, I can type in 'Eiffel Tower' and it will present the correct location/Place. But using the Places Library with Maps API, it seems that you must always provide a nearby location when searching. You can't search for 'Eiffel Tower', it has to be 'Eiffel Tower' and you have to provide coordinates for 'Paris, France' as well. Is there any way to achieve an API experience closer to the regular Google Maps experience?
UPDATE:
If I search with the regular Maps API Geocoder, 'Eiffel Tower' does in fact return the correct address. But if I search Geocoder with 'Madison Square Garden', I receive completely unrelated locations. This is despite the fact that the Google Maps website does immediately identify 'Madison Square Garden' correctly.
Summary: It seems that the Places Library cannot search Places without a nearby Location provided. Additionally, Geocoder can sometimes search for famous places but not other times. Results do not seem to correspond to the Google Maps website results.
When you search in Google Maps, you ARE providing a "nearby" location. It uses the center/bounds of the current map view. Searching for a place without context wouldn't be very helpful.

How to set correct heading for Google Maps JavaScript API Version 3 in case of postal address is specified?

I am struggling with the following problem and can not find any solution in the Goolge Maps API docs or in the net, therefore I will try to post my question here:
I was using Googles Static StreetView Image API, where you can pass as a location a long/lat or a string with a postal address. In my case I was always using the string approach that contains in most cases the address with a housenumber. I was astonished by the results of the returned image, which was in most cases perfectly oriented in the direction to the searched address.
Now I wanted to give the JavaScript API for StreetViews a try. It works perfectly fine with the only available interface for a location through specifing the address through long/lat values. Through the optional pov parameters the heading can be specified too. But in case you want to initialize the StreetView with a postal address with a housenumber you are lost with that API. The only way is to geocode the postal address to a long/lat value through the Geocoding API but with the handicap of loosing the heading information. As a final result the initial StreetView image was completely different oriented in such a case.
I checked again the Static StreetView Image API and found following comment to the heading member:
heading (optional): ... If no heading is specified, a value will be calculated that directs the camera towards the specified location, from the point at which the closest photograph was taken.
Is there anything I can do here? How can I find the perfect heading between the position of the made photo to the location I am looking for? It seems only Google can do this through some internal magic for the Static StreetView Image API.
1) Indeed geocode the postal address to a long/lat value, so you have the 'exact' location of the house.
2) Use streetViewService.getPanoramaByLocation to see if streetview is available, and the response will include the exact location where the streetview image was taken.
Now you can calculate the heading between both points (1 being 'the house', and 2 being 'the camera'). You can use the google.maps.geometry.spherical.computeHeading function for this - see https://developers.google.com/maps/documentation/javascript/geometry#Navigation

How to get the road name in google maps?

i want to get ONLY the road name in google maps not exact address, using either the geocoder or the directions service.i tried this results[0].address_components[1].long_name but it returns several different names (not necesserily wrong) on the same road.
You need to do a reverse geocode lookup on the location. Google provide this: http://code.google.com/apis/maps/documentation/geocoding/
Read more here: http://en.wikipedia.org/wiki/Reverse_geocoding

help geocoding a vb.net dataset

i am looking to map a dataset of addresses on a map.
basically, i want the users to type a street name in my town and be able to see the houses that have signed up already on that street. so a pinpoint should show up on the houses that came up on the dataset.
at first i was thinking of just geocoding all the address and uploading the excel sheet into a database however, this wont work because new signups would then lack longitudes and latitudes
so what i am aiming to do is geocode the addresses on server side and then mapping the geocoded results
The Artem Google Maps control, available on Codeplex.com will let you geocode using the Google Map API from an address. If you have a very large number of records you want to geocode, I recommend MS Mappoint, which has a COM API that can easily be called from .NET.

Resources