Thanks a lot for this answer Yes, I gave it a try with the getCentroid() method, but what I do not get is how to constrain a rule so as to display a centroid instead of a polygon, without adding the centroid (as a new feature) to the layer. If this is not possible, I think the best option would be to load polygons + centroid features from the server and switch the display between the two using the 'display' property. I would like to avoid this as it would imply quite a lot of additional client-side processing in my case. Cheers Christophe
On Tue, Apr 27, 2010 at 9:12 AM, Pierre Giraud <[email protected] > wrote: > Hi, > > A "getCentroid" method is available for geometries. It should suit your > needs. > > Regards, > Pierre > > > On Mon, Apr 26, 2010 at 11:53 PM, christophe g. < > [email protected]> wrote: > >> >> Hi all >> I am trying to do something similar as what was described in this post >> back >> in .... 2008. >> >> The scenario is the following : >> I have thematic maps (polygons with style rules for rendering different >> colors for indictors attached to the geometry) for which I wish to allow >> users to swap the rendering to proportional symbols (e.g a circle with a >> size/color corresponding to indicator values). >> >> One way to achieve this would be to get centroid information for each >> polygons from the server and render this information as a new layer. >> However, I would clearly prefer a client-side rule-based scenario with a >> rule to be interpereded as : >> show the centroid of the polygon feature in case of proportional symbols - >> instead of the polygon itself. >> >> Is there a way to achieve this? >> Thanks and cheers >> Christophe >> -- >> View this message in context: >> http://osgeo-org.1803224.n2.nabble.com/Show-polygon-vectors-as-points-tp1829267p4965296.html >> Sent from the OpenLayers Users mailing list archive at Nabble.com. >> _______________________________________________ >> Users mailing list >> [email protected] >> http://openlayers.org/mailman/listinfo/users >> > > > > -- > Pierre GIRAUD > Géomaticien, Analyste > > Camptocamp France SAS > Savoie Technolac, BP 352 > 73377 Le Bourget du Lac, Cedex > > Tel : 00 33 4 79 44 44 93 > Mail : [email protected] > http://www.camptocamp.com >
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
