Changeset 5310
- Timestamp:
- 12/01/07 04:53:51 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/ahocevar/styles/examples/georss-flickr.html
r5307 r5310 21 21 externalGraphic: "${thumbnail}", 22 22 pointRadius: 20}); 23 24 // create a rule with a point symbolizer that will make the thumbnail 25 // larger if the title of the rss item conatins "powder" 26 var rule = new OpenLayers.Rule.Comparison({ 27 type: OpenLayers.Rule.Comparison.LIKE, 28 property: "title", 29 value: "*powder*", 30 symbolizer: {"Point": {pointRadius: 30}}}); 31 rule.value2regex("*"); 32 33 style.addRules([rule]); 23 34 24 35 function init(){ … … 97 108 <body onload="init()"> 98 109 <h1>GeoRSS from Flickr in OpenLayers</h1> 99 <p>The displayed GeoRSS feed has a <tt><media:thumbnail/></tt> property for each item. An extended <tt>createFeatureFromItem()</tt> function is used to add this attribute to the attributes hash of each feature read in by <tt>OpenLayers.Format.GeoRSS</tt>. The example is configured with a style to render each item with its thumbnail image. </p>110 <p>The displayed GeoRSS feed has a <tt><media:thumbnail/></tt> property for each item. An extended <tt>createFeatureFromItem()</tt> function is used to add this attribute to the attributes hash of each feature read in by <tt>OpenLayers.Format.GeoRSS</tt>. The example is configured with a style to render each item with its thumbnail image. Also, to show how rules work, we defined a rule that if the title of an rss item contains "powder", it will be rendered larger than the others.</p> 100 111 <div id="map"></div> 101 112 </body>
