[OpenLayers-Users] Can't set style for ModifyFeature control...

Mark Nine mbailen at usgs.gov
Mon Sep 22 13:17:33 EDT 2008



This got me half-way there.

When I select the feature, the style gets set, but when I begin to modify,
the style disappears.  I tried setting/unsetting toggle and clickout, but
they did not help.  Using FF 3 and OL 2.6.

Any ideas?

Thanks, Mark





Andreas Hocevar-3 wrote:
> 
> Hi,
> 
> On Fri, Sep 19, 2008 at 10:18 PM, Mark Nine <mbailen at usgs.gov> wrote:
>> I'm having difficulty setting the "select" style for the ModifyFeature
>> Control. The documentation for ModifyFeature has a property for
>> virtualStyle
>> (which sets the style for the vertices and works for me), but not
>> selectStyle. Do I need to create a SelectFeature Control along with my
>> ModifyFeature Control?
>>
>> edit = new OpenLayers.Control.ModifyFeature(boundingBoxLayer,
>> {selectStyle:
>> green_style, mode: OpenLayers.Control.ModifyFeature.RESHAPE});
> 
> Instead, try:
> 
> edit = new OpenLayers.Control.ModifyFeature(boundingBoxLayer, {
>     mode: OpenLayers.Control.ModifyFeature.RESHAPE}
> );
> edit.selectControl.selectStyle = green_style;
> 
> Regards,
> Andreas.
> 
> -- 
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/Can%27t-set-style-for-ModifyFeature-control...-tp19520456p19612573.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list