I have a PostGIS database that has OSM data imported into it using osm2pgsql and I'm using GeoServer to plot the points into a networked KML file for Google Earth.

What I'd like to do is make the nodes that Geoserver pulls from PostGIS interactive. I'd like to be able to search for an element and have Google Earth query the PostGIS db for results.

I'd also like the ability to click on a POI and have it pop up a dialog with all the attributes from PostGIS.

So far I have a bunch of red points in Google Earth that the KML file added but they are not interactive.

Any suggestions?

1 Answer 1


What you are looking for is a WebMap toolkit that allows interaction with a basemap and interactive layers: http://wiki.openstreetmap.org/wiki/Frameworks#Webmaps Most popular is Leaflet (easy to use but limited) and OpenLayers (more complex). They allow you to display raster maps by different providers and to add map data on top as vector layer.

While it's possible to use KML files to display your data, you might get in trouble as the files can be huge and the webmap is getting slow. So you might use GeoJSON as slim alternative and usually webmaps stream their objects by calling a custom webservice using get_all_objects_in(area). This avoids spamming the client with unusefull data and allows him to get even updated versions of the data.

If you are also looking to allow your users to alter the informations, you might think about using a whole WebGIS framework as MapBender and a WFS service as frontend for your PostGIS DB.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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