[OpenLayers-Users] Changing style of feature parsed by GeoJSON

Stefan Lischke lischke at novacom.net
Mon May 4 06:39:59 EDT 2009


> On Wed, Apr 29, 2009 at 05:16:50PM +0200, Stefan Lischke wrote:
> > Hi,
> > 
> > I desperatly try to change the style of a OpenLayers.Feature.Vector 
> > that i parsed with OpenLayers.Format.GeoJSON. Since i 
> cannot not give 
> > the style in the Feature Constructor i'm searching for 
> another way to do it.
> > Is it possible to include the style atrributes within the GeoJSON?
> > 
> > I tried to use the old style by set the style attribute and 
> redraw the 
> > feature [1,2] but it did not work. Any other Ideas?
> 
> http://docs.openlayers.org/library/feature_styling.html#stylemap

Unfortunatly your link did not help me. To create a style-Map and gove it to
the constructor of the vector is one solution that i cannot use because i do
not call the constructor, the GeoJSON Parser creates the objects.

Please help me, hoc i can set the StyleMap to a Feature created by the
GeoJSON parser.

Thanx

Stefan




More information about the Users mailing list