Documentation for ol.format.Feature subclasses #1844

Merged
merged 7 commits into from Mar 12, 2014

2 participants

@pagameba
OpenLayers member

This PR copies documentation from ol.format.Feature into the subclasses that are actually exported to generate documentation for these classes.

In order to document functions inherited from base classes that are not redefined in the exported class, we need to include the function name in the source file and use the @function keyword to tell jsdoc that we are documenting a function.

Some of the exports have been adjusted based on my understanding of what is actually available from the public API in each of the format classes. Of particular note, I removed readGeometry from the KML format as it seems not to be defined in the KML format and thus inherits the abstract method implementation from the XML format. If any choices seem inappropriate, please let me know.

@twpayne

Thanks again for this valuable documentation @pagameba. Please merge.

@pagameba pagameba merged commit 94efa58 into openlayers:master Mar 12, 2014

1 check passed

Details default The Travis CI build passed
@elemoine elemoine commented on the diff Mar 12, 2014
src/ol/format/featureformat.js
@@ -5,6 +5,10 @@ goog.require('goog.functions');
/**
+ * ol.format.Feature subclasses provide the ability to decode and encode
+ * {@link ol.Feature} objects from a variety of commonly used geospatial
+ * file formats. See the documentation for each format for more details.
@elemoine
OpenLayers member

Just for me to know: why do you we use two spaces after the dot? Thanks.

@pagameba
OpenLayers member

Old (now bad) habit from when I learned to type that I am trying (with marginal success) to break. tl/dr; http://en.wikipedia.org/wiki/Sentence_spacing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@pagameba pagameba deleted the pagameba:doc-ol-format-feature branch Mar 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment