Your suggestion might work!  Could you point me to some kind of reference
online where I can check into that further?

And yep - I meant to change all of those variable references to something a
little more "publicly suitable" but it looks like I missed one :)





Roald de Wit-2 wrote:
> 
> Hi,
> 
> On 19/11/09 14:27, adsaero wrote:
>> When I try that, it seems the feature doesn't render at all.  I also
>> tried
>> setting the style in the feature object before adding the feature, but I
>> get
>> the same result.
>>
> That is a bit odd. What happens when you give your track_layer no
> style*map* at all?
> I think the problem might be in the combination of your stylemap and
> your newly created style for that feature.
> 
> Btw: isn't there any way you can use a stylemap with rules? If there is
> a specific attribute in your first feature that differentiates itself
> from the other(s), then you would not need to use the
> beforefeaturesadded event at all.
> 
>> This also fails, with the same result:
>>
>> testfeatures = geojson_format.read(results);
>> testfeatures[0].style = tracks_style;
>> track_layer.addFeatures(poofeatures);
>>
> I assume you meant to say in your last line:
> 
> track_layer.addFeatures(testfeatures);
> 
> ?
> 
> Regards, Roald
> 
> --
> 
> Roald de Wit
> Software Engineer
> roald.de...@lisasoft.com
> 
> Commercial Support for Open Source GIS Software
> http://lisasoft.com/LISAsoft/SupportedProducts/
> 
> 
> 
> The contents of this email are confidential and may be subject to legal or
> professional privilege and copyright. No representation is made that this
> email is free of viruses or other defects. If you have received this
> communication in error, you may not copy or distribute any part of it or
> otherwise disclose its contents to anyone. Please advise the sender of
> your incorrect receipt of this correspondence.
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/Possible-to-change-feature-style-before-adding-feature-collection-tp4029160p4031847.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to