Google Maps API Displays Geographic Data

I want to be able to show the contours of zip codes, cities / suburbs and states / territories in Australia via Google Maps. The idea is to give the user the ability to click on an area to select it.

I understand that I can create an overlay to show the outlines, but for this I need the data to draw the outlines.

I noticed that when searching on Google, then click on the map result, it highlights the city / suburb / state. This seems to work for all the suburbs I've tried in Australia, as well as for states and US cities.

Here is an example: Denver outline

So my question is: how do I find the data that I need for this and / or can I somehow rely on the Google Maps API to get this data for me?

Thanks in advance!

EDIT:

Thanks to @Mano_Marks, this is a data source provided by the AU government: http://www.abs.gov.au/AUSSTATS/ abs@.nsf /DetailsPage/1259.0.30.0022006?OpenDocument

Now I just need to figure out how to actually use this to create overlays with Google Maps.

+4
source share
1 answer

I don’t know what is the cleanest way, but you can load these KML files or something into the Google merge table. They provide an API for creating polygons from your datasets.

and you can do something like

layer = new google.maps.FusionTablesLayer({ query: { select: 'geometry', from: 'your data ID', }, styles:[], }); 

and

 layer.styles.push({strokewidth:xxx, strokecolor:yy, fillOpacity: blahblah}); 

go check this https://developers.google.com/maps/documentation/javascript/layers

+2
source

Source: https://habr.com/ru/post/1394168/


All Articles