Thursday, 13 September 2018

Output polygon data from postGIS and read it on Google Maps API


So, I have a group of polygons stored in PostGIS. I'm trying to build a web application with Google Base maps (using Google Maps API). Now, How do i output the polygons in the right format so that Google Maps API can read it?


I know about ST_Askml which outputs the data as KML, but what is the Google Maps function to read a kml on the fly? Or is there an alternative to outputting it as kml? Can i pull out the co-ordinates of each point on a polygon and load it onto the API on the fly?



Answer



Comment to Answer



Google Map v3 API can use JSON Examples: github.com/JasonSanford/GeoJSON-to-Google-Maps – Mapperz♦ Apr 18 at 13:54


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...