Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 416153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:27:08+00:00 2026-05-12T18:27:08+00:00

My goal is to display various shapes(polygons, points, linestring) on google maps by using

  • 0

My goal is to display various shapes(polygons, points, linestring) on google maps by using data entered into a Postgis database dynamically(i mean by that we can see modifications in the map in real time).
I was looking for a way to do this that used the spatial structure already provided in postgis(already designating if shape is a linestring or polygon, etc) instead of parsing out the coordinates and then re-entering spatial structure in google maps. I saw that google maps api is now compatible with kml data formats. And then I read that i have to convert postgis data to kml format.
I’ve done some reading in the forums about the actual process of converting postgis data to kml via FWTools, but didn’t see anything that would help me. I’m new to kml but am familiar with postgis and perl and PHP. Is there a tutorial for the process of converting postgis data to kml? Where can I get started? Thanks for any help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:27:08+00:00Added an answer on May 12, 2026 at 6:27 pm

    You can get a textual representation of the spatial data from a Postgres DB using a text conversion function, like

    SELECT AsText(MyGemoetry) from MyTable
    

    then you parse the string, create your objects using various API functions – depending on the PostGIS geometry type – and append these object to the main GE plugin object in a DOM like way.

    If you are familiar with JavaScript and have a fundamental knowledge of XML, a good start is http://code.google.com/apis/earth/documentation/reference/

    Don’t forget to specify unique ID’s to your objects so you can find them later to drop/modify.

    Maybe you can get some inspirations here, display the linked “locator.js” file and look at function PaintSubField(Coord) … this is another way, bit crude but effective, avoiding to mess around with too many individual parent/child objects and structures

    You also may want to consult sample applications and use the code playground for “rapid prototyping”

    re “realtime” you need at least an event that you can link your generation/redraw routines to.

    Good luck
    MikeD

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Goal: Create Photomosaics programmatically using .NET and C#. Main reason I'd like to do
My goal is to integrate testing into my development environment (as post-build step). I
In the Maven document Introduction to the Build Lifecycle , a goal of display:time
My goal is to display the same icon twice, but each time in different
My goal is to display the profile of a user. I have this function:
My goal is to display a list of tasks with checkboxes. Checking the checkbox
Here is my goal: I would like to be able to report various metrics
Goal: Display the value of the calculation in the html page. problem: After you
Goal: Display a picture, that is saved inside of my application, in my document.
Goal: Calculate and display right answer in the last td in the tr by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.