Google map to show name of location if found, otherwise just the address -
I could use Google Maps embedded in my website to show the name of the place if found, and then just do not know So got it? I can get my code to show the address in all cases but this name is being shown in some cases. I have some examples if you look at the first line, then I can work on the map address, but not with the name of the place. In the second line, though both cases are working. I used it for The code is the first one: Now in the second case because Google Maps is not able to find the small + Calcutta + restaurant, it is not even searching for the address. What do I need: If the search with the name is successful, show it by name, search with the other address and ignore the name. That is possible yes use Geocoder Map
Geocoder on;
Geocoder = new google.maps.Geocoder () Before you start this add>
function search () {var Address = document.getElementById ('address'). Values;
geocoder.geocode ({'address': address}, function (result, status) {if (position == google.maps.GeocoderStatus.OK) {// search Complete} Find other {// search again, but subtract your address}
Comments
Post a Comment