Commit Graph

20 Commits

Author SHA1 Message Date
Tim Schaub
66a4c6fb0e Caching array length instead of accessing it with each iteration. r=crschmidt (closes #1636)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7627 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-07-31 04:44:25 +00:00
Tim Schaub
de6ce111c9 Adding support for TextSymbolizer writing in the SLD format. Thanks to Bart for the original patch. This provides basic expression handling for text labels. Read support later. r=ahocevar (closes #1542)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7333 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-06-09 17:18:35 +00:00
pgiraud
5e3afa79f5 doc typo, no functional change
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7173 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-05-14 06:45:44 +00:00
Tim Schaub
209f8f68f8 Fixing links in documentation. Other Natural Docs changes. (closes #1504)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6833 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-09 16:52:08 +00:00
Paul Spencer
d15ab68360 quick lint before rc1, only some missing missing semi-colons.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6748 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-04-01 00:14:34 +00:00
Tim Schaub
3b267f5334 SLD format rewrite. Adds a versioned parser with read and write support. This does not come with full support for ogc:expression parsing, but makes for easy future enhancements. r=ahocevar (closes #1458)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6645 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-27 17:18:05 +00:00
Tim Schaub
3cc419aada Fixing OpenLayers.Style.createLiteral to work with all strings. r=ahocevar (closes #1439)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6553 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-19 19:23:15 +00:00
Tim Schaub
106e73618a Adding an args argument to OpenLayers.String.format. This lets you set context properties as functions that will be executed with the given arguments where tokens match. For styles, this means you can specify a context that contains functions that return some value based on the feature being styled. See the styles-context.html example for use. r=ahocevar (closes #1434)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6512 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 22:24:33 +00:00
ahocevar
7a25a14f93 propertyStyles of a Style's default symbolizer will not be parsed unless rules are specified. r=tschaub (closes #1432)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6505 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-03-12 16:42:16 +00:00
ahocevar
2f0382e6f6 * Style and Rule now have separate context properties
* new convenience method addUniqueValueRules in OL.!StyleMap. This can actually be used to achieve what I was trying to show in the example of this ticket's description.
 * some refactoring of OL.Style to remove duplicate code (with tests)
 * a new example showing how to add a "unique value" legend to a point layer using the new addUniqueValueRules method
 * Rule.symbolizer can now also be just a symbolizer, instead of a hash of symbolizers keyed by "Point", "Line", "Polygon". This will make things even simpler (as can be seen in the styles-unique.html example)

r=tschaub (closes #1373)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6396 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-28 17:57:37 +00:00
ahocevar
0d9ab3b3df looking for properties in rules symbolizer may fail. r=elemoine (closes #1362)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6246 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-13 12:21:47 +00:00
ahocevar
c5dd8ada2c "users should be able to customize the select style per feature": Created a !StyleMap class which stores all styles that are needed for a layer. Controls that need to render features differently can now just give a render intent (e.g. "default", "select" or "temporary") to the layer's drawFeature method, instead of having extra style informations like Control.!SelectFeature.selectStyle. Existing application that set layer.style or feature.style are still supported, but both of these style properties are now null by default. r=crschmidt,elemoine,tschaub (closes #1120)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6240 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-12 23:05:47 +00:00
Frédéric Junod
32d541641d fix typos and missing documentation in ND comments. (non-functional changes)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-11 09:54:21 +00:00
crschmidt
6f2a3598be Fix lots of EOL SSTyle line ending problems.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6131 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 19:51:55 +00:00
ahocevar
3581276835 Add optional context property to OpenLayers.Rule, so rules can now be evaluated against diffent contexts than feature.attributes. This changeset also renames Rule.Logical.children to Rule.Logical.rules, to make it more consistent with OL.Style. r=crschmidt (closes #1331)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6116 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-08 16:56:48 +00:00
ahocevar
1faf641806 evaluation of else filter in SLD. r=tschaub (closes #1317)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5978 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-03 17:48:19 +00:00
ahocevar
4fc4c6ce4b SLD maps minScaleDenominator and maxScaleDenominator to rule minScale and maxScale. r=tschaub (closes #1297)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5964 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-02-01 21:17:12 +00:00
crschmidt
09e0d3ec81 Update copyrights to 2008.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5614 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2008-01-01 08:14:55 +00:00
Tim Schaub
33e313b059 Separating jsdoc style docs into their own block. The new NaturalDocs doesn't parse these mixed blocks, giving us no class descriptions with the two together. (closes #1229)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5553 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-21 08:28:09 +00:00
crschmidt
fb3c02354f Add support for the extremely awesomely super-comprehensive rule based styling
that Andreas has been working so hard on. I think this is the single most
awesome commit I've ever had the pleasure of committing. The results of this
commit are described on http://trac.openlayers.org/wiki/Styles: essentially,
this makes it possible to style features in all kinds of fun ways based on
rules, and will also form the underlying basis for #533. Things this patch
adds:

 * OL.Rule classes. These classes allow you to do tests against the propertie
   of a feature, and set a style based on these properties -- so you can
   compare the 'speedlimit' property of a line, and test if it is > 60, and if
   it is greater than 60, render it in a different color. You can also test
   combinations of rules using the OL.Rule.Logical class, and test featureids
   with the FeatureID class. 
 * OL.Style class: The OL.Style class lets you wrap up Rules into styles that 
   can be used with drawFeature to draw the feature in the selected style.
 * OL.Layer.Vector.drawFeature will check if the given style is an OL.Style
   object, and if so, it will draw the feature accordingly.

examples/georss-flickr.html shows usage of these classes.

Many, many thanks go to Andreas for all his hard work on this: this code really
is very pretty, and includes unit tests for all the classes (and we know that I
am a big fan of tests.)

Three cheers for Andreas: Hip hip, hooray! hip hip, hooray! hip hip, hooray!


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5429 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-12-15 16:17:50 +00:00