[OpenLayers-Users] Show polygon vectors as points

Christophe Geiser christophe.geiser at gmail.com
Tue Apr 27 16:51:53 EDT 2010


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 <pierre.giraud at camptocamp.com
> 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. <
> christophe.geiser at gmail.com> 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
>> Users at openlayers.org
>> 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 : pierre.giraud at camptocamp.com
> http://www.camptocamp.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100427/57901baf/attachment.html


More information about the Users mailing list