Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
2  
Google Map v3 API can use JSON Examples: github.com/JasonSanford/GeoJSON-to-Google-Maps –  Mapperz Apr 18 '12 at 13:54
    
It's Brilliant :). Successful conversion! Thank you! –  KaushikTD Apr 19 '12 at 8:25
    
@Mapperz, your comment should be answer. This question is "de facto" answered and accepted, should be also "de database" :-). –  Tomas Apr 25 '12 at 20:26
    
comment is now an answer KaushikTD can accept if they want too. –  Mapperz Apr 26 '12 at 13:19
add comment

1 Answer 1

up vote 6 down vote accepted

Comment to Answer

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.