[postgis-users] Google Maps API with PostGIS

Stefan Keller sfkeller at gmail.com
Mon May 30 14:56:31 PDT 2011


Hi,

2011/5/30 Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
> As you know there are many ways to skin a cat. Without more information on
> your specific use case, I would implement this using OpenLayers and not the
> Google API (in part because it open javascript api for mapping and feature
> manipulation and I know it better than the Google API), and I would probably
> write a simple PHP ajax handler to interact between the web application and
> the database. I assume the building are already loaded in postgis. If you
> need more then say 500 building display on the screen them you will probably
> want to draw them via mapserver as an image overlay, but if you have less
> then passing the features to OpenLayers and rendering them as a vector layer
> is probably fine.

Here's something I did in Ajax/PHP to play around:
>> The PostGIS Terminal - http://152.96.80.16/ <<
Try following query in order to get a convex hull around all Nelson
pubs in Switzerland (from OpenStreetMap):

SELECT ST_AsText(ST_ConvexHull(ST_Collect(way)))
FROM osm_point
WHERE amenity='pub'
AND name ILIKE 'Nelson%'

Yours, Stefan



More information about the postgis-users mailing list