Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Zip Code Boundaries Using Google Maps Api

I need to display google map with zip code boundaries like this

http://maps.huge.info/zip.htm

Perhaps I am overlooking it, but I've not been to find examples of this and documentation talking about this specifically at Google Maps API documentation. I've trying doing a view source on the above web page link, but it doesn't seem obvious to me how it works. There is also other stuff on the page which I don't know if it's part of what I need or not.

Some simple code examples would be very helpful! Thanks!

like image 834
kdeo18 Avatar asked Apr 25 '14 15:04

kdeo18


2 Answers

Google Maps API will not provide you with this data. You need an external source. A Fusion Table could be of some help. You can check this one *.

You then need to create your own layers from the KML data that is in the table. There is documentation about it.

You can render the data directly from the Fusion Table or import it to your own database, which is often preferable for performance.

Hope this helps to get you started. Try to find your way and if you are stuck, then ask another question and show us your code as the first comment suggests.

* FusionTables was discontinued on 3 December 2019.

like image 52
MrUpsidown Avatar answered Sep 18 '22 11:09

MrUpsidown


I parsed the 2016 census kml file (over 150MB) to over 32,000 individual kml files you can use as a kml layer for your maps. I put a zip file here: https://github.com/tomeralmog/zipcode-kml Hope this helps

like image 29
Tomer Almog Avatar answered Sep 21 '22 11:09

Tomer Almog