0

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;

muhammad maaz
  • 77
  • 1
  • 9
  • There is nothing to take a look at. Please share the code. not just the iframe tag. – defau1t Aug 16 '13 at 11:46
  • 1
    thank you sir for your reply.Sir iam passing dynamically city name in the map src.kindly give me any solution where i can pass the city name and country name and get the map – muhammad maaz Aug 16 '13 at 11:57

2 Answers2

1

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/

Dr.Molle
  • 116,463
  • 16
  • 195
  • 201
0

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.

Community
  • 1
  • 1
Yotam
  • 350
  • 2
  • 14