[OpenLayers-Users] Hide/Show a Vector Feature?

Zac Spitzer zac.spitzer at gmail.com
Mon Jan 12 07:47:50 EST 2009


does that just make it invisble tho?

Renderer/Elements.js line 473 does an explicit check for

 if (style.display != "none")

z

On Mon, Jan 12, 2009 at 11:22 PM, Andre Pereira de Matos
<andre.matos at co.sapo.pt> wrote:
> You can try this one too
>
> feature.style.pointRadius = 0;
> feature.layer.drawFeature(feature);
>
> To show the feature again:
>
> feature.style.pointRadius = lastPointRadius;
> feature.layer.drawFeature(feature);
>
>
> Regards
> André Matos
> http://mapas.sapo.pt
>
>
>
> To
>
> -----Original Message-----
> From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] On Behalf Of Zac Spitzer
> Sent: segunda-feira, 12 de Janeiro de 2009 12:17
> To: Salvaro
> Cc: users at openlayers.org
> Subject: Re: [OpenLayers-Users] Hide/Show a Vector Feature?
>
> try feature.style="";
>
> On Mon, Jan 12, 2009 at 10:46 PM, Salvaro <asufsc at gmail.com> wrote:
>>
>> Thanks.
>> But what you do to show after?
>>
>> Set display=false in the Style and redraw the Layer works and hide the
>> feature.
>> But when I try to set display=true and redraw didn't show the feature =/.
>>
>>
>> zspitzer wrote:
>>>
>>> setting feature.style="display:none;" and redrawing it works for me
>>>
>>> On Mon, Jan 12, 2009 at 9:43 PM, Salvaro <asufsc at gmail.com> wrote:
>>>>
>>>> Is possible hide a VectorFeature added in a Vector Layer?
>>>>
>>>> Thanks.
>>>> --
>>>> View this message in context:
>>>> http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145088.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
>>>>
>>>
>>>
>>>
>>> --
>>> Zac Spitzer -
>>> http://zacster.blogspot.com
>>> +61 405 847 168
>>> _______________________________________________
>>> Users mailing list
>>> Users at openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>
>> --
>> View this message in context: http://n2.nabble.com/Hide-Show-a-Vector-Feature--tp2145088p2145259.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
>>
>
>
>
> --
> Zac Spitzer -
> http://zacster.blogspot.com
> +61 405 847 168
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168



More information about the Users mailing list