| | 20 | == Writing Examples == |
| | 21 | |
| | 22 | * Examples should be written to demonstrate use of new API functions/methods or new classes. |
| | 23 | * Examples should be well named (some-class.html or new-method.html) and should have a sensible title. |
| | 24 | * Examples are all parsed by [source:trunk/openlayers/tools/exampleparser.py exampleparser.py] to produce an [http://openlayers.org/dev/examples/example-list.xml example feed]. This example feed serves as the sitemap for our examples and all examples should follow the same conventions as [source:trunk/openlayers/examples/example.html example.html]. |
| | 25 | * Link to the default OL [source:trunk/openlayers/theme/default/style.css stylesheet] |
| | 26 | * Link to the examples [source:trunk/openlayers/examples/style.css stylesheet] |
| | 27 | * Initialize a global ''map'' variable (if creating a single map). |
| | 28 | * Use an '''h1''' element with the id ''title'' for your example title. |
| | 29 | * Include a '''p''' (or other) element with the id ''shortdesc'' that gives a brief description of your example - no additional markup in the shortdesc paragraph. |
| | 30 | * Include more detailed documentation in an element with an id of ''docs''. |
| | 31 | |