Google map to show name of location if found, otherwise just the address -


itemprop = "text">

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.

Enter image details here

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

"itemprop =" text ">

yes use Geocoder

Geocoder on;

Map

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

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -