0

I posted a question yesterday asking if anyone knew how to make google maps return the country name with reverse geocoding for England, Scotland and Wales as currently it sees them all as "UK". No one replied so I don't think it's possible/easy? Googlemaps Reverse GeoCoding Get Country Name, UK Countries

So I am looking for different approaches..

I have tried creating a polygon for each of the countries, but the number of coords is huge so it really slows down google maps.

I am starting to look at creating map tiles from shape files and some how using them but I still can't see me being able to detect a click..

There has got to be some way of doing this? Anyone got any advice PLEASE! I am getting desperate!

Bex

Community
  • 1
  • 1
Bex
  • 4,898
  • 11
  • 50
  • 87

2 Answers2

2

I took a completely different approach and used postcodes. I have stored the first parts of the post codes in the DB . When I get the details of the place clicked I know the country, so if it's United kingdom I check the postcode. If the post code matches any in the DB I know the country. Got to bear in mind the SY postcode spans both Wales and England, so you need all the postcodes so you can split them. Very long winded, but works!

Bex
  • 4,898
  • 11
  • 50
  • 87
0

View the source of http://home.provide.net/~bratliff/polycluster/v3/absurd.html to see how to handle an "absurd" amount of polylines in a polygon.

Edit: that links's broken. The Archive.org cache has the page and some JS files but it doesn't seem to be working. You might be able to see what the JS is doing there.

dave1010
  • 15,135
  • 7
  • 67
  • 64