Google Maps Shading of Australian Suburbs

痞子三分冷 提交于 2019-12-07 05:28:15

问题


I need a way to shade Australian suburbs in different colours based on my input. Not sure of how to do this with Google Maps API. Google maps has Australian suburbs boundaries and I want to tell Google Maps to shade each Suburb a different colour based on my instruction. I am very very open to how to do this.

My goal is to have a Google Map that is interactive that has suburbs shaded different colours. You can zoom out and look across a region and see if there are suburbs in common or with different colours. The key would be based on things like Median house price, house sale volumes, demographics etc.

Why: There are 3 reasons to do this.

  1. To place a screenshot in a powerpoint report
  2. Send a link to a client and show them their area with different information encoded
  3. Built a system in the future that pulls this from a DB and generates this as part of a web portal

How: I have a spreadsheet with information like: Cherrybrook, Red, Castle Hill, Blue, Kellyville, Pink (or HTML colours, or numbers - whatever the format required can be generated).

If possible I also want to label the suburbs based on the colour that they become (this may be a Google Earth feature).


回答1:


You might be able to use the Polygon class, but there are performance limits on how many polygons you can show at once. If you only show one metro area at a time, you might be okay.

More likely, you will want to create tiles. See https://developers.google.com/maps/documentation/javascript/overlays for documentation on tiles.

This is very powerful. You can see, for example, a web site I and a friend made which shows Australian 2006 census data by census tract by using tiles at: http://sunburntpeople.com/census/



来源:https://stackoverflow.com/questions/10597683/google-maps-shading-of-australian-suburbs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!