[OpenLayers-Users] GeoJSON layer and modifyFeature control

Eric Lemoine eric.c2c at gmail.com
Thu Dec 4 11:58:34 EST 2008


Hello

Try:

new OpenLayers.StyleMap({
    "default": yourStyle
});

Hope this helps,

Eric

2008/12/4, Adorian Ardelean <mynature at gmail.com>:
> Hi again,
>
> I have eliminated also the context for style as a source of problem for the
> modifyFeature control not working. So it seems that just by specifying a
> styleMap as option when declaring the vector layer makes the modifyFeature
> control not functional.
>
> var template = {
>     fillOpacity: 0.6,
>     fillColor: "red",
>     strokeColor:"orange",
>     strokeWidth:"1"
>     };
>
> var mystyle = new OpenLayers.Style(template);
>
> var regions = new OpenLayers.Layer.Vector("regions",{extractAttributes:true,
> format: OpenLayers.Format.GeoJSON, projection: new
> OpenLayers.Projection("EPSG:4326"), styleMap: new
> OpenLayers.StyleMap(mystyle)});
>
>
> I think the solution might be somewhere in the post:
> StyleMap and ModifyFeatures aren't compatible ?I will give it a try.
>
> All the best,
> Adorian
>
>
> Dr. Adorian Ardelean
> coordinator of myNature Project
>
> http://mybiosis.info/nature/portal.php?pagename=firstpage [a Romanian
> biodiversity-database]
> http://mybiosis.info/nature/portal.php?pagename=adorian [CV]
>



More information about the Users mailing list