[postgis-users] OpenLayers & Many Points

James Cauchi jamescauchi at gmail.com
Mon Oct 27 23:17:09 PDT 2008


Hi PostGis Community,

My Question:
How to allow the user to change the colour, size and shape of a point
marker based on values from another table in the postgres database?

Background:

I am using GeoServer, OpenLayers and Postgis.
I am storing my points in Postgis and displaying them as an overlay in
Openlayers over a map.
here is my openlayers WMS call:
            coord = new OpenLayers.Layer.WMS(
                "James:coord - Tiled", "http://10.142.8.218:8080/geoserver/wms",
                {
                    layers: 'James:coord',
                    styles: '',
                    srs: 'EPSG:4301',
                    format: 'image/png',
                    tiled: 'true',
                    tilesOrigin : "116.8546194445,18.7313194445",
					transparent: "true"
                },
                {buffer: 0}
            );

There are > 10,000 points showing various facilities around the country.
There are more than 1000 different attributes stored in the postgres
db for each facility (in various separate tables).

For example:
If the user selects the sales attribute the point marker size will be
large for facilities with high sales and small for facilities with low
sales.
The user can also opt to select colour as red to green depending on
the sales figure for example.

Pre-creating all these layers in postgis is impractical since there
are so many attributes to each facility.

Does anyone have any ideas how to do this?

Adjusting each point marker using javascript in OpenLayers is very slow.

Best Regards

James



More information about the postgis-users mailing list