muhammad maaz
muhammad maaz

Reputation: 77

google map help needed

I have list where iam showing cities when a country is selected from a dropdown.Now accross each city iam showing google map icon.when the icon is clicked iam showing the google map of that city in an iframe in facebox.The code for the iframe is;

<iframe width='425' height='350' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='https://maps.google.com/maps?q=***$cityName***&hl=en&amp;ie=UTF8&amp;ll=37.0625,-95.677068&amp;spn=42.224734,56.513672&amp;t=m&amp;z=4&amp;output=embed'></iframe>

But its not showing that particular city in google map.Please have a look to it and suggest what should i do to get that perticular city.I have country name as well.

Thanxx in advance;

Upvotes: 0

Views: 211

Answers (2)

Dr.Molle
Dr.Molle

Reputation: 117364

Remove the ll-parameter from the URL.

When the ll-parameter is provided the map is centered at the position specified via the ll-parameter, not at the adress(when sucessfully geocoded) specified via the q-parameter.

http://jsfiddle.net/doktormolle/nvdCt/

Upvotes: 1

Yotam
Yotam

Reputation: 358

You are looking for reverse geocoding which help you get your particular country, city automatically when map is loaded.

You can find the reverse geocoding list here

You can read about Google Geocoding API to help you understand more.

Also related content.

Upvotes: 0

Related Questions