[OpenLayers-Users] Highlighting changes in the KML layer

Roald de Wit roald.dewit at lisasoft.com
Wed Nov 4 03:20:53 EST 2009


Hi Adrian,

Adrian Popa wrote:
> Thank you for the hint. I suppose I shouldn't expect to see a working 
> demo of what I need :)
> Do you know if the patches presented in ticket 1259 are already part 
> of openlayers (since the latest version is from january last year?)
The patches in that ticket are part of OpenLayers since version 2.6, so, 
yes!

I'm not sure if you use styling coming from the KML file or style it all 
yourself. In your case I think you need to revert to the latter case. 
You will need to do some magic to find out what features are new and 
apply a different style to those items. There are few different ways of 
doing it. One of them might be marking it's 'newness' in an attribute of 
the new feature(s) and use a rule that checks that attribute in your 
style map.

Regards,

Roald

>
> Thanks,
>
> helmi wrote:
>> The idea from http://trac.openlayers.org/ticket/1259
>> {{{
>> You could create a selectStyle that could be passed to 
>> Control.SelectFeature quite easily: create a style object, read the 
>> "highlight" styles, create a FidFilter rule for every feature (or 
>> groups of features with the same style), use the according 
>> "highlight" style as symbolizer for the rule, and add the rule to the 
>> style object
>> }}}
>>
>> helmi03.com <http://helmi03.com>
>>
>> On Tue, Nov 3, 2009 at 12:59 AM, Adrian Popa 
>> <adrian_gh.popa at romtelecom.ro <mailto:adrian_gh.popa at romtelecom.ro>> 
>> wrote:
>>
>>     Hello everyone,
>>
>>     Sorry if this has already been discussed on the list (didn't really
>>     check), but I would like to know if there is a solution (or at
>>     least a
>>     plan to implement a feature) that �"somehow" highlights
>>     (visually) the
>>     elements that have been loaded �through KML - in contrast to the
>>     elements displayed previously.
>>
>>     I am working at a view that displays alarms on top of the map, and if
>>     there is a large number of alarms, one more alarm coming every 2
>>     minutes
>>     will not catch the attention of the operator...
>>
>>     I need a mechanism to somehow color/animate symbols loaded
>>     through KML
>>     which were not previously on the map. Symbols which dissapear between
>>     layer refreshes are not important to me. At the next refresh
>>     cycle, the
>>     highlighted symbols would no longer be highlighted (because they
>>     already
>>     exist on the map).
>>
>>     I have a way to load KMLs periodically, avoiding the cache, but I'm
>>     missing the "highlight" mechanism.
>>
>>     Hope I have presented my request in an understandable manner, and
>>     hope
>>     there is a solution. Maybe a property on the KML layer indicating
>>     if an
>>     item is new or not...
>>
>>     Regards,
>>     Adrian
>>
>>     _______________________________________________
>>     Users mailing list
>>     Users at openlayers.org <mailto:Users at openlayers.org>
>>     http://openlayers.org/mailman/listinfo/users
>>
>>
>




More information about the Users mailing list