diff --git a/apidoc/conf.json b/apidoc/conf.json index 4b91b0d4b8..9ec1e68f20 100644 --- a/apidoc/conf.json +++ b/apidoc/conf.json @@ -14,16 +14,19 @@ ], "include": [ "src", + "externs/oli.js", "externs/olx.js" ] }, "plugins": [ "node_modules/jsdoc/plugins/markdown", "apidoc/plugins/inheritdoc", - "apidoc/plugins/exports", + "apidoc/plugins/interface", + "apidoc/plugins/typedefs", + "apidoc/plugins/inheritdoc", + "apidoc/plugins/api", "apidoc/plugins/todo", - "apidoc/plugins/observable", - "apidoc/plugins/stability" + "apidoc/plugins/observable" ], "markdown": { "parser": "gfm" diff --git a/apidoc/plugins/api.js b/apidoc/plugins/api.js new file mode 100644 index 0000000000..824fb82334 --- /dev/null +++ b/apidoc/plugins/api.js @@ -0,0 +1,77 @@ +/** + * Define an @api tag + */ +var conf = env.conf.stability; +var defaultLevels = ["deprecated","experimental","unstable","stable","frozen","locked"]; +var levels = conf.levels || defaultLevels; +var util = require('util'); +exports.defineTags = function(dictionary) { + dictionary.defineTag('api', { + mustHaveValue: false, + canHaveType: false, + canHaveName: false, + onTagged: function(doclet, tag) { + var level = tag.text || "experimental"; + if (levels.indexOf(level) >= 0) { + doclet.stability = level; + } else { + var errorText = util.format('Invalid stability level (%s) in %s line %s', tag.text, doclet.meta.filename, doclet.meta.lineno); + require('jsdoc/util/error').handle( new Error(errorText) ); + } + } + }); +}; + + + +/* + * Based on @stability annotations, and assuming that items with no @stability + * annotation should not be documented, this plugin removes undocumented symbols + * from the documentation. Undocumented classes with documented members get a + * 'hideConstructur' property, which is read by the template so it can hide the + * constructor. + */ + +function hasApiMembers(doclet) { + return doclet.longname.split('#')[0] == this.longname; +} + +var api = []; + +exports.handlers = { + + newDoclet: function(e) { + var doclet = e.doclet; + // Keep track of api items - needed in parseComplete to determine classes + // with api members. + if (doclet.stability) { + api.push(doclet); + } + // Mark explicity defined namespaces - needed in parseComplete to keep + // namespaces that we need as containers for api items. + if (/.*\.jsdoc$/.test(doclet.meta.filename) && doclet.kind == 'namespace') { + doclet.namespace_ = true; + } + }, + + parseComplete: function(e) { + var doclets = e.doclets; + for (var i = doclets.length - 1; i >= 0; --i) { + var doclet = doclets[i]; + // Always document namespaces and items with stability annotation + if (doclet.stability || doclet.namespace_) { + continue; + } + if (doclet.kind == 'class' && api.some(hasApiMembers, doclet)) { + // Mark undocumented classes with documented members as unexported. + // This is used in ../template/tmpl/container.tmpl to hide the + // constructor from the docs. + doclet.hideConstructor = true; + } else { + // Remove all other undocumented symbols + doclets.splice(i, 1); + } + } + } + +}; diff --git a/apidoc/plugins/exports.js b/apidoc/plugins/exports.js deleted file mode 100644 index 2e7886d18f..0000000000 --- a/apidoc/plugins/exports.js +++ /dev/null @@ -1,120 +0,0 @@ -/* - * This plugin parses externs/oli.js as well as goog.exportSymbol and - * goog.exportProperty calls to build a list of API symbols and properties. - * Unexported modules linked from @param or @fires will be marked unexported, - * and the documentation will not contain the constructor. Everything else is - * marked undocumented, which will remove it from the docs. - */ - -var api = []; -var unexported = []; - -function collectExports(source) { - var i, ii, symbol, property; - var syms = source.match(/goog\.exportSymbol\([^\)]*\)/g); - if (syms) { - i = 0; ii = syms.length; - for (; i < ii; ++i) { - symbol = syms[i].match(/'([^']*)'/)[1]; - api.push(symbol); - } - } - var props = source.match(/goog\.exportProperty\([^\)]*\)/g); - if (props) { - i = 0; ii = props.length; - for (; i < ii; ++i) { - property = props[i].match(/[^,]*,[^,]*,\r?\n? *([^\)]*)\)/)[1] - .replace('.prototype.', '#'); - api.push(property); - } - } -} - -function collectOliExports(source) { - var oli = source.match(/[^\{]oli\.([^;^ ]*);? ?/g); - if (oli) { - i = 0; ii = oli.length; - for (; i < ii; ++i) { - property = 'ol.' + oli[i].match(/oli.([^;]*)/)[1] - .replace('.prototype.', '#'); - unexported.push(property); - } - } -} - -var encoding = env.conf.encoding || 'utf8'; -var fs = require('jsdoc/fs'); -collectExports(fs.readFileSync('build/src/external/src/exports.js', encoding)); -collectOliExports(fs.readFileSync('externs/oli.js', encoding)); - - -exports.handlers = { - - beforeParse: function(e) { - if (/\.js$/.test(e.filename)) { - collectExports(e.source); - } - }, - - newDoclet: function(e) { - var i, ii, j, jj; - if (e.doclet.meta.filename == "olx.js" && e.doclet.longname != 'olx') { - api.push(e.doclet.longname); - } - if (api.indexOf(e.doclet.longname) > -1) { - var names, name; - var params = e.doclet.params; - if (params) { - for (i = 0, ii = params.length; i < ii; ++i) { - names = params[i].type.names; - if (names) { - for (j = 0, jj=names.length; j < jj; ++j) { - name = names[j]; - if (unexported.indexOf(name) === -1) { - unexported.push(name); - } - } - } - } - } - var links = e.doclet.comment.match(/\{@link ([^\}]*)\}/g); - if (links) { - for (i=0, ii=links.length; i < ii; ++i) { - var link = links[i].match(/\{@link (.*)\}/)[1]; - if (unexported.indexOf(link) === -1) { - unexported.push(link); - } - } - } - } - }, - - parseComplete: function(e) { - for (var j = e.doclets.length - 1; j >= 0; --j) { - var doclet = e.doclets[j]; - if (doclet.meta.filename == 'olx.js' && doclet.kind == 'typedef') { - for (var i = e.doclets.length - 1; i >= 0; --i) { - var propertyDoclet = e.doclets[i]; - if (propertyDoclet.memberof == doclet.longname) { - if (!doclet.properties) { - doclet.properties = []; - } - doclet.properties.unshift(propertyDoclet); - e.doclets.splice(i, 1) - } - } - } - if (doclet.kind == 'namespace' || doclet.kind == 'event' || doclet.fires) { - continue; - } - var fqn = doclet.longname; - if (fqn) { - doclet.unexported = (api.indexOf(fqn) === -1 && unexported.indexOf(fqn) !== -1); - if (api.indexOf(fqn) === -1 && unexported.indexOf(fqn) === -1) { - e.doclets.splice(j, 1); - } - } - } - } - -}; diff --git a/apidoc/plugins/inheritdoc.js b/apidoc/plugins/inheritdoc.js index 673017b702..8340e0b721 100644 --- a/apidoc/plugins/inheritdoc.js +++ b/apidoc/plugins/inheritdoc.js @@ -5,11 +5,104 @@ * TODO: Remove this hack when https://github.com/jsdoc3/jsdoc/issues/53 * is addressed. */ -exports.astNodeVisitor = { - visitNode: function(node, e, parser, currentSourceName) { - if (/@(inheritDoc)(\n|\r)/.test(e.comment)) { - e.preventDefault = true; + +exports.defineTags = function(dictionary) { + dictionary.defineTag('inheritDoc', { + mustHaveValue: false, + canHaveType: false, + canHaveName: false, + onTagged: function(doclet, tag) { + doclet.inheritdoc = true; + } + }); +}; + + +var lookup = {}; +var incompleteByClass = {}; +var keepKeys = ['comment', 'meta', 'name', 'memberof', 'longname', 'augment', + 'stability']; + +exports.handlers = { + + newDoclet: function(e) { + var doclet = e.doclet; + var incompletes; + if (!(doclet.longname in lookup)) { + lookup[doclet.longname] = []; + } + lookup[doclet.longname].push(doclet); + if (doclet.inheritdoc) { + if (!(doclet.memberof in incompleteByClass)) { + incompleteByClass[doclet.memberof] = []; + } + incompletes = incompleteByClass[doclet.memberof]; + if (incompletes.indexOf(doclet.name) == -1) { + incompletes.push(doclet.name); + } + } + }, + + parseComplete: function(e) { + var ancestors, candidate, candidates, doclet, i, j, k, l, key; + var incompleteDoclet, stability, incomplete, incompletes; + var doclets = e.doclets; + for (i = doclets.length - 1; i >= 0; --i) { + doclet = doclets[i]; + if (doclet.augments) { + ancestors = [].concat(doclet.augments); + } + incompletes = incompleteByClass[doclet.longname]; + if (ancestors && incompletes) { + // collect ancestors from the whole hierarchy + for (j = 0; j < ancestors.length; ++j) { + candidates = lookup[ancestors[j]]; + if (candidates) { + for (k = candidates.length - 1; k >= 0; --k) { + candidate = candidates[k]; + if (candidate.augments) { + ancestors = ancestors.concat(candidate.augments); + } + } + } + } + // walk through all inheritDoc members + for (j = incompletes.length - 1; j >= 0; --j) { + incomplete = incompletes[j]; + candidates = lookup[doclet.longname + '#' + incomplete]; + if (candidates) { + // get the incomplete doclet that needs to be augmented + for (k = candidates.length - 1; k >= 0; --k) { + incompleteDoclet = candidates[k]; + if (incompleteDoclet.inheritdoc) { + break; + } + } + } + // find the documented ancestor + for (k = ancestors.length - 1; k >= 0; --k) { + candidates = lookup[ancestors[k] + '#' + incomplete]; + if (candidates) { + for (l = candidates.length - 1; l >= 0; --l) { + candidate = candidates[l]; + if (candidate && !candidate.inheritdoc) { + stability = candidate.stability || incompleteDoclet.stability + if (stability) { + incompleteDoclet.stability = stability; + for (key in candidate) { + if (candidate.hasOwnProperty(key) && + keepKeys.indexOf(key) == -1) { + incompleteDoclet[key] = candidate[key]; + } + } + } + } + } + } + } + } + } } } diff --git a/apidoc/plugins/interface.js b/apidoc/plugins/interface.js new file mode 100644 index 0000000000..fd362aab41 --- /dev/null +++ b/apidoc/plugins/interface.js @@ -0,0 +1,26 @@ +var util = require('util'); +exports.defineTags = function(dictionary) { + + var classTag = dictionary.lookUp('class'); + dictionary.defineTag('interface', { + mustHaveValue: false, + onTagged: function(doclet, tag) { + classTag.onTagged.apply(this, arguments); + doclet.interface = true; + } + }); + + var augmentsTag = dictionary.lookUp('augments'); + dictionary.defineTag('implements', { + mustHaveValue: true, + onTagged: function(doclet, tag) { + tag.value = tag.value.match(/^\{?([^\}]*)\}?$/)[1]; + augmentsTag.onTagged.apply(this, arguments); + if (!doclet.implements) { + doclet.implements = []; + } + doclet.implements.push(tag.value); + } + }); + +}; diff --git a/apidoc/plugins/stability.js b/apidoc/plugins/stability.js deleted file mode 100644 index bd006cdbab..0000000000 --- a/apidoc/plugins/stability.js +++ /dev/null @@ -1,20 +0,0 @@ -var conf = env.conf.stability; -var defaultLevels = ["deprecated","experimental","unstable","stable","frozen","locked"]; -var levels = conf.levels || defaultLevels; -var util = require('util'); -exports.defineTags = function(dictionary) { - dictionary.defineTag('stability', { - mustHaveValue: true, - canHaveType: false, - canHaveName: true, - onTagged: function(doclet, tag) { - var level = tag.text; - if (levels.indexOf(level) >=0) { - doclet.stability = level; - } else { - var errorText = util.format('Invalid stability level (%s) in %s line %s', tag.text, doclet.meta.filename, doclet.meta.lineno); - require('jsdoc/util/error').handle( new Error(errorText) ); - } - } - }) -}; diff --git a/apidoc/plugins/todo.js b/apidoc/plugins/todo.js index 2a2d05a027..0a76e89e6e 100644 --- a/apidoc/plugins/todo.js +++ b/apidoc/plugins/todo.js @@ -6,8 +6,8 @@ exports.defineTags = function(dictionary) { canHaveName: true, onTagged: function(doclet, tag) { var parts = tag.text.split(' '); - if (parts[0] === 'stability') { - doclet.stability = parts.slice(1).join(' '); + if (parts[0] === 'api') { + doclet.stability = parts.slice(1).join(' ') || 'experimental'; } else if (parts[0] === 'observable') { if (!doclet.observables) { doclet.observables = []; diff --git a/apidoc/plugins/typedefs.js b/apidoc/plugins/typedefs.js new file mode 100644 index 0000000000..35eb804335 --- /dev/null +++ b/apidoc/plugins/typedefs.js @@ -0,0 +1,61 @@ +/* + * Converts olx.js @type annotations into properties of the previous @typedef. + * Changes @enum annotations into @typedef. + */ + +var lastOlxTypedef = null; +var olxTypes = {}; + +function addSubparams(params) { + for (var j = 0, jj = params.length; j < jj; ++j) { + var param = params[j]; + var types = param.type.names; + for (var k = 0, kk = types.length; k < kk; ++k) { + var name = types[k]; + if (name in olxTypes) { + param.subparams = olxTypes[name]; + // TODO Change template before recursing here, because the table gets + // too wide. + //addSubparams(param.subparams); + // TODO Do we need to support multiple object literal types per + // param? + break; + } + } + } +} + +exports.handlers = { + + newDoclet: function(e) { + var doclet = e.doclet; + if (doclet.meta.filename == 'olx.js') { + if (doclet.kind == 'typedef') { + lastOlxTypedef = doclet; + olxTypes[doclet.longname] = []; + doclet.properties = []; + } else if (lastOlxTypedef && doclet.memberof == lastOlxTypedef.longname) { + lastOlxTypedef.properties.push(doclet); + olxTypes[lastOlxTypedef.longname].push(doclet); + } else { + lastOlxTypedef = null; + } + } else if (doclet.isEnum) { + // We never export enums, so we document them like typedefs + doclet.kind = 'typedef'; + delete doclet.isEnum; + } + }, + + parseComplete: function(e) { + var doclets = e.doclets; + for (var i = doclets.length - 1; i >= 0; --i) { + var doclet = doclets[i]; + var params = doclet.params; + if (params) { + addSubparams(params); + } + } + } + +}; diff --git a/apidoc/readme.md b/apidoc/readme.md new file mode 100644 index 0000000000..bdedae5f89 --- /dev/null +++ b/apidoc/readme.md @@ -0,0 +1,74 @@ +# API Documentation + +This directory contains configuration (`conf.json`), static content (`index.md`), template (`template/`) and plugins (`plugins/`) for the [JSDoc3](http://usejsdoc.org/) API generator. + +## Documenting the source code + +JSDoc annotations are used for metadata used by the compiler, for defining the user facing API, and for user documentation. + +In the simplest case, a JSDoc block can look like this: +```js +/** + * Add the given control to the map. + * @param {ol.control.Control} control Control. + * @todo api + */ +ol.Map.prototype.addControl = function(control) { + // ... +}; +``` +The first line is text for the user documentation. This can be long, and it can +contain Markdown. + +The second line tells the Closure compiler the type of the argument. + +The third line (`@todo api`) marks the method as exportable. The stability can be added as value, e.g. `@todo api stable`. Once the documentation story is fully settled, we will remove the `todo ` and just write `@api` or `@api stable`. Without such an api note, the method will not be exported and not documented in the generated API documentation. + +### Events + +Events are documented using `@fires` and `@event` annotations: +```js +/** + * Constants for event names. + * @enum {string} + */ +ol.MapBrowserEvent.EventType = { + /** + * A true single click with no dragging and no double click. Note that this + * event is delayed by 250 ms to ensure that it is not a double click. + * @event ol.MapBrowserEvent#singleclick + * @todo api + */ + SINGLECLICK: 'singleclick', + // ... +}; +``` +Note the value of the `@event` annotation. The text before the hash refers to the event class that the event belongs to, and the text after the hash is the type of the event. + +To export event properties, they need to be defined in `externs/oli.js` (also see `readme.md` in `externs/`) and marked with an @api annotation: +```js +/** @interface */ +oli.MapBrowserEvent; + +/** + * @type {ol.Coordinate} + * @todo api + */ +oli.MapBrowserEvent.prototype.coordinate; + +// ... + +}; +``` +To document which events are fired by a class or method, the `@fires` annotation is used: +```js + * @fires {@link ol.MapBrowserEvent} ol.MapBrowserEvent + * @fires {@link ol.MapEvent} ol.MapEvent + * @fires {@link ol.render.Event} ol.render.Event + * ... + */ +ol.Map = function(options) { + // ... +}; +``` +Again, note the syntax of the `@fires` annotation. The link is necessary to provide a link to the documentation of the event, and the name of the event class is necessary for JSDoc3 to know which event we are talking about. diff --git a/apidoc/template/tmpl/container.tmpl b/apidoc/template/tmpl/container.tmpl index 67013b8021..7c744204b5 100644 --- a/apidoc/template/tmpl/container.tmpl +++ b/apidoc/template/tmpl/container.tmpl @@ -27,7 +27,7 @@ - + @@ -47,7 +47,8 @@

Extends

@@ -141,7 +142,7 @@

TypeDefs

- +
diff --git a/bin/generate-exports.py b/bin/generate-exports.py deleted file mode 100755 index 6d7d861eed..0000000000 --- a/bin/generate-exports.py +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env python - -from operator import attrgetter -from optparse import OptionParser -import re -import sys - - -def simplerepr(obj): - keys = sorted(key for key in obj.__dict__.keys() if not key.startswith('_')) - attrs = ''.join(' %s=%r' % (key, obj.__dict__[key]) for key in keys) - return '<%s%s>' % (obj.__class__.__name__, attrs) - - -class Exportable(object): - - def __init__(self, name): - self.name = name - - __repr__ = simplerepr - - def export(self): - return '' - - -class Symbol(Exportable): - - def __init__(self, name, export_symbol): - Exportable.__init__(self, name) - self.export_symbol = export_symbol - self.props = set() - - __repr__ = simplerepr - - def export(self): - lines = [] - if self.export_symbol: - lines.append('\n\ngoog.exportSymbol(\n \'%s\',\n %s);\n' % (self.name, self.name)) - lines.extend('goog.exportProperty(\n %s,\n \'%s\',\n %s.%s);\n' % (self.name, prop, self.name, prop) for prop in sorted(self.props)) - return ''.join(lines) - - -def main(argv): - - option_parser = OptionParser() - option_parser.add_option('--exports', action='store_true') - options, args = option_parser.parse_args(argv[1:]) - - objects = {} - requires = set() - for arg in args: - for line in open(arg, 'rU'): - line = line.strip() - if not line: - continue - m = re.match(r'@exportProperty\s+(?P\S+)\Z', line) - if m: - components = m.group('prop').split('.') - if components[-2] == 'prototype': - requires.add('.'.join(components[:-2])) - else: - requires.add('.'.join(components[:-1])) - name = '.'.join(components[:-1]) - prop = components[-1] - if name in objects: - symbol = objects[name] - else: - symbol = Symbol(name, False) - objects[name] = symbol - symbol.props.add(prop) - continue - m = re.match(r'@exportSymbol\s+(?P\S+)\Z', line) - if m: - name = m.group('name') - if name in objects: - raise RuntimeError(line) # Name already defined - symbol = Symbol(name, True) - objects[name] = symbol - components = m.group('name').split('.') - if re.match(r'[A-Z]', components[-1]): - requires.add(name) - else: - requires.add('.'.join(components[:-1])) - continue - raise RuntimeError(line) - - objects = sorted(objects.values(), key=attrgetter('name')) - - if options.exports: - if requires: - for require in sorted(requires): - sys.stdout.write('goog.require(\'%s\');\n' % (require,)) - for obj in objects: - sys.stdout.write(obj.export()) - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/build.py b/build.py index 21f5e58485..4d8de9067d 100755 --- a/build.py +++ b/build.py @@ -86,11 +86,7 @@ EXECUTABLES = [variables.GIT, variables.GJSLINT, variables.JAVA, variables.JAR, variables.JSDOC, variables.JSHINT, variables.PYTHON, variables.PHANTOMJS] -EXPORTS = [path - for path in ifind('src') - if path.endswith('.exports')] - -EXTERNAL_SRC = ['build/src/external/src/exports.js'] +EXPORTS = 'build/exports.js' EXAMPLES = [path for path in ifind('examples') @@ -113,8 +109,6 @@ EXAMPLES_JSON = ['build/' + example.replace('.html', '.json') EXAMPLES_COMBINED = ['build/' + example.replace('.html', '.combined.js') for example in EXAMPLES] -INTERNAL_SRC = ['build/src/internal/src/requireall.js'] - GLSL_SRC = [path for path in ifind('src') if path.endswith('.glsl')] @@ -182,15 +176,15 @@ def build_ol_css(t): t.touch() -@target('build/ol.js', PLOVR_JAR, SRC, EXTERNAL_SRC, SHADER_SRC, - LIBTESS_JS_SRC, 'buildcfg/base.json', 'buildcfg/ol.json') +@target('build/ol.js', PLOVR_JAR, SRC, EXPORTS, SHADER_SRC, LIBTESS_JS_SRC, + 'buildcfg/base.json', 'buildcfg/ol.json') def build_ol_js(t): t.output('%(JAVA)s', '-server', '-XX:+TieredCompilation', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol.json') report_sizes(t) -@target('build/ol-simple.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC, +@target('build/ol-simple.js', PLOVR_JAR, SRC, EXPORTS, SHADER_SRC, LIBTESS_JS_SRC, 'buildcfg/base.json', 'buildcfg/ol.json', 'buildcfg/ol-simple.json') def build_ol_simple_js(t): @@ -199,8 +193,8 @@ def build_ol_simple_js(t): report_sizes(t) -@target('build/ol-whitespace.js', PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC, - LIBTESS_JS_SRC, 'buildcfg/base.json', 'buildcfg/ol.json', +@target('build/ol-whitespace.js', PLOVR_JAR, SRC, EXPORTS, + SHADER_SRC, LIBTESS_JS_SRC, 'buildcfg/base.json', 'buildcfg/ol.json', 'buildcfg/ol-whitespace.json') def build_ol_whitespace_js(t): t.output('%(JAVA)s', '-server', '-XX:+TieredCompilation', '-jar', @@ -211,17 +205,16 @@ def build_ol_whitespace_js(t): virtual('build-all', 'build/ol-all.js') -@target('build/ol-all.js', PLOVR_JAR, SRC, EXTERNAL_SRC, INTERNAL_SRC, - SHADER_SRC, LIBTESS_JS_SRC, 'buildcfg/base.json', - 'buildcfg/ol-all.json') +@target('build/ol-all.js', PLOVR_JAR, SRC, EXPORTS, SHADER_SRC, LIBTESS_JS_SRC, + 'buildcfg/base.json', 'buildcfg/ol-all.json') def build_ol_all_js(t): t.output('%(JAVA)s', '-server', '-XX:+TieredCompilation', '-jar', PLOVR_JAR, 'build', 'buildcfg/ol-all.json') -@target('build/src/external/src/exports.js', 'bin/generate-exports.py', EXPORTS) -def build_src_external_src_exports_js(t): - t.output('%(PYTHON)s', 'bin/generate-exports.py', '--exports', EXPORTS) +@target(EXPORTS, SRC) +def build_exports_js(t): + t.run('node', 'tasks/generate-exports.js', EXPORTS) for glsl_src in GLSL_SRC: @@ -236,29 +229,19 @@ for glsl_src in GLSL_SRC: shader_src_helper(glsl_src) -def _build_require_list(dependencies, output_file_name): +@target('build/test/requireall.js', SPEC) +def build_test_requireall_js(t): requires = set() - for dependency in dependencies: + for dependency in t.dependencies: for line in open(dependency, 'rU'): match = re.match(r'goog\.provide\(\'(.*)\'\);', line) if match: requires.add(match.group(1)) - with open(output_file_name, 'wb') as f: + with open(t.name, 'wb') as f: for require in sorted(requires): f.write('goog.require(\'%s\');\n' % (require,)) -@target('build/src/internal/src/requireall.js', SRC, SHADER_SRC, - LIBTESS_JS_SRC) -def build_src_internal_src_requireall_js(t): - _build_require_list(t.dependencies, t.name) - - -@target('build/test/requireall.js', SPEC) -def build_test_requireall_js(t): - _build_require_list(t.dependencies, t.name) - - virtual('build-examples', 'examples', 'build/examples/all.combined.js', EXAMPLES_COMBINED) @@ -277,7 +260,7 @@ def examples_examples_list_js(t): @target('build/examples/all.combined.js', 'build/examples/all.js', PLOVR_JAR, - SRC, INTERNAL_SRC, SHADER_SRC, LIBTESS_JS_SRC, + SRC, SHADER_SRC, LIBTESS_JS_SRC, 'buildcfg/base.json', 'build/examples/all.json') def build_examples_all_combined_js(t): t.output('%(JAVA)s', '-server', '-XX:+TieredCompilation', '-jar', @@ -332,7 +315,7 @@ def examples_star_combined_js(name, match): PLOVR_JAR, 'build', 'build/examples/%(id)s.json' % match.groupdict()) report_sizes(t) - dependencies = [PLOVR_JAR, SRC, INTERNAL_SRC, SHADER_SRC, LIBTESS_JS_SRC, + dependencies = [PLOVR_JAR, SRC, SHADER_SRC, LIBTESS_JS_SRC, 'buildcfg/base.json', 'examples/%(id)s.js' % match.groupdict(), 'build/examples/%(id)s.json' % match.groupdict()] @@ -345,18 +328,17 @@ def serve(t): 'buildcfg/ol-all.json', EXAMPLES_JSON, 'buildcfg/test.json') -@target('serve-integration-test', PLOVR_JAR, INTERNAL_SRC) +@target('serve-integration-test', PLOVR_JAR) def serve_precommit(t): t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', 'buildcfg/ol-all.json', 'buildcfg/test.json') -virtual('lint', 'build/lint-timestamp', 'build/lint-generated-timestamp', - 'build/lint-libtess.js-timestamp', 'build/check-requires-timestamp', - 'build/check-whitespace-timestamp') +virtual('lint', 'build/lint-timestamp', 'build/lint-libtess.js-timestamp', + 'build/check-requires-timestamp', 'build/check-whitespace-timestamp') -@target('build/lint-timestamp', SRC, EXAMPLES_SRC, SPEC, precious=True) +@target('build/lint-timestamp', SRC, EXPORTS, EXAMPLES_SRC, SPEC, precious=True) def build_lint_src_timestamp(t): t.run('%(GJSLINT)s', '--jslint_error=all', @@ -366,26 +348,6 @@ def build_lint_src_timestamp(t): t.touch() -@target('build/lint-generated-timestamp', INTERNAL_SRC, EXTERNAL_SRC, - precious=True) -def build_lint_generated_timestamp(t): - limited_doc_files = [ - path - for path in ifind('externs') - if path.endswith('.js')] - t.run('%(GJSLINT)s', - '--jslint_error=all', - # ignore error for max line length (for these auto-generated sources) - '--disable=110', - '--custom_jsdoc_tags=todo', - # for a complete list of error codes to allow, see - # http://closure-linter.googlecode.com/svn/trunk/closure_linter/errors.py - '--limited_doc_files=%s' % (','.join(limited_doc_files),), - '--strict', - t.newer(t.dependencies)) - t.touch() - - @target('build/lint-libtess.js-timestamp', LIBTESS_JS_SRC, precious=True) def build_lint_libtess_js_timestamp(t): t.run('%(GJSLINT)s', @@ -398,8 +360,8 @@ def build_lint_libtess_js_timestamp(t): virtual('jshint', 'build/jshint-timestamp') - -@target('build/jshint-timestamp', SRC, EXAMPLES_SRC, SPEC, precious=True) +@target('build/jshint-timestamp', SRC, EXPORTS, EXAMPLES_SRC, SPEC, + precious=True) def build_jshint_timestamp(t): t.run(variables.JSHINT, '--verbose', t.newer(t.dependencies)) t.touch() @@ -428,8 +390,8 @@ def _strip_comments(lines): yield lineno, line -@target('build/check-requires-timestamp', SRC, INTERNAL_SRC, EXTERNAL_SRC, - EXAMPLES_SRC, SHADER_SRC, LIBTESS_JS_SRC, SPEC) +@target('build/check-requires-timestamp', SRC, EXAMPLES_SRC, + SHADER_SRC, LIBTESS_JS_SRC, SPEC) def build_check_requires_timestamp(t): from zipfile import ZipFile unused_count = 0 @@ -448,8 +410,6 @@ def build_check_requires_timestamp(t): if m: all_provides.add(m.group(1)) for filename in sorted(t.dependencies): - if filename == 'build/src/internal/src/requireall.js': - continue require_linenos = {} uses = set() lines = open(filename, 'rU').readlines() @@ -529,8 +489,6 @@ def build_check_requires_timestamp(t): for key, child in root.children.iteritems()] missing_count = 0 for filename in sorted(t.dependencies): - if filename in INTERNAL_SRC or filename in EXTERNAL_SRC: - continue provides = set() requires = set() uses = set() @@ -573,9 +531,8 @@ def build_check_requires_timestamp(t): t.touch() -@target('build/check-whitespace-timestamp', SRC, INTERNAL_SRC, EXTERNAL_SRC, - EXAMPLES_SRC, SPEC, EXPORTS, JSDOC_SRC, LIBTESS_JS_SRC, - precious=True) +@target('build/check-whitespace-timestamp', SRC, EXPORTS, EXAMPLES_SRC, + SPEC, JSDOC_SRC, LIBTESS_JS_SRC, precious=True) def build_check_whitespace_timestamp(t): CR_RE = re.compile(r'\r') LEADING_WHITESPACE_RE = re.compile(r'\s+') @@ -622,7 +579,7 @@ virtual('apidoc', 'build/jsdoc-%(BRANCH)s-timestamp' % vars(variables)) @target('build/jsdoc-%(BRANCH)s-timestamp' % vars(variables), 'host-resources', - 'build/src/external/src/exports.js', SRC, SHADER_SRC, + EXPORTS, SRC, SHADER_SRC, ifind('apidoc/template')) def jsdoc_BRANCH_timestamp(t): t.run('%(JSDOC)s', 'apidoc/index.md', '-c', 'apidoc/conf.json', @@ -735,7 +692,7 @@ def proj4js_zip(t): t.info('downloaded %r', t.name) -virtual('test-deps', INTERNAL_SRC, PROJ4JS, 'build/test/requireall.js') +virtual('test-deps', PROJ4JS, 'build/test/requireall.js') @target('test', 'test-deps', phony=True) diff --git a/buildcfg/base.json b/buildcfg/base.json index 63ae010258..72435a700e 100644 --- a/buildcfg/base.json +++ b/buildcfg/base.json @@ -68,7 +68,6 @@ ], "paths": [ - "../build/src/internal/src", "../src" ], diff --git a/buildcfg/jsdoc/symbols/conf.json b/buildcfg/jsdoc/symbols/conf.json new file mode 100644 index 0000000000..29f6b31ecd --- /dev/null +++ b/buildcfg/jsdoc/symbols/conf.json @@ -0,0 +1,15 @@ +{ + "opts": { + "recurse": true, + "template": "buildcfg/jsdoc/symbols" + }, + "tags": { + "allowUnknownTags": true + }, + "source": { + "includePattern": "\\.js$" + }, + "plugins": [ + "buildcfg/jsdoc/symbols/todo-plugin" + ] +} diff --git a/buildcfg/jsdoc/symbols/publish.js b/buildcfg/jsdoc/symbols/publish.js new file mode 100644 index 0000000000..7363f93c91 --- /dev/null +++ b/buildcfg/jsdoc/symbols/publish.js @@ -0,0 +1,45 @@ +/** + * @fileoverview Generates JSON output based on doclets with the "api" tag. + */ +var assert = require('assert'); +var fs = require('fs'); +var path = require('path'); + + +/** + * Publish hook for the JSDoc template. Writes to JSON stdout. + * @param {function} data The root of the Taffy DB containing doclet records. + * @param {Object} opts Options. + */ +exports.publish = function(data, opts) { + var cwd = process.cwd(); + + // get all doclets with the "api" property, but no enums, typedefs and events. + var docs = data( + {api: {isString: true}}, + {isEnum: {'!is': true}}, + {kind: {'!is': 'typedef'}}, + {kind: {'!is': 'event'}} + ).get(); + + // get symbols data, filter out those that are members of private classes + var symbols = docs.filter(function(doc) { + var include = true; + var constructor = doc.memberof; + if (constructor && constructor.substr(-1) === '_') { + assert.strictEqual(doc.inherited, true, + 'Unexpected export on private class: ' + doc.longname); + include = false; + } + return include; + }).map(function(doc) { + return { + name: doc.longname, + extends: doc.augments, + path: path.join(doc.meta.path, doc.meta.filename) + }; + }); + + process.stdout.write(JSON.stringify({symbols: symbols}, null, 2)); + +}; diff --git a/buildcfg/jsdoc/symbols/todo-plugin.js b/buildcfg/jsdoc/symbols/todo-plugin.js new file mode 100644 index 0000000000..4eed6567b2 --- /dev/null +++ b/buildcfg/jsdoc/symbols/todo-plugin.js @@ -0,0 +1,26 @@ +/** + * @fileoverview This plugin should go away when we get rid of Plovr and can + * use Closure Compiler's extra_annotation_name option. Until then, we hijack + * the todo tag to add doclet properties for other tags we eventually want to + * support. For example, the "todo api" tag can eventually be replaced with + * the "api" tag. + */ + + +/** + * Our hook to define new tags. + * @param {Object} dictionary The tag dictionary. + */ +exports.defineTags = function(dictionary) { + + dictionary.defineTag('todo', { + mustHaveValue: true, + onTagged: function(doclet, tag) { + var parts = tag.text.split(' '); + if (parts[0] === 'api') { + doclet.api = parts.slice(1).join(' ').trim(); + } + } + }); + +}; diff --git a/buildcfg/ol-all.json b/buildcfg/ol-all.json index ef96b4020d..7ce2c28f73 100644 --- a/buildcfg/ol-all.json +++ b/buildcfg/ol-all.json @@ -17,8 +17,7 @@ "inherits": "base.json", "inputs": [ - "../build/src/internal/src/requireall.js", - "../build/src/external/src/exports.js" + "../build/exports.js" ] } diff --git a/buildcfg/ol-simple.json b/buildcfg/ol-simple.json index 3e5806794c..5cb4be99de 100644 --- a/buildcfg/ol-simple.json +++ b/buildcfg/ol-simple.json @@ -27,8 +27,7 @@ "inherits": "ol.json", "inputs": [ - "../build/src/internal/src/requireall.js", - "../build/src/external/src/exports.js" + "../build/exports.js" ], "mode": "SIMPLE", diff --git a/buildcfg/ol-whitespace.json b/buildcfg/ol-whitespace.json index bb185fe275..c409225de4 100644 --- a/buildcfg/ol-whitespace.json +++ b/buildcfg/ol-whitespace.json @@ -28,7 +28,7 @@ "inherits": "ol.json", "inputs": [ - "../build/src/internal/src/requireall.js" + "../build/exports.js" ], "mode": "WHITESPACE", diff --git a/buildcfg/ol.json b/buildcfg/ol.json index 3871efc347..77513d9363 100644 --- a/buildcfg/ol.json +++ b/buildcfg/ol.json @@ -27,7 +27,7 @@ "inherits": "base.json", "inputs": [ - "../build/src/external/src/exports.js" + "../build/exports.js" ], "output-wrapper": "// OpenLayers 3. see http://ol3js.org/\n(function(){%output%})();", diff --git a/externs/oli.js b/externs/oli.js index 7a951c1a2c..1d3990a2ba 100644 --- a/externs/oli.js +++ b/externs/oli.js @@ -14,7 +14,11 @@ var oli; oli.CollectionEvent; -/** @type {*} */ +/** + * The element that is added to or removed from the collection. + * @type {*} + * @todo api + */ oli.CollectionEvent.prototype.element; @@ -23,7 +27,10 @@ oli.CollectionEvent.prototype.element; oli.DragBoxEvent; -/** @type {ol.Coordinate} */ +/** + * @type {ol.Coordinate} + * @todo api + */ oli.DragBoxEvent.prototype.coordinate; @@ -32,7 +39,11 @@ oli.DragBoxEvent.prototype.coordinate; oli.DrawEvent; -/** @type {ol.Feature} */ +/** + * The feature being drawn. + * @type {ol.Feature} + * @todo api + */ oli.DrawEvent.prototype.feature; @@ -77,7 +88,10 @@ oli.FrameState.prototype.layerStatesArray; oli.FrameState.prototype.logos; -/** @type {number} */ +/** + * @type {number} + * @todo api + */ oli.FrameState.prototype.pixelRatio; @@ -101,7 +115,10 @@ oli.FrameState.prototype.skippedFeatureUids_; oli.FrameState.prototype.tileQueue; -/** @type {number} */ +/** + * @type {number} + * @todo api + */ oli.FrameState.prototype.time; @@ -109,7 +126,10 @@ oli.FrameState.prototype.time; oli.FrameState.prototype.usedTiles; -/** @type {oli.View2DState} */ +/** + * @type {oli.View2DState} + * @todo api + */ oli.FrameState.prototype.view2DState; @@ -135,15 +155,24 @@ oli.ObjectEvent.prototype.key; oli.MapBrowserEvent; -/** @type {ol.Coordinate} */ +/** + * @type {ol.Coordinate} + * @todo api + */ oli.MapBrowserEvent.prototype.coordinate; -/** @type {Event} */ +/** + * @type {Event} + * @todo api + */ oli.MapBrowserEvent.prototype.originalEvent; -/** @type {ol.Pixel} */ +/** + * @type {ol.Pixel} + * @todo api + */ oli.MapBrowserEvent.prototype.pixel; @@ -187,15 +216,24 @@ oli.control.Control.prototype.setMap = function(map) {}; oli.interaction.DragAndDropEvent; -/** @type {Array.} */ +/** + * @type {Array.|undefined} + * @todo api + */ oli.interaction.DragAndDropEvent.prototype.features; -/** @type {ol.proj.Projection} */ +/** + * @type {ol.proj.Projection|undefined} + * @todo api + */ oli.interaction.DragAndDropEvent.prototype.projection; -/** @type {File} */ +/** + * @type {File} + * @todo api + */ oli.interaction.DragAndDropEvent.prototype.file; @@ -203,19 +241,35 @@ oli.interaction.DragAndDropEvent.prototype.file; oli.render.Event; -/** @type {CanvasRenderingContext2D|null|undefined} */ +/** + * Canvas context. Only available when a Canvas renderer is used, null + * otherwise. + * @type {CanvasRenderingContext2D|null|undefined} + * @todo api + */ oli.render.Event.prototype.context; -/** @type {oli.FrameState|undefined} */ +/** + * @type {oli.FrameState|undefined} + * @todo api + */ oli.render.Event.prototype.frameState; -/** @type {ol.webgl.Context|null|undefined} */ +/** + * WebGL context. Only available when a WebGL renderer is used, null otherwise. + * @type {ol.webgl.Context|null|undefined} + * @todo api + */ oli.render.Event.prototype.glContext; -/** @type {ol.render.IVectorContext|undefined} */ +/** + * For canvas, this is an instance of {@link ol.render.canvas.Immediate}. + * @type {ol.render.IVectorContext|undefined} + * @todo api + */ oli.render.Event.prototype.vectorContext; @@ -224,5 +278,9 @@ oli.render.Event.prototype.vectorContext; oli.source.VectorEvent; -/** @type {ol.Feature} */ +/** + * The feature being added or removed. + * @type {ol.Feature} + * @todo api + */ oli.source.VectorEvent.prototype.feature; diff --git a/externs/olx.js b/externs/olx.js index 7d51dbbbfd..c939b81be9 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -7,7 +7,7 @@ var olx; /** * @typedef {{html: string, * tileRanges: (Object.>|undefined)}} - * @todo stability experimental + * @todo api */ olx.AttributionOptions; @@ -29,7 +29,7 @@ olx.AttributionOptions.prototype.tileRanges; /** * @typedef {{loadTilesWhileAnimating: (boolean|undefined), * loadTilesWhileInteracting: (boolean|undefined)}} - * @todo stability experimental + * @todo api */ olx.DeviceOptions; @@ -52,7 +52,7 @@ olx.DeviceOptions.prototype.loadTilesWhileInteracting; /** * @typedef {{tracking: (boolean|undefined)}} - * @todo stability experimental + * @todo api */ olx.DeviceOrientationOptions; @@ -68,7 +68,7 @@ olx.DeviceOrientationOptions.prototype.tracking; * @typedef {{tracking: (boolean|undefined), * trackingOptions: (GeolocationPositionOptions|undefined), * projection: ol.proj.ProjectionLike}} - * @todo stability experimental + * @todo api */ olx.GeolocationOptions; @@ -107,7 +107,7 @@ olx.GeolocationOptions.prototype.projection; * renderer: (ol.RendererHint|Array.|string|undefined), * target: (Element|string|undefined), * view: (ol.IView|undefined)}} - * @todo stability experimental + * @todo api */ olx.MapOptions; @@ -155,7 +155,8 @@ olx.MapOptions.prototype.keyboardEventTarget; /** - * Layers. + * Layers. Array or {@link ol.Collection} items are instances of + * {@link ol.layer.Layer} or any of its {@link ol.layer} subclasses. * @type {Array.|ol.Collection|undefined} */ olx.MapOptions.prototype.layers; @@ -205,7 +206,7 @@ olx.MapOptions.prototype.view; * insertFirst: (boolean|undefined), * offsetX: (number|undefined), * offsetY: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.OverlayOptions; @@ -271,7 +272,7 @@ olx.OverlayOptions.prototype.offsetY; * @typedef {{code: string, * extent: (ol.Extent|undefined), * global: (boolean|undefined)}} - * @todo stability experimental + * @todo api */ olx.Proj4jsProjectionOptions; @@ -304,7 +305,7 @@ olx.Proj4jsProjectionOptions.prototype.global; * extent: (ol.Extent|undefined), * axisOrientation: (string|undefined), * global: (boolean|undefined)}} - * @todo stability experimental + * @todo api */ olx.ProjectionOptions; @@ -358,7 +359,7 @@ olx.ProjectionOptions.prototype.global; * rotation: (number|undefined), * zoom: (number|undefined), * zoomFactor: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.View2DOptions; @@ -471,7 +472,7 @@ olx.View2DOptions.prototype.zoomFactor; * start: (number|undefined), * duration: (number|undefined), * easing: (function(number):number|undefined)}} - * @todo stability experimental + * @todo api */ olx.animation.BounceOptions; @@ -510,7 +511,7 @@ olx.animation.BounceOptions.prototype.easing; * start: (number|undefined), * duration: (number|undefined), * easing: (function(number):number|undefined)}} - * @todo stability experimental + * @todo api */ olx.animation.PanOptions; @@ -549,7 +550,7 @@ olx.animation.PanOptions.prototype.easing; * start: (number|undefined), * duration: (number|undefined), * easing: (function(number):number|undefined)}} - * @todo stability experimental + * @todo api */ olx.animation.RotateOptions; @@ -596,7 +597,7 @@ olx.animation.RotateOptions.prototype.easing; * start: (number|undefined), * duration: (number|undefined), * easing: (function(number):number|undefined)}} - * @todo stability experimental + * @todo api */ olx.animation.ZoomOptions; @@ -633,7 +634,7 @@ olx.animation.ZoomOptions.prototype.easing; /** * @typedef {{className: (string|undefined), * target: (Element|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.AttributionOptions; @@ -655,7 +656,7 @@ olx.control.AttributionOptions.prototype.target; /** * @typedef {{element: (Element|undefined), * target: (Element|string|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.ControlOptions; @@ -683,7 +684,7 @@ olx.control.ControlOptions.prototype.target; * logoOptions: (olx.control.LogoOptions|undefined), * zoom: (boolean|undefined), * zoomOptions: (olx.control.ZoomOptions|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.DefaultsOptions; @@ -735,7 +736,7 @@ olx.control.DefaultsOptions.prototype.zoomOptions; * tipLabel: (string|undefined), * keys: (boolean|undefined), * target: (Element|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.FullScreenOptions; @@ -771,7 +772,7 @@ olx.control.FullScreenOptions.prototype.target; /** * @typedef {{className: (string|undefined), * target: (Element|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.LogoOptions; @@ -796,7 +797,7 @@ olx.control.LogoOptions.prototype.target; * projection: ol.proj.ProjectionLike, * target: (Element|undefined), * undefinedHTML: (string|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.MousePositionOptions; @@ -841,7 +842,7 @@ olx.control.MousePositionOptions.prototype.undefinedHTML; * minWidth: (number|undefined), * target: (Element|undefined), * units: (ol.control.ScaleLineUnits|string|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.ScaleLineOptions; @@ -883,7 +884,7 @@ olx.control.ScaleLineOptions.prototype.units; * zoomOutTipLabel: (string|undefined), * delta: (number|undefined), * target: (Element|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.ZoomOptions; @@ -948,7 +949,7 @@ olx.control.ZoomOptions.prototype.target; * @typedef {{className: (string|undefined), * maxResolution: (number|undefined), * minResolution: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.ZoomSliderOptions; @@ -979,7 +980,7 @@ olx.control.ZoomSliderOptions.prototype.minResolution; * target: (Element|undefined), * tipLabel: (string|undefined), * extent: (ol.Extent|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.ZoomToExtentOptions; @@ -1015,7 +1016,7 @@ olx.control.ZoomToExtentOptions.prototype.extent; /** * @typedef {{defaultProjection: ol.proj.ProjectionLike}} - * @todo stability experimental + * @todo api */ olx.format.GeoJSONOptions; @@ -1029,7 +1030,7 @@ olx.format.GeoJSONOptions.prototype.defaultProjection; /** * @typedef {{defaultProjection: ol.proj.ProjectionLike}} - * @todo stability experimental + * @todo api */ olx.format.TopoJSONOptions; @@ -1043,7 +1044,7 @@ olx.format.TopoJSONOptions.prototype.defaultProjection; /** * @typedef {{altitudeMode: (ol.format.IGCZ|undefined)}} - * @todo stability experimental + * @todo api */ olx.format.IGCOptions; @@ -1058,7 +1059,7 @@ olx.format.IGCOptions.prototype.altitudeMode; /** * @typedef {{defaultStyle: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.format.KMLOptions; @@ -1079,7 +1080,7 @@ olx.format.KMLOptions.prototype.defaultStyle; * multiCurve: (boolean|undefined), * multiSurface: (boolean|undefined), * schemaLocation: (string|undefined)}} - * @todo stability experimental + * @todo api */ olx.format.GMLOptions; @@ -1149,7 +1150,7 @@ olx.format.GMLOptions.prototype.schemaLocation; * @typedef {{featureNS: string, * featureType: string, * schemaLocation: (string|undefined)}} - * @todo stability experimental + * @todo api */ olx.format.WFSOptions; @@ -1186,7 +1187,7 @@ olx.format.WFSOptions.prototype.schemaLocation; * maxFeatures: (number|undefined), * geometryName: (string|undefined), * bbox: (ol.Extent|undefined)}} - * @todo stability experimental + * @todo api */ olx.format.WFSWriteGetFeatureOptions; @@ -1262,7 +1263,7 @@ olx.format.WFSWriteGetFeatureOptions.prototype.bbox; * srsName: (string|undefined), * handle: (string|undefined), * nativeElements: Array.}} - * @todo stability experimental + * @todo api */ olx.format.WFSWriteTransactionOptions; @@ -1322,7 +1323,7 @@ olx.format.WFSWriteTransactionOptions.prototype.nativeElements; * pinchZoom: (boolean|undefined), * zoomDelta: (number|undefined), * zoomDuration: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.DefaultsOptions; @@ -1400,7 +1401,7 @@ olx.interaction.DefaultsOptions.prototype.zoomDuration; /** * @typedef {{duration: (number|undefined), * delta: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.DoubleClickZoomOptions; @@ -1422,7 +1423,7 @@ olx.interaction.DoubleClickZoomOptions.prototype.delta; /** * @typedef {{formatConstructors: (Array.|undefined), * reprojectTo: ol.proj.ProjectionLike}} - * @todo stability experimental + * @todo api */ olx.interaction.DragAndDropOptions; @@ -1444,7 +1445,7 @@ olx.interaction.DragAndDropOptions.prototype.reprojectTo; /** * @typedef {{condition: (ol.events.ConditionType|undefined), * style: ol.style.Style}} - * @todo stability experimental + * @todo api */ olx.interaction.DragBoxOptions; @@ -1466,7 +1467,7 @@ olx.interaction.DragBoxOptions.prototype.style; /** * @typedef {{kinetic: (ol.Kinetic|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.DragPanOptions; @@ -1480,7 +1481,7 @@ olx.interaction.DragPanOptions.prototype.kinetic; /** * @typedef {{condition: (ol.events.ConditionType|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.DragRotateAndZoomOptions; @@ -1495,7 +1496,7 @@ olx.interaction.DragRotateAndZoomOptions.prototype.condition; /** * @typedef {{condition: (ol.events.ConditionType|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.DragRotateOptions; @@ -1511,7 +1512,7 @@ olx.interaction.DragRotateOptions.prototype.condition; /** * @typedef {{condition: (ol.events.ConditionType|undefined), * style: ol.style.Style}} - * @todo stability experimental + * @todo api */ olx.interaction.DragZoomOptions; @@ -1538,7 +1539,7 @@ olx.interaction.DragZoomOptions.prototype.style; * type: ol.geom.GeometryType, * minPointsPerRing: (number|undefined), * style: (ol.style.Style|Array.|ol.feature.StyleFunction|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.DrawOptions; @@ -1590,7 +1591,7 @@ olx.interaction.DrawOptions.prototype.style; /** * @typedef {{condition: (ol.events.ConditionType|undefined), * pixelDelta: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.KeyboardPanOptions; @@ -1614,7 +1615,7 @@ olx.interaction.KeyboardPanOptions.prototype.pixelDelta; * @typedef {{duration: (number|undefined), * condition: (ol.events.ConditionType|undefined), * delta: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.KeyboardZoomOptions; @@ -1646,7 +1647,7 @@ olx.interaction.KeyboardZoomOptions.prototype.delta; * pixelTolerance: (number|undefined), * style: (ol.style.Style|Array.|ol.feature.StyleFunction|undefined), * features: ol.Collection}} - * @todo stability experimental + * @todo api */ olx.interaction.ModifyOptions; @@ -1683,7 +1684,7 @@ olx.interaction.ModifyOptions.prototype.features; /** * @typedef {{duration: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.MouseWheelZoomOptions; @@ -1697,7 +1698,7 @@ olx.interaction.MouseWheelZoomOptions.prototype.duration; /** * @typedef {{threshold: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.PinchRotateOptions; @@ -1711,7 +1712,7 @@ olx.interaction.PinchRotateOptions.prototype.threshold; /** * @typedef {{duration: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.PinchZoomOptions; @@ -1730,7 +1731,7 @@ olx.interaction.PinchZoomOptions.prototype.duration; * style: (ol.style.Style|Array.|ol.feature.StyleFunction|undefined), * removeCondition: (ol.events.ConditionType|undefined), * toggleCondition: (ol.events.ConditionType|undefined)}} - * @todo stability experimental + * @todo api */ olx.interaction.SelectOptions; @@ -1797,7 +1798,7 @@ olx.interaction.SelectOptions.prototype.toggleCondition; * visible: (boolean|undefined), * minResolution: (number|undefined), * maxResolution: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.layer.BaseOptions; @@ -1868,7 +1869,7 @@ olx.layer.BaseOptions.prototype.maxResolution; * visible: (boolean|undefined), * minResolution: (number|undefined), * maxResolution: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.layer.LayerOptions; @@ -1946,7 +1947,7 @@ olx.layer.LayerOptions.prototype.maxResolution; * minResolution: (number|undefined), * maxResolution: (number|undefined), * layers: (Array.|ol.Collection|undefined)}} - * @todo stability experimental + * @todo api */ olx.layer.GroupOptions; @@ -2029,7 +2030,7 @@ olx.layer.GroupOptions.prototype.layers; * saturation: (number|undefined), * source: ol.source.Vector, * visible: (boolean|undefined)}} - * @todo stability experimental + * @todo api */ olx.layer.HeatmapOptions; @@ -2147,7 +2148,7 @@ olx.layer.HeatmapOptions.prototype.visible; * minResolution: (number|undefined), * maxResolution: (number|undefined), * useInterimTilesOnError: (boolean|undefined)}} - * @todo stability experimental + * @todo api */ olx.layer.TileOptions; @@ -2241,7 +2242,7 @@ olx.layer.TileOptions.prototype.useInterimTilesOnError; * source: ol.source.Vector, * style: (ol.style.Style|Array.|ol.feature.StyleFunction|undefined), * visible: (boolean|undefined)}} - * @todo stability experimental + * @todo api */ olx.layer.VectorOptions; @@ -2329,7 +2330,7 @@ olx.layer.VectorOptions.prototype.visible; * @typedef {{features: (Array.|ol.Collection|undefined), * map: (ol.Map|undefined), * style: (ol.style.Style|Array.|ol.feature.StyleFunction|undefined)}} - * @todo stability experimental + * @todo api */ olx.FeatureOverlayOptions; @@ -2360,7 +2361,7 @@ olx.FeatureOverlayOptions.prototype.style; * key: string, * imagerySet: string, * tileLoadFunction: (ol.TileLoadFunctionType|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.BingMapsOptions; @@ -2399,7 +2400,7 @@ olx.source.BingMapsOptions.prototype.tileLoadFunction; * format: ol.format.Feature, * logo: (string|undefined), * projection: ol.proj.ProjectionLike}} - * @todo stability experimental + * @todo api */ olx.source.FormatVectorOptions; @@ -2449,7 +2450,7 @@ olx.source.FormatVectorOptions.prototype.projection; * text: (string|undefined), * url: (string|undefined), * urls: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.GeoJSONOptions; @@ -2528,7 +2529,7 @@ olx.source.GeoJSONOptions.prototype.urls; * text: (string|undefined), * url: (string|undefined), * urls: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.GPXOptions; @@ -2610,7 +2611,7 @@ olx.source.GPXOptions.prototype.urls; * tileGrid: (ol.tilegrid.TileGrid|undefined), * tileLoadFunction: (ol.TileLoadFunctionType|undefined), * tileUrlFunction: (ol.TileUrlFunctionType|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.TileImageOptions; @@ -2698,7 +2699,7 @@ olx.source.TileImageOptions.prototype.tileUrlFunction; * tileUrlFunction: (ol.TileUrlFunctionType|undefined), * url: (string|undefined), * urls: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.TileVectorOptions; @@ -2784,7 +2785,7 @@ olx.source.TileVectorOptions.prototype.urls; * projection: ol.proj.ProjectionLike, * text: (string|undefined), * url: (string|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.TopoJSONOptions; @@ -2852,7 +2853,7 @@ olx.source.TopoJSONOptions.prototype.url; * text: (string|undefined), * url: (string|undefined), * urls: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.IGCOptions; @@ -2905,7 +2906,7 @@ olx.source.IGCOptions.prototype.urls; * ratio: (number|undefined), * resolutions: (Array.|undefined), * params: (Object|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.MapGuideOptions; @@ -2993,7 +2994,7 @@ olx.source.MapGuideOptions.prototype.params; * text: (string|undefined), * url: (string|undefined), * urls: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.KMLOptions; @@ -3072,7 +3073,7 @@ olx.source.KMLOptions.prototype.urls; /** * @typedef {{layer: string, * tileLoadFunction: (ol.TileLoadFunctionType|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.MapQuestOptions; @@ -3095,7 +3096,7 @@ olx.source.MapQuestOptions.prototype.tileLoadFunction; * @typedef {{extent: (ol.Extent|undefined), * projection: ol.proj.ProjectionLike, * tileGrid: (ol.tilegrid.TileGrid|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.TileDebugOptions; @@ -3127,7 +3128,7 @@ olx.source.TileDebugOptions.prototype.tileGrid; * maxZoom: (number|undefined), * tileLoadFunction: (ol.TileLoadFunctionType|undefined), * url: (string|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.OSMOptions; @@ -3180,7 +3181,7 @@ olx.source.OSMOptions.prototype.url; * text: (string|undefined), * url: (string|undefined), * urls: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.OSMXMLOptions; @@ -3271,7 +3272,7 @@ olx.source.OSMXMLOptions.prototype.urls; * ratio: (number|undefined), * resolutions: (Array.|undefined), * state: (ol.source.State|string|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.ImageCanvasOptions; @@ -3350,7 +3351,7 @@ olx.source.ImageCanvasOptions.prototype.state; * resolutions: (Array.|undefined), * source: ol.source.Vector, * style: (ol.style.Style|Array.|ol.feature.StyleFunction|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.ImageVectorOptions; @@ -3426,7 +3427,7 @@ olx.source.ImageVectorOptions.prototype.style; * ratio: (number|undefined), * resolutions: (Array.|undefined), * url: (string|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.ImageWMSOptions; @@ -3520,7 +3521,7 @@ olx.source.ImageWMSOptions.prototype.url; * opaque: (boolean|undefined), * tileLoadFunction: (ol.TileLoadFunctionType|undefined), * url: (string|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.StamenOptions; @@ -3576,7 +3577,7 @@ olx.source.StamenOptions.prototype.url; * logo: (string|undefined), * projection: ol.proj.ProjectionLike, * url: string}} - * @todo stability experimental + * @todo api */ olx.source.ImageStaticOptions; @@ -3645,7 +3646,7 @@ olx.source.ImageStaticOptions.prototype.url; * strategy: (function(ol.Extent, number): Array.|undefined), * logo: (string|undefined), * projection: ol.proj.ProjectionLike}} - * @todo stability experimental + * @todo api */ olx.source.ServerVectorOptions; @@ -3703,7 +3704,7 @@ olx.source.ServerVectorOptions.prototype.projection; * @typedef {{crossOrigin: (null|string|undefined), * tileLoadFunction: (ol.TileLoadFunctionType|undefined), * url: string}} - * @todo stability experimental + * @todo api */ olx.source.TileJSONOptions; @@ -3744,7 +3745,7 @@ olx.source.TileJSONOptions.prototype.url; * tileLoadFunction: (ol.TileLoadFunctionType|undefined), * url: (string|undefined), * urls: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.TileWMSOptions; @@ -3866,7 +3867,7 @@ olx.source.TileWMSOptions.prototype.urls; * logo: (string|undefined), * projection: ol.proj.ProjectionLike, * state: (ol.source.State|string|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.VectorOptions; @@ -3926,7 +3927,7 @@ olx.source.VectorOptions.prototype.state; * text: (string|undefined), * url: (string|undefined), * urls: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.StaticVectorOptions; @@ -4033,7 +4034,7 @@ olx.source.StaticVectorOptions.prototype.urls; * maxZoom: (number|undefined), * tileLoadFunction: (ol.TileLoadFunctionType|undefined), * urls: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.WMTSOptions; @@ -4170,7 +4171,7 @@ olx.source.WMTSOptions.prototype.urls; * url: (string|undefined), * urls: (Array.|undefined), * wrapX: (boolean|undefined)}} - * @todo stability experimental + * @todo api */ olx.source.XYZOptions; @@ -4267,7 +4268,7 @@ olx.source.XYZOptions.prototype.wrapX; * url: !string, * tierSizeCalculation: (string|undefined), * size: ol.Size}} - * @todo stability experimental + * @todo api */ olx.source.ZoomifyOptions; @@ -4318,7 +4319,7 @@ olx.source.ZoomifyOptions.prototype.size; * @typedef {{fill: (ol.style.Fill|undefined), * radius: number, * stroke: (ol.style.Stroke|undefined)}} - * @todo stability experimental + * @todo api */ olx.style.CircleOptions; @@ -4346,7 +4347,7 @@ olx.style.CircleOptions.prototype.stroke; /** * @typedef {{color: (ol.Color|string|undefined)}} - * @todo stability experimental + * @todo api */ olx.style.FillOptions; @@ -4369,7 +4370,7 @@ olx.style.FillOptions.prototype.color; * rotation: (number|undefined), * size: (ol.Size|undefined), * src: string}} - * @todo stability experimental + * @todo api */ olx.style.IconOptions; @@ -4456,7 +4457,7 @@ olx.style.IconOptions.prototype.src; * lineDash: (Array.|undefined), * miterLimit: (number|undefined), * width: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.style.StrokeOptions; @@ -4514,7 +4515,7 @@ olx.style.StrokeOptions.prototype.width; * textBaseline: (string|undefined), * fill: (ol.style.Fill|undefined), * stroke: (ol.style.Stroke|undefined)}} - * @todo stability experimental + * @todo api */ olx.style.TextOptions; @@ -4597,7 +4598,7 @@ olx.style.TextOptions.prototype.stroke; * stroke: (ol.style.Stroke|undefined), * text: (ol.style.Text|undefined), * zIndex: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.style.StyleOptions; @@ -4644,7 +4645,7 @@ olx.style.StyleOptions.prototype.zIndex; * resolutions: !Array., * tileSize: (number|undefined), * tileSizes: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.tilegrid.TileGridOptions; @@ -4698,7 +4699,7 @@ olx.tilegrid.TileGridOptions.prototype.tileSizes; * matrixIds: !Array., * tileSize: (number|undefined), * tileSizes: (Array.|undefined)}} - * @todo stability experimental + * @todo api */ olx.tilegrid.WMTSOptions; @@ -4747,7 +4748,7 @@ olx.tilegrid.WMTSOptions.prototype.tileSizes; /** * @typedef {{maxZoom: number}} - * @todo stability experimental + * @todo api */ olx.tilegrid.XYZOptions; @@ -4761,7 +4762,7 @@ olx.tilegrid.XYZOptions.prototype.maxZoom; /** * @typedef {{resolutions: !Array.}} - * @todo stability experimental + * @todo api */ olx.tilegrid.ZoomifyOptions; @@ -4778,7 +4779,7 @@ olx.tilegrid.ZoomifyOptions.prototype.resolutions; * constrainResolution: (boolean|undefined), * nearest: (boolean|undefined), * minResolution: (number|undefined)}} - * @todo stability experimental + * @todo api */ olx.View2D.fitGeometryOptions; diff --git a/externs/readme.md b/externs/readme.md new file mode 100644 index 0000000000..9315b6b6c0 --- /dev/null +++ b/externs/readme.md @@ -0,0 +1,116 @@ +# Externs + +This directory contains externs files, which tell the Closure compiler about symbols and properties that it should not rename. + +## oli.js and olx.js + +These two files are special externs that belong to ol3, and this document explains their purpose and how they are used. + +### Prevent class properties from being renamed + +For events, we make properties available to the application. Other than methods, which can be made available by just marking them with the `@api` annotation, properties are exported using `oli.js`: +```js +/** @interface */ +oli.MapBrowserEvent; + +/** + * @type {ol.Coordinate} + * @todo api + */ +oli.MapBrowserEvent.prototype.coordinate; +``` +In the source file (`src/ol/MapBrowserEvent.js`), the class needs to implement this interface: +```js +/** + * ... + * @constructor + * @implements {oli.MapBrowserEvent} + */ +ol.MapBrowserEvent = function(type, map, browserEvent, opt_frameState) { + + // ... + + /** + * @type {ol.Coordinate} + */ + this.coordinate = map.getEventCoordinate(this.originalEvent); + + // ... + +}; +``` + +### Override methods in custom classes + +For custom subclasses in applications, which can be created using `ol.extends`, the API may want to make certain methods available to override. In addition to marking such methods as `@api`, they need also be added to an interface in `oli.js`: +```js +/** + * @interface + */ +oli.control.Control; + +/** + * @param {ol.Map} map Map. + * @return {undefined} Undefined. + */ +oli.control.Control.prototype.setMap = function(map) {}; + +``` +This interface must be implemented by the class in the source file (`src/ol/control/control.js`): +```js +/** + * ... + * @constructor + * @implements {oli.control.Control} + */ +ol.control.Control = function(options) { + // ... +}; + +// ... + +/** + * Application subclasses may override this. + * @param {ol.Map} map Map. + * @todo api + */ +ol.control.Control.prototype.setMap = function(map) { + // ... +}; +``` + +### Export object literals + +Object literals cannot be exported like classes. To make sure that their properties do not get renamed, they go in `olx.js`: +```js +/** + * @typedef {{element: (Element|undefined), + * target: (Element|string|undefined)}} + * @todo api + */ +olx.control.ControlOptions; + +/** + * The element is the control's container element. This only needs to be + * specified if you're developing a custom control. + * @type {Element|undefined} + */ +olx.control.ControlOptions.prototype.element; + +/** + * Specify a target if you want the control to be rendered outside of the map's + * viewport. + * @type {Element|string|undefined} + */ +olx.control.ControlOptions.prototype.target; +``` +In the source code, the name used for the typedef is used as type whenever this object literal is expected: +```js +/** + * ... + * @param {olx.control.ControlOptions} options Control options. + */ +ol.control.Control = function(options) { + // ... +}; +``` diff --git a/old/src/ol/expr.exports b/old/src/ol/expr.exports deleted file mode 100644 index 14b6f57d46..0000000000 --- a/old/src/ol/expr.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.expr.parse -@exportSymbol ol.expr.register diff --git a/old/src/ol/parser/ogc/versionedparser.exports b/old/src/ol/parser/ogc/versionedparser.exports deleted file mode 100644 index 8d3189fde9..0000000000 --- a/old/src/ol/parser/ogc/versionedparser.exports +++ /dev/null @@ -1 +0,0 @@ -@exportProperty ol.parser.ogc.Versioned.prototype.getParser diff --git a/old/src/ol/parser/ogc/wmtscapabilitiesparser.exports b/old/src/ol/parser/ogc/wmtscapabilitiesparser.exports deleted file mode 100644 index dec7a65f4e..0000000000 --- a/old/src/ol/parser/ogc/wmtscapabilitiesparser.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.parser.ogc.WMTSCapabilities -@exportProperty ol.parser.ogc.WMTSCapabilities.prototype.read diff --git a/old/src/ol/parser/wktparser.exports b/old/src/ol/parser/wktparser.exports deleted file mode 100644 index 5fbc0f6563..0000000000 --- a/old/src/ol/parser/wktparser.exports +++ /dev/null @@ -1,5 +0,0 @@ -@exportSymbol ol.parser.WKT -@exportProperty ol.parser.WKT.prototype.read -@exportProperty ol.parser.WKT.prototype.write -@exportProperty ol.parser.WKT.read -@exportProperty ol.parser.WKT.write diff --git a/old/src/ol/style.exports b/old/src/ol/style.exports deleted file mode 100644 index 87526beedb..0000000000 --- a/old/src/ol/style.exports +++ /dev/null @@ -1,9 +0,0 @@ -@exportSymbol ol.style.Fill -@exportSymbol ol.style.Icon -@exportSymbol ol.style.Rule -@exportSymbol ol.style.Shape -@exportSymbol ol.style.Stroke -@exportSymbol ol.style.Style -@exportSymbol ol.style.Text -@exportSymbol ol.style.ShapeType -@exportProperty ol.style.ShapeType.CIRCLE diff --git a/package.json b/package.json index 3e5d7556b6..c45c4e44c4 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,14 @@ "url": "https://github.com/openlayers/ol3/issues" }, "devDependencies": { - "closure-util": "~0.9.0", + "closure-util": "~0.11.0", "async": "~0.2.10", "htmlparser2": "~3.7.1", "jshint": "~2.4.4", - "jsdoc": "^3.3.0-alpha5" + "jsdoc": "~3.3.0-alpha5", + "walk": "~2.3.1", + "fs-extra": "~0.8.1", + "nomnom": "~1.6.2", + "temp": "~0.7.0" } } diff --git a/src/ol/animation.exports b/src/ol/animation.exports deleted file mode 100644 index 5cab49819d..0000000000 --- a/src/ol/animation.exports +++ /dev/null @@ -1,4 +0,0 @@ -@exportSymbol ol.animation.bounce -@exportSymbol ol.animation.pan -@exportSymbol ol.animation.rotate -@exportSymbol ol.animation.zoom diff --git a/src/ol/animation.js b/src/ol/animation.js index 50c69921d5..29ec08499a 100644 --- a/src/ol/animation.js +++ b/src/ol/animation.js @@ -11,7 +11,7 @@ goog.require('ol.easing'); /** * @param {olx.animation.BounceOptions} options Bounce options. * @return {ol.PreRenderFunction} Pre-render function. - * @todo stability experimental + * @todo api */ ol.animation.bounce = function(options) { var resolution = options.resolution; @@ -46,7 +46,7 @@ ol.animation.bounce = function(options) { /** * @param {olx.animation.PanOptions} options Pan options. * @return {ol.PreRenderFunction} Pre-render function. - * @todo stability experimental + * @todo api */ ol.animation.pan = function(options) { var source = options.source; @@ -85,7 +85,7 @@ ol.animation.pan = function(options) { /** * @param {olx.animation.RotateOptions} options Rotate options. * @return {ol.PreRenderFunction} Pre-render function. - * @todo stability experimental + * @todo api */ ol.animation.rotate = function(options) { var sourceRotation = goog.isDef(options.rotation) ? options.rotation : 0; @@ -130,7 +130,7 @@ ol.animation.rotate = function(options) { /** * @param {olx.animation.ZoomOptions} options Zoom options. * @return {ol.PreRenderFunction} Pre-render function. - * @todo stability experimental + * @todo api */ ol.animation.zoom = function(options) { var sourceResolution = options.resolution; diff --git a/src/ol/attribution.exports b/src/ol/attribution.exports deleted file mode 100644 index 053c0abeae..0000000000 --- a/src/ol/attribution.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.Attribution diff --git a/src/ol/attribution.js b/src/ol/attribution.js index 3c95c8b83d..2f89291d68 100644 --- a/src/ol/attribution.js +++ b/src/ol/attribution.js @@ -22,7 +22,7 @@ goog.require('ol.TileRange'); * @constructor * @param {olx.AttributionOptions} options Attribution options. * @struct - * @todo stability experimental + * @todo api */ ol.Attribution = function(options) { diff --git a/src/ol/browserfeature.exports b/src/ol/browserfeature.exports deleted file mode 100644 index 832c611d89..0000000000 --- a/src/ol/browserfeature.exports +++ /dev/null @@ -1,7 +0,0 @@ -@exportSymbol ol.BrowserFeature -@exportProperty ol.BrowserFeature.DEVICE_PIXEL_RATIO -@exportProperty ol.BrowserFeature.HAS_CANVAS -@exportProperty ol.BrowserFeature.HAS_DEVICE_ORIENTATION -@exportProperty ol.BrowserFeature.HAS_GEOLOCATION -@exportProperty ol.BrowserFeature.HAS_TOUCH -@exportProperty ol.BrowserFeature.HAS_WEBGL diff --git a/src/ol/browserfeature.js b/src/ol/browserfeature.js index 939a8d9081..b6ab5c1452 100644 --- a/src/ol/browserfeature.js +++ b/src/ol/browserfeature.js @@ -77,7 +77,7 @@ ol.IS_LEGACY_IE = goog.userAgent.IE && * (dips) on the device (`window.devicePixelRatio`). * @const * @type {number} - * @todo stability experimental + * @todo api */ ol.BrowserFeature.DEVICE_PIXEL_RATIO = goog.global.devicePixelRatio || 1; @@ -86,7 +86,6 @@ ol.BrowserFeature.DEVICE_PIXEL_RATIO = goog.global.devicePixelRatio || 1; * True if the browser supports ArrayBuffers. * @const * @type {boolean} - * @todo stability experimental */ ol.BrowserFeature.HAS_ARRAY_BUFFER = 'ArrayBuffer' in goog.global; @@ -94,7 +93,6 @@ ol.BrowserFeature.HAS_ARRAY_BUFFER = 'ArrayBuffer' in goog.global; /** * True if the browser's Canvas implementation implements {get,set}LineDash. * @type {boolean} - * @todo stability experimental */ ol.BrowserFeature.HAS_CANVAS_LINE_DASH = false; @@ -103,7 +101,7 @@ ol.BrowserFeature.HAS_CANVAS_LINE_DASH = false; * True if browser supports Canvas. * @const * @type {boolean} - * @todo stability experimental + * @todo api */ ol.BrowserFeature.HAS_CANVAS = ol.ENABLE_CANVAS && ( /** @@ -133,7 +131,7 @@ ol.BrowserFeature.HAS_CANVAS = ol.ENABLE_CANVAS && ( * Indicates if DeviceOrientation is supported in the user's browser. * @const * @type {boolean} - * @todo stability experimental + * @todo api */ ol.BrowserFeature.HAS_DEVICE_ORIENTATION = 'DeviceOrientationEvent' in goog.global; @@ -143,7 +141,6 @@ ol.BrowserFeature.HAS_DEVICE_ORIENTATION = * True if browser supports DOM. * @const * @type {boolean} - * @todo stability experimental */ ol.BrowserFeature.HAS_DOM = ol.ENABLE_DOM; @@ -152,7 +149,7 @@ ol.BrowserFeature.HAS_DOM = ol.ENABLE_DOM; * Is HTML5 geolocation supported in the current browser? * @const * @type {boolean} - * @todo stability experimental + * @todo api */ ol.BrowserFeature.HAS_GEOLOCATION = 'geolocation' in goog.global.navigator; @@ -160,7 +157,6 @@ ol.BrowserFeature.HAS_GEOLOCATION = 'geolocation' in goog.global.navigator; /** * @const * @type {boolean} - * @todo stability experimental */ ol.BrowserFeature.HAS_JSON_PARSE = 'JSON' in goog.global && 'parse' in goog.global.JSON; @@ -170,7 +166,7 @@ ol.BrowserFeature.HAS_JSON_PARSE = * True if browser supports touch events. * @const * @type {boolean} - * @todo stability experimental + * @todo api */ ol.BrowserFeature.HAS_TOUCH = ol.ASSUME_TOUCH || 'ontouchstart' in goog.global; @@ -179,7 +175,6 @@ ol.BrowserFeature.HAS_TOUCH = ol.ASSUME_TOUCH || 'ontouchstart' in goog.global; * True if browser supports pointer events. * @const * @type {boolean} - * @todo stability experimental */ ol.BrowserFeature.HAS_POINTER = 'PointerEvent' in goog.global; @@ -188,7 +183,6 @@ ol.BrowserFeature.HAS_POINTER = 'PointerEvent' in goog.global; * True if browser supports ms pointer events (IE 10). * @const * @type {boolean} - * @todo stability experimental */ ol.BrowserFeature.HAS_MSPOINTER = !!(goog.global.navigator.msPointerEnabled); @@ -198,7 +192,6 @@ ol.BrowserFeature.HAS_MSPOINTER = * True if browser supports WebGL. * @const * @type {boolean} - * @todo stability experimental */ ol.BrowserFeature.HAS_WEBGL = ol.ENABLE_WEBGL && ( /** diff --git a/src/ol/canvasfunction.js b/src/ol/canvasfunction.js index 10caa4be88..a9e9e7dc80 100644 --- a/src/ol/canvasfunction.js +++ b/src/ol/canvasfunction.js @@ -12,6 +12,6 @@ goog.provide('ol.CanvasFunctionType'); * * @typedef {function(this:ol.source.ImageCanvas, ol.Extent, number, * number, ol.Size, ol.proj.Projection): HTMLCanvasElement} - * @todo stability experimental + * @todo api */ ol.CanvasFunctionType; diff --git a/src/ol/centerconstraint.js b/src/ol/centerconstraint.js index 790e53237f..0a7b5ed830 100644 --- a/src/ol/centerconstraint.js +++ b/src/ol/centerconstraint.js @@ -6,7 +6,7 @@ goog.require('goog.math'); /** * @typedef {function((ol.Coordinate|undefined)): (ol.Coordinate|undefined)} - * @todo stability experimental + * @todo api */ ol.CenterConstraintType; diff --git a/src/ol/collection.exports b/src/ol/collection.exports deleted file mode 100644 index afd0bd9b97..0000000000 --- a/src/ol/collection.exports +++ /dev/null @@ -1,13 +0,0 @@ -@exportSymbol ol.Collection -@exportProperty ol.Collection.prototype.clear -@exportProperty ol.Collection.prototype.extend -@exportProperty ol.Collection.prototype.forEach -@exportProperty ol.Collection.prototype.getArray -@exportProperty ol.Collection.prototype.getAt -@exportProperty ol.Collection.prototype.getLength -@exportProperty ol.Collection.prototype.insertAt -@exportProperty ol.Collection.prototype.pop -@exportProperty ol.Collection.prototype.push -@exportProperty ol.Collection.prototype.remove -@exportProperty ol.Collection.prototype.removeAt -@exportProperty ol.Collection.prototype.setAt diff --git a/src/ol/collection.js b/src/ol/collection.js index 6d0fa3e96c..667c6fa0a0 100644 --- a/src/ol/collection.js +++ b/src/ol/collection.js @@ -19,13 +19,13 @@ ol.CollectionEventType = { /** * Triggered when an item is added to the collection. * @event ol.CollectionEvent#add - * @todo stability experimental + * @todo api */ ADD: 'add', /** * Triggered when an item is removed from the collection. * @event ol.CollectionEvent#remove - * @todo stability experimental + * @todo api */ REMOVE: 'remove' }; @@ -47,7 +47,6 @@ ol.CollectionEvent = function(type, opt_element, opt_target) { /** * The element that is added to or removed from the collection. * @type {*} - * @todo stability experimental */ this.element = opt_element; @@ -70,8 +69,8 @@ ol.CollectionProperty = { * @extends {ol.Object} * @fires {@link ol.CollectionEvent} ol.CollectionEvent * @param {Array=} opt_array Array. - * @todo stability experimental * @todo observable length {number} readonly the length of the array + * @todo api */ ol.Collection = function(opt_array) { @@ -91,7 +90,7 @@ goog.inherits(ol.Collection, ol.Object); /** * Remove all elements from the collection. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.clear = function() { while (this.getLength() > 0) { @@ -103,7 +102,7 @@ ol.Collection.prototype.clear = function() { /** * @param {Array} arr Array. * @return {ol.Collection} This collection. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.extend = function(arr) { var i, ii; @@ -121,7 +120,7 @@ ol.Collection.prototype.extend = function(arr) { * index and the array). The return value is ignored. * @param {S=} opt_this The object to use as `this` in `f`. * @template T,S - * @todo stability experimental + * @todo api */ ol.Collection.prototype.forEach = function(f, opt_this) { goog.array.forEach(this.array_, f, opt_this); @@ -134,7 +133,7 @@ ol.Collection.prototype.forEach = function(f, opt_this) { * collection's "length" property won't be in sync with the actual length * of the array. * @return {Array} Array. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.getArray = function() { return this.array_; @@ -145,7 +144,7 @@ ol.Collection.prototype.getArray = function() { * Get the element at the provided index. * @param {number} index Index. * @return {*} Element. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.getAt = function(index) { return this.array_[index]; @@ -155,7 +154,7 @@ ol.Collection.prototype.getAt = function(index) { /** * Get the length of this collection. * @return {number} Length. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.getLength = function() { return /** @type {number} */ (this.get(ol.CollectionProperty.LENGTH)); @@ -166,7 +165,7 @@ ol.Collection.prototype.getLength = function() { * Insert an element at the provided index. * @param {number} index Index. * @param {*} elem Element. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.insertAt = function(index, elem) { goog.array.insertAt(this.array_, elem, index); @@ -179,7 +178,7 @@ ol.Collection.prototype.insertAt = function(index, elem) { /** * Remove the last element of the collection. * @return {*} Element. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.pop = function() { return this.removeAt(this.getLength() - 1); @@ -190,7 +189,7 @@ ol.Collection.prototype.pop = function() { * Insert the provided element at the end of the collection. * @param {*} elem Element. * @return {number} Length. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.push = function(elem) { var n = this.array_.length; @@ -203,7 +202,7 @@ ol.Collection.prototype.push = function(elem) { * Removes the first occurence of elem from the collection. * @param {*} elem Element. * @return {*} The removed element or undefined if elem was not found. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.remove = function(elem) { var arr = this.array_; @@ -221,7 +220,7 @@ ol.Collection.prototype.remove = function(elem) { * Remove the element at the provided index. * @param {number} index Index. * @return {*} Value. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.removeAt = function(index) { var prev = this.array_[index]; @@ -237,7 +236,7 @@ ol.Collection.prototype.removeAt = function(index) { * Set the element at the provided index. * @param {number} index Index. * @param {*} elem Element. - * @todo stability experimental + * @todo api */ ol.Collection.prototype.setAt = function(index, elem) { var n = this.getLength(); diff --git a/src/ol/color/color.exports b/src/ol/color/color.exports deleted file mode 100644 index cc1d37a73a..0000000000 --- a/src/ol/color/color.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.color.asArray -@exportSymbol ol.color.asString diff --git a/src/ol/color/color.js b/src/ol/color/color.js index a0befe3df5..b33768ca52 100644 --- a/src/ol/color/color.js +++ b/src/ol/color/color.js @@ -103,6 +103,7 @@ ol.color.blend = function(dst, src, opt_color) { /** * @param {ol.Color|string} color Color. * @return {ol.Color} Color. + * @todo api */ ol.color.asArray = function(color) { if (goog.isArray(color)) { @@ -117,6 +118,7 @@ ol.color.asArray = function(color) { /** * @param {ol.Color|string} color Color. * @return {string} String. + * @todo api */ ol.color.asString = function(color) { if (goog.isString(color)) { diff --git a/src/ol/control/attributioncontrol.exports b/src/ol/control/attributioncontrol.exports deleted file mode 100644 index a9fa893101..0000000000 --- a/src/ol/control/attributioncontrol.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.control.Attribution -@exportProperty ol.control.Attribution.prototype.setMap diff --git a/src/ol/control/attributioncontrol.js b/src/ol/control/attributioncontrol.js index 109faf06f9..8790894c95 100644 --- a/src/ol/control/attributioncontrol.js +++ b/src/ol/control/attributioncontrol.js @@ -21,7 +21,7 @@ goog.require('ol.css'); * @constructor * @extends {ol.control.Control} * @param {olx.control.AttributionOptions=} opt_options Attribution options. - * @todo stability experimental + * @todo api */ ol.control.Attribution = function(opt_options) { diff --git a/src/ol/control/control.exports b/src/ol/control/control.exports deleted file mode 100644 index 1d184d239e..0000000000 --- a/src/ol/control/control.exports +++ /dev/null @@ -1,3 +0,0 @@ -@exportSymbol ol.control.Control -@exportProperty ol.control.Control.prototype.getMap -@exportProperty ol.control.Control.prototype.setMap diff --git a/src/ol/control/control.js b/src/ol/control/control.js index 7b668dd4ac..a26cfc1f0f 100644 --- a/src/ol/control/control.js +++ b/src/ol/control/control.js @@ -16,7 +16,7 @@ goog.require('ol.Object'); * @extends {ol.Object} * @implements {oli.control.Control} * @param {olx.control.ControlOptions} options Control options. - * @todo stability stable + * @todo api stable */ ol.control.Control = function(options) { @@ -63,7 +63,7 @@ ol.control.Control.prototype.disposeInternal = function() { /** * Get the map associated with this control. * @return {ol.Map} Map. - * @todo stability experimental + * @todo api */ ol.control.Control.prototype.getMap = function() { return this.map_; @@ -84,7 +84,7 @@ ol.control.Control.prototype.handleMapPostrender = goog.nullFunction; * Subclasses may set up event handlers to get notified about changes to * the map here. * @param {ol.Map} map Map. - * @todo stability stable + * @todo api stable */ ol.control.Control.prototype.setMap = function(map) { if (!goog.isNull(this.map_)) { diff --git a/src/ol/control/controldefaults.exports b/src/ol/control/controldefaults.exports deleted file mode 100644 index a9c4315ac3..0000000000 --- a/src/ol/control/controldefaults.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.control.defaults diff --git a/src/ol/control/controldefaults.js b/src/ol/control/controldefaults.js index 9a771c14ab..667d63eee3 100644 --- a/src/ol/control/controldefaults.js +++ b/src/ol/control/controldefaults.js @@ -9,7 +9,7 @@ goog.require('ol.control.Zoom'); /** * @param {olx.control.DefaultsOptions=} opt_options Defaults options. * @return {ol.Collection} Controls. - * @todo stability experimental + * @todo api */ ol.control.defaults = function(opt_options) { diff --git a/src/ol/control/fullscreencontrol.exports b/src/ol/control/fullscreencontrol.exports deleted file mode 100644 index 6b8c9b566c..0000000000 --- a/src/ol/control/fullscreencontrol.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.control.FullScreen diff --git a/src/ol/control/fullscreencontrol.js b/src/ol/control/fullscreencontrol.js index 4b8e42a7c4..0eec49e02d 100644 --- a/src/ol/control/fullscreencontrol.js +++ b/src/ol/control/fullscreencontrol.js @@ -24,7 +24,7 @@ goog.require('ol.pointer.PointerEventHandler'); * @constructor * @extends {ol.control.Control} * @param {olx.control.FullScreenOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.control.FullScreen = function(opt_options) { diff --git a/src/ol/control/logocontrol.exports b/src/ol/control/logocontrol.exports deleted file mode 100644 index ccae41d4aa..0000000000 --- a/src/ol/control/logocontrol.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.control.Logo -@exportProperty ol.control.Logo.prototype.setMap diff --git a/src/ol/control/logocontrol.js b/src/ol/control/logocontrol.js index bb140f314d..def0bb0453 100644 --- a/src/ol/control/logocontrol.js +++ b/src/ol/control/logocontrol.js @@ -17,7 +17,7 @@ goog.require('ol.css'); * @constructor * @extends {ol.control.Control} * @param {olx.control.LogoOptions=} opt_options Logo options. - * @todo stability experimental + * @todo api */ ol.control.Logo = function(opt_options) { diff --git a/src/ol/control/mousepositioncontrol.exports b/src/ol/control/mousepositioncontrol.exports deleted file mode 100644 index 73f28771eb..0000000000 --- a/src/ol/control/mousepositioncontrol.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.control.MousePosition -@exportProperty ol.control.MousePosition.prototype.setMap diff --git a/src/ol/control/mousepositioncontrol.js b/src/ol/control/mousepositioncontrol.js index c103e9ad84..6649c1434b 100644 --- a/src/ol/control/mousepositioncontrol.js +++ b/src/ol/control/mousepositioncontrol.js @@ -38,11 +38,11 @@ ol.control.MousePositionProperty = { * @extends {ol.control.Control} * @param {olx.control.MousePositionOptions=} opt_options Mouse position * options. - * @todo stability experimental * @todo observable projection {ol.proj.Projection} the projection to report * mouse position in * @todo observable coordinateFormat {ol.CoordinateFormatType} the format to * render the current position in + * @todo api */ ol.control.MousePosition = function(opt_options) { @@ -132,8 +132,8 @@ ol.control.MousePosition.prototype.handleProjectionChanged_ = function() { /** - * @return {ol.CoordinateFormatType|undefined} projection. - * @todo stability experimental + * @return {ol.CoordinateFormatType|undefined} Coordinate format. + * @todo api */ ol.control.MousePosition.prototype.getCoordinateFormat = function() { return /** @type {ol.CoordinateFormatType|undefined} */ ( @@ -146,8 +146,8 @@ goog.exportProperty( /** - * @return {ol.proj.Projection|undefined} projection. - * @todo stability experimental + * @return {ol.proj.Projection|undefined} Projection. + * @todo api */ ol.control.MousePosition.prototype.getProjection = function() { return /** @type {ol.proj.Projection|undefined} */ ( @@ -184,6 +184,7 @@ ol.control.MousePosition.prototype.handleMouseOut = function(browserEvent) { /** * @inheritDoc + * @todo api */ ol.control.MousePosition.prototype.setMap = function(map) { goog.base(this, 'setMap', map); @@ -201,7 +202,7 @@ ol.control.MousePosition.prototype.setMap = function(map) { /** * @param {ol.CoordinateFormatType} format Coordinate format. - * @todo stability experimental + * @todo api */ ol.control.MousePosition.prototype.setCoordinateFormat = function(format) { this.set(ol.control.MousePositionProperty.COORDINATE_FORMAT, format); @@ -214,7 +215,7 @@ goog.exportProperty( /** * @param {ol.proj.Projection} projection Projection. - * @todo stability experimental + * @todo api */ ol.control.MousePosition.prototype.setProjection = function(projection) { this.set(ol.control.MousePositionProperty.PROJECTION, projection); diff --git a/src/ol/control/scalelinecontrol.exports b/src/ol/control/scalelinecontrol.exports deleted file mode 100644 index 4493ffde49..0000000000 --- a/src/ol/control/scalelinecontrol.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.control.ScaleLine -@exportProperty ol.control.ScaleLine.prototype.setMap diff --git a/src/ol/control/scalelinecontrol.js b/src/ol/control/scalelinecontrol.js index b09110fd5c..93f43edd63 100644 --- a/src/ol/control/scalelinecontrol.js +++ b/src/ol/control/scalelinecontrol.js @@ -20,7 +20,6 @@ goog.require('ol.sphere.NORMAL'); /** * @enum {string} - * @todo stability experimental */ ol.control.ScaleLineProperty = { UNITS: 'units' @@ -28,8 +27,10 @@ ol.control.ScaleLineProperty = { /** + * Units for the scale line. Supported values are `'degrees'`, `'imperial'`, + * `'nautical'`, `'metric'`, `'us'`. * @enum {string} - * @todo stability experimental + * @todo api */ ol.control.ScaleLineUnits = { DEGREES: 'degrees', @@ -49,9 +50,9 @@ ol.control.ScaleLineUnits = { * @constructor * @extends {ol.control.Control} * @param {olx.control.ScaleLineOptions=} opt_options Scale line options. - * @todo stability experimental * @todo observable units {ol.control.ScaleLineUnits} the units to use in the * scale line + * @todo api */ ol.control.ScaleLine = function(opt_options) { @@ -131,14 +132,13 @@ goog.inherits(ol.control.ScaleLine, ol.control.Control); /** * @const * @type {Array.} - * @todo stability experimental */ ol.control.ScaleLine.LEADING_DIGITS = [1, 2, 5]; /** * @return {ol.control.ScaleLineUnits|undefined} units. - * @todo stability experimental + * @todo api */ ol.control.ScaleLine.prototype.getUnits = function() { return /** @type {ol.control.ScaleLineUnits|undefined} */ ( @@ -174,7 +174,7 @@ ol.control.ScaleLine.prototype.handleUnitsChanged_ = function() { /** * @param {ol.control.ScaleLineUnits} units Units. - * @todo stability experimental + * @todo api */ ol.control.ScaleLine.prototype.setUnits = function(units) { this.set(ol.control.ScaleLineProperty.UNITS, units); diff --git a/src/ol/control/zoomcontrol.exports b/src/ol/control/zoomcontrol.exports deleted file mode 100644 index 8d8123f761..0000000000 --- a/src/ol/control/zoomcontrol.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.control.Zoom -@exportProperty ol.control.Zoom.prototype.setMap diff --git a/src/ol/control/zoomcontrol.js b/src/ol/control/zoomcontrol.js index 7eb552c8a9..f36794036c 100644 --- a/src/ol/control/zoomcontrol.js +++ b/src/ol/control/zoomcontrol.js @@ -23,7 +23,7 @@ goog.require('ol.pointer.PointerEventHandler'); * @constructor * @extends {ol.control.Control} * @param {olx.control.ZoomOptions=} opt_options Zoom options. - * @todo stability experimental + * @todo api */ ol.control.Zoom = function(opt_options) { diff --git a/src/ol/control/zoomslidercontrol.exports b/src/ol/control/zoomslidercontrol.exports deleted file mode 100644 index 3be7924ba6..0000000000 --- a/src/ol/control/zoomslidercontrol.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.control.ZoomSlider diff --git a/src/ol/control/zoomslidercontrol.js b/src/ol/control/zoomslidercontrol.js index c2cf84481e..d10b8d2825 100644 --- a/src/ol/control/zoomslidercontrol.js +++ b/src/ol/control/zoomslidercontrol.js @@ -38,7 +38,7 @@ ol.control.ZOOMSLIDER_ANIMATION_DURATION = 200; * @constructor * @extends {ol.control.Control} * @param {olx.control.ZoomSliderOptions=} opt_options Zoom slider options. - * @todo stability experimental + * @todo api */ ol.control.ZoomSlider = function(opt_options) { diff --git a/src/ol/control/zoomtoextentcontrol.exports b/src/ol/control/zoomtoextentcontrol.exports deleted file mode 100644 index 485e551f42..0000000000 --- a/src/ol/control/zoomtoextentcontrol.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.control.ZoomToExtent diff --git a/src/ol/control/zoomtoextentcontrol.js b/src/ol/control/zoomtoextentcontrol.js index 404a2efdf7..d87a050d7b 100644 --- a/src/ol/control/zoomtoextentcontrol.js +++ b/src/ol/control/zoomtoextentcontrol.js @@ -20,7 +20,7 @@ goog.require('ol.pointer.PointerEventHandler'); * @constructor * @extends {ol.control.Control} * @param {olx.control.ZoomToExtentOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.control.ZoomToExtent = function(opt_options) { var options = goog.isDef(opt_options) ? opt_options : {}; diff --git a/src/ol/coordinate.exports b/src/ol/coordinate.exports deleted file mode 100644 index e4536ab28f..0000000000 --- a/src/ol/coordinate.exports +++ /dev/null @@ -1,7 +0,0 @@ -@exportSymbol ol.coordinate.add -@exportSymbol ol.coordinate.createStringXY -@exportSymbol ol.coordinate.format -@exportSymbol ol.coordinate.fromProjectedArray -@exportSymbol ol.coordinate.rotate -@exportSymbol ol.coordinate.toStringHDMS -@exportSymbol ol.coordinate.toStringXY diff --git a/src/ol/coordinate.js b/src/ol/coordinate.js index c34247c41f..bcddadc1fb 100644 --- a/src/ol/coordinate.js +++ b/src/ol/coordinate.js @@ -11,7 +11,7 @@ goog.require('goog.math'); * `{string}`. * * @typedef {function((ol.Coordinate|undefined)): string} - * @todo stability experimental + * @todo api */ ol.CoordinateFormatType; @@ -19,7 +19,7 @@ ol.CoordinateFormatType; /** * An array of numbers representing a coordinate. * @typedef {Array.} ol.Coordinate - * @todo stability experimental + * @todo api */ ol.Coordinate; @@ -27,7 +27,7 @@ ol.Coordinate; /** * An array of coordinate arrays. * @typedef {Array.} - * @todo stability experimental + * @todo api */ ol.CoordinateArray; @@ -36,6 +36,7 @@ ol.CoordinateArray; * @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Coordinate} delta Delta. * @return {ol.Coordinate} Coordinate. + * @todo api */ ol.coordinate.add = function(coordinate, delta) { coordinate[0] += delta[0]; @@ -87,7 +88,7 @@ ol.coordinate.closestOnSegment = function(coordinate, segment) { * @param {number=} opt_fractionDigits The number of digits to include * after the decimal point. Default is `0`. * @return {ol.CoordinateFormatType} Coordinate format. - * @todo stability experimental + * @todo api */ ol.coordinate.createStringXY = function(opt_fractionDigits) { return ( @@ -124,7 +125,7 @@ ol.coordinate.degreesToStringHDMS_ = function(degrees, hemispheres) { * @param {number=} opt_fractionDigits The number of digits to include * after the decimal point. Default is `0`. * @return {string} Formated coordinate. - * @todo stability experimental + * @todo api */ ol.coordinate.format = function(coordinate, template, opt_fractionDigits) { if (goog.isDef(coordinate)) { @@ -158,6 +159,7 @@ ol.coordinate.equals = function(coordinate1, coordinate2) { * @param {ol.Coordinate} coordinate Coordinate. * @param {number} angle Angle. * @return {ol.Coordinate} Coordinate. + * @todo api */ ol.coordinate.rotate = function(coordinate, angle) { var cosAngle = Math.cos(angle); @@ -222,7 +224,7 @@ ol.coordinate.squaredDistanceToSegment = function(coordinate, segment) { /** * @param {ol.Coordinate|undefined} coordinate Coordinate. * @return {string} Hemisphere, degrees, minutes and seconds. - * @todo stability experimental + * @todo api */ ol.coordinate.toStringHDMS = function(coordinate) { if (goog.isDef(coordinate)) { @@ -239,7 +241,7 @@ ol.coordinate.toStringHDMS = function(coordinate) { * @param {number=} opt_fractionDigits The number of digits to include * after the decimal point. Default is `0`. * @return {string} XY. - * @todo stability experimental + * @todo api */ ol.coordinate.toStringXY = function(coordinate, opt_fractionDigits) { return ol.coordinate.format(coordinate, '{x}, {y}', opt_fractionDigits); @@ -251,7 +253,7 @@ ol.coordinate.toStringXY = function(coordinate, opt_fractionDigits) { * @param {Array} array The array with coordinates. * @param {string} axis the axis info. * @return {ol.Coordinate} The coordinate created. - * @todo stability experimental + * @todo api */ ol.coordinate.fromProjectedArray = function(array, axis) { var firstAxis = axis.charAt(0); diff --git a/src/ol/deviceorientation.exports b/src/ol/deviceorientation.exports deleted file mode 100644 index 4496aa24b9..0000000000 --- a/src/ol/deviceorientation.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.DeviceOrientation diff --git a/src/ol/deviceorientation.js b/src/ol/deviceorientation.js index 58bc29ef58..33915b7ac1 100644 --- a/src/ol/deviceorientation.js +++ b/src/ol/deviceorientation.js @@ -69,7 +69,6 @@ ol.DeviceOrientationProperty = { * @constructor * @extends {ol.Object} * @param {olx.DeviceOrientationOptions=} opt_options Options. - * @todo stability experimental * @todo observable alpha {number} readonly the euler angle in radians of the * device from the standard X axis * @todo observable beta {number} readonly the euler angle in radians of the @@ -80,6 +79,7 @@ ol.DeviceOrientationProperty = { * device from the planar Y axis * @todo observable tracking {boolean} the status of tracking changes to alpha, * beta and gamma. If true, changes are tracked and reported immediately. + * @todo api */ ol.DeviceOrientation = function(opt_options) { @@ -147,7 +147,7 @@ ol.DeviceOrientation.prototype.orientationChange_ = function(browserEvent) { /** * @return {number|undefined} The alpha value of the DeviceOrientation, * in radians. - * @todo stability experimental + * @todo api */ ol.DeviceOrientation.prototype.getAlpha = function() { return /** @type {number|undefined} */ ( @@ -162,7 +162,7 @@ goog.exportProperty( /** * @return {number|undefined} The beta value of the DeviceOrientation, * in radians. - * @todo stability experimental + * @todo api */ ol.DeviceOrientation.prototype.getBeta = function() { return /** @type {number|undefined} */ ( @@ -177,7 +177,7 @@ goog.exportProperty( /** * @return {number|undefined} The gamma value of the DeviceOrientation, * in radians. - * @todo stability experimental + * @todo api */ ol.DeviceOrientation.prototype.getGamma = function() { return /** @type {number|undefined} */ ( @@ -192,7 +192,7 @@ goog.exportProperty( /** * @return {number|undefined} The heading of the device relative to * north, in radians, normalizing for different browser behavior. - * @todo stability experimental + * @todo api */ ol.DeviceOrientation.prototype.getHeading = function() { return /** @type {number|undefined} */ ( @@ -207,7 +207,7 @@ goog.exportProperty( /** * Are we tracking the device's orientation? * @return {boolean} The current tracking state, true if tracking is on. - * @todo stability experimental + * @todo api */ ol.DeviceOrientation.prototype.getTracking = function() { return /** @type {boolean} */ ( @@ -239,7 +239,7 @@ ol.DeviceOrientation.prototype.handleTrackingChanged_ = function() { /** * Enable or disable tracking of DeviceOrientation events. * @param {boolean} tracking True to enable and false to disable tracking. - * @todo stability experimental + * @todo api */ ol.DeviceOrientation.prototype.setTracking = function(tracking) { this.set(ol.DeviceOrientationProperty.TRACKING, tracking); diff --git a/src/ol/dom/input.exports b/src/ol/dom/input.exports deleted file mode 100644 index 0b6e668625..0000000000 --- a/src/ol/dom/input.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.dom.Input diff --git a/src/ol/dom/input.js b/src/ol/dom/input.js index 45ab97ff5b..07c8483f6f 100644 --- a/src/ol/dom/input.js +++ b/src/ol/dom/input.js @@ -29,9 +29,9 @@ ol.dom.InputProperty = { * @constructor * @extends {ol.Object} * @param {Element} target Target element. - * @todo stability experimental * @todo observable value {string} the value of the Input * @todo observable checked {boolean} the checked state of the Input + * @todo api */ ol.dom.Input = function(target) { goog.base(this); @@ -59,7 +59,7 @@ goog.inherits(ol.dom.Input, ol.Object); /** * If the input is a checkbox, return whether or not the checbox is checked. * @return {boolean|undefined} checked. - * @todo stability experimental + * @todo api */ ol.dom.Input.prototype.getChecked = function() { return /** @type {boolean} */ (this.get(ol.dom.InputProperty.CHECKED)); @@ -73,7 +73,7 @@ goog.exportProperty( /** * Get the value of the input. * @return {string|undefined} input value. - * @todo stability experimental + * @todo api */ ol.dom.Input.prototype.getValue = function() { return /** @type {string} */ (this.get(ol.dom.InputProperty.VALUE)); @@ -87,7 +87,7 @@ goog.exportProperty( /** * Sets the value of the input. * @param {string} value Value. - * @todo stability experimental + * @todo api */ ol.dom.Input.prototype.setValue = function(value) { this.set(ol.dom.InputProperty.VALUE, value); @@ -101,7 +101,7 @@ goog.exportProperty( /** * Set whether or not a checkbox is checked. * @param {boolean} checked Checked. - * @todo stability experimental + * @todo api */ ol.dom.Input.prototype.setChecked = function(checked) { this.set(ol.dom.InputProperty.CHECKED, checked); diff --git a/src/ol/easing.exports b/src/ol/easing.exports deleted file mode 100644 index d8653acfe3..0000000000 --- a/src/ol/easing.exports +++ /dev/null @@ -1,7 +0,0 @@ -@exportSymbol ol.easing.bounce -@exportSymbol ol.easing.easeIn -@exportSymbol ol.easing.easeOut -@exportSymbol ol.easing.elastic -@exportSymbol ol.easing.inAndOut -@exportSymbol ol.easing.linear -@exportSymbol ol.easing.upAndDown diff --git a/src/ol/easing.js b/src/ol/easing.js index 9e829f3a93..179f948805 100644 --- a/src/ol/easing.js +++ b/src/ol/easing.js @@ -7,6 +7,7 @@ goog.require('goog.fx.easing'); * from https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael.js * @param {number} t Input between 0 and 1. * @return {number} Output between 0 and 1. + * @todo api */ ol.easing.bounce = function(t) { var s = 7.5625, p = 2.75, l; @@ -33,6 +34,7 @@ ol.easing.bounce = function(t) { /** * @param {number} t Input between 0 and 1. * @return {number} Output between 0 and 1. + * @todo api */ ol.easing.easeIn = goog.fx.easing.easeIn; @@ -40,6 +42,7 @@ ol.easing.easeIn = goog.fx.easing.easeIn; /** * @param {number} t Input between 0 and 1. * @return {number} Output between 0 and 1. + * @todo api */ ol.easing.easeOut = goog.fx.easing.easeOut; @@ -48,6 +51,7 @@ ol.easing.easeOut = goog.fx.easing.easeOut; * from https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael.js * @param {number} t Input between 0 and 1. * @return {number} Output between 0 and 1. + * @todo api */ ol.easing.elastic = function(t) { return Math.pow(2, -10 * t) * Math.sin((t - 0.075) * (2 * Math.PI) / 0.3) + 1; @@ -57,6 +61,7 @@ ol.easing.elastic = function(t) { /** * @param {number} t Input between 0 and 1. * @return {number} Output between 0 and 1. + * @todo api */ ol.easing.inAndOut = goog.fx.easing.inAndOut; @@ -64,6 +69,7 @@ ol.easing.inAndOut = goog.fx.easing.inAndOut; /** * @param {number} t Input between 0 and 1. * @return {number} Output between 0 and 1. + * @todo api */ ol.easing.linear = function(t) { return t; @@ -73,6 +79,7 @@ ol.easing.linear = function(t) { /** * @param {number} t Input between 0 and 1. * @return {number} Output between 0 and 1. + * @todo api */ ol.easing.upAndDown = function(t) { if (t < 0.5) { diff --git a/src/ol/events/condition.exports b/src/ol/events/condition.exports deleted file mode 100644 index 500c747bb9..0000000000 --- a/src/ol/events/condition.exports +++ /dev/null @@ -1,8 +0,0 @@ -@exportSymbol ol.events.condition.altKeyOnly -@exportSymbol ol.events.condition.altShiftKeysOnly -@exportSymbol ol.events.condition.always -@exportSymbol ol.events.condition.never -@exportSymbol ol.events.condition.noModifierKeys -@exportSymbol ol.events.condition.platformModifierKeyOnly -@exportSymbol ol.events.condition.shiftKeyOnly -@exportSymbol ol.events.condition.targetNotEditable diff --git a/src/ol/events/condition.js b/src/ol/events/condition.js index 285298b486..8a77526919 100644 --- a/src/ol/events/condition.js +++ b/src/ol/events/condition.js @@ -13,7 +13,7 @@ goog.require('ol.MapBrowserPointerEvent'); * `{boolean}`. If the condition is met, true should be returned. * * @typedef {function(ol.MapBrowserEvent): boolean} - * @todo stability experimental + * @todo api */ ol.events.ConditionType; @@ -21,7 +21,7 @@ ol.events.ConditionType; /** * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} True if only the alt key is pressed. - * @todo stability experimental + * @todo api */ ol.events.condition.altKeyOnly = function(mapBrowserEvent) { var browserEvent = mapBrowserEvent.browserEvent; @@ -35,7 +35,7 @@ ol.events.condition.altKeyOnly = function(mapBrowserEvent) { /** * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} True if only the alt and shift keys are pressed. - * @todo stability experimental + * @todo api */ ol.events.condition.altShiftKeysOnly = function(mapBrowserEvent) { var browserEvent = mapBrowserEvent.browserEvent; @@ -50,7 +50,7 @@ ol.events.condition.altShiftKeysOnly = function(mapBrowserEvent) { * Always true. * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} True. - * @todo stability experimental + * @todo api */ ol.events.condition.always = goog.functions.TRUE; @@ -59,7 +59,7 @@ ol.events.condition.always = goog.functions.TRUE; * Always false. * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} False. - * @todo stability experimental + * @todo api */ ol.events.condition.never = goog.functions.FALSE; @@ -67,7 +67,6 @@ ol.events.condition.never = goog.functions.FALSE; /** * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} True if the event is a `singleclick` event. - * @todo stability experimental */ ol.events.condition.singleClick = function(mapBrowserEvent) { return mapBrowserEvent.type == ol.MapBrowserEvent.EventType.SINGLECLICK; @@ -77,7 +76,7 @@ ol.events.condition.singleClick = function(mapBrowserEvent) { /** * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} True only if there no modifier keys are pressed. - * @todo stability experimental + * @todo api */ ol.events.condition.noModifierKeys = function(mapBrowserEvent) { var browserEvent = mapBrowserEvent.browserEvent; @@ -91,7 +90,7 @@ ol.events.condition.noModifierKeys = function(mapBrowserEvent) { /** * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} True if only the platform modifier key is pressed. - * @todo stability experimental + * @todo api */ ol.events.condition.platformModifierKeyOnly = function(mapBrowserEvent) { var browserEvent = mapBrowserEvent.browserEvent; @@ -105,7 +104,7 @@ ol.events.condition.platformModifierKeyOnly = function(mapBrowserEvent) { /** * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} True if only the shift key is pressed. - * @todo stability experimental + * @todo api */ ol.events.condition.shiftKeyOnly = function(mapBrowserEvent) { var browserEvent = mapBrowserEvent.browserEvent; @@ -119,7 +118,7 @@ ol.events.condition.shiftKeyOnly = function(mapBrowserEvent) { /** * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} True only if the target element is not editable. - * @todo stability experimental + * @todo api */ ol.events.condition.targetNotEditable = function(mapBrowserEvent) { var target = mapBrowserEvent.browserEvent.target; @@ -135,7 +134,6 @@ ol.events.condition.targetNotEditable = function(mapBrowserEvent) { /** * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event. * @return {boolean} True if the event originates from a mouse device. - * @todo stability experimental */ ol.events.condition.mouseOnly = function(mapBrowserEvent) { goog.asserts.assertInstanceof(mapBrowserEvent, ol.MapBrowserPointerEvent); diff --git a/src/ol/extent.exports b/src/ol/extent.exports deleted file mode 100644 index 387a75529f..0000000000 --- a/src/ol/extent.exports +++ /dev/null @@ -1,18 +0,0 @@ -@exportSymbol ol.extent.boundingExtent -@exportSymbol ol.extent.buffer -@exportSymbol ol.extent.containsCoordinate -@exportSymbol ol.extent.containsExtent -@exportSymbol ol.extent.createEmpty -@exportSymbol ol.extent.equals -@exportSymbol ol.extent.extend -@exportSymbol ol.extent.getBottomLeft -@exportSymbol ol.extent.getBottomRight -@exportSymbol ol.extent.getCenter -@exportSymbol ol.extent.getHeight -@exportSymbol ol.extent.getSize -@exportSymbol ol.extent.getTopLeft -@exportSymbol ol.extent.getTopRight -@exportSymbol ol.extent.getWidth -@exportSymbol ol.extent.intersects -@exportSymbol ol.extent.isEmpty -@exportSymbol ol.extent.transform diff --git a/src/ol/extent.js b/src/ol/extent.js index 10f36db01d..3e85f5a04e 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -12,7 +12,7 @@ goog.require('ol.TransformFunction'); /** * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`. * @typedef {Array.} - * @todo stability experimental + * @todo api */ ol.Extent; @@ -36,7 +36,7 @@ ol.extent.Relationship = { * * @param {Array.} coordinates Coordinates. * @return {ol.Extent} Bounding extent. - * @todo stability experimental + * @todo api */ ol.extent.boundingExtent = function(coordinates) { var extent = ol.extent.createEmpty(); @@ -53,7 +53,6 @@ ol.extent.boundingExtent = function(coordinates) { * @param {ol.Extent=} opt_extent Destination extent. * @private * @return {ol.Extent} Extent. - * @todo stability experimental */ ol.extent.boundingExtentXYs_ = function(xs, ys, opt_extent) { goog.asserts.assert(xs.length > 0); @@ -72,6 +71,7 @@ ol.extent.boundingExtentXYs_ = function(xs, ys, opt_extent) { * @param {number} value The amount by wich the extent should be buffered. * @param {ol.Extent=} opt_extent Extent. * @return {ol.Extent} Extent. + * @todo api */ ol.extent.buffer = function(extent, value, opt_extent) { if (goog.isDef(opt_extent)) { @@ -97,7 +97,6 @@ ol.extent.buffer = function(extent, value, opt_extent) { * @param {ol.Extent} extent Extent to clone. * @param {ol.Extent=} opt_extent Extent. * @return {ol.Extent} The clone. - * @todo stability experimental */ ol.extent.clone = function(extent, opt_extent) { if (goog.isDef(opt_extent)) { @@ -144,7 +143,7 @@ ol.extent.closestSquaredDistanceXY = function(extent, x, y) { * @param {ol.Extent} extent Extent. * @param {ol.Coordinate} coordinate Coordinate. * @return {boolean} Contains. - * @todo stability experimental + * @todo api */ ol.extent.containsCoordinate = function(extent, coordinate) { return extent[0] <= coordinate[0] && coordinate[0] <= extent[2] && @@ -158,7 +157,7 @@ ol.extent.containsCoordinate = function(extent, coordinate) { * @param {ol.Extent} extent1 Extent 1. * @param {ol.Extent} extent2 Extent 2. * @return {boolean} Contains. - * @todo stability experimental + * @todo api */ ol.extent.containsExtent = function(extent1, extent2) { return extent1[0] <= extent2[0] && extent2[2] <= extent1[2] && @@ -200,7 +199,7 @@ ol.extent.coordinateRelationship = function(extent, coordinate) { /** * @return {ol.Extent} Empty extent. - * @todo stability experimental + * @todo api */ ol.extent.createEmpty = function() { return [Infinity, Infinity, -Infinity, -Infinity]; @@ -214,7 +213,6 @@ ol.extent.createEmpty = function() { * @param {number} maxY Maximum Y. * @param {ol.Extent=} opt_extent Destination extent. * @return {ol.Extent} Extent. - * @todo stability experimental */ ol.extent.createOrUpdate = function(minX, minY, maxX, maxY, opt_extent) { if (goog.isDef(opt_extent)) { @@ -293,7 +291,6 @@ ol.extent.createOrUpdateFromRings = function(rings, opt_extent) { * Empties extent in place. * @param {ol.Extent} extent Extent. * @return {ol.Extent} Extent. - * @todo stability experimental */ ol.extent.empty = function(extent) { extent[0] = extent[1] = Infinity; @@ -306,7 +303,7 @@ ol.extent.empty = function(extent) { * @param {ol.Extent} extent1 Extent 1. * @param {ol.Extent} extent2 Extent 2. * @return {boolean} Equals. - * @todo stability experimental + * @todo api */ ol.extent.equals = function(extent1, extent2) { return extent1[0] == extent2[0] && extent1[2] == extent2[2] && @@ -318,7 +315,7 @@ ol.extent.equals = function(extent1, extent2) { * @param {ol.Extent} extent1 Extent 1. * @param {ol.Extent} extent2 Extent 2. * @return {ol.Extent} Extent. - * @todo stability experimental + * @todo api */ ol.extent.extend = function(extent1, extent2) { if (extent2[0] < extent1[0]) { @@ -340,7 +337,6 @@ ol.extent.extend = function(extent1, extent2) { /** * @param {ol.Extent} extent Extent. * @param {ol.Coordinate} coordinate Coordinate. - * @todo stability experimental */ ol.extent.extendCoordinate = function(extent, coordinate) { if (coordinate[0] < extent[0]) { @@ -429,7 +425,7 @@ ol.extent.getArea = function(extent) { /** * @param {ol.Extent} extent Extent. * @return {ol.Coordinate} Bottom left coordinate. - * @todo stability experimental + * @todo api */ ol.extent.getBottomLeft = function(extent) { return [extent[0], extent[1]]; @@ -439,7 +435,7 @@ ol.extent.getBottomLeft = function(extent) { /** * @param {ol.Extent} extent Extent. * @return {ol.Coordinate} Bottom right coordinate. - * @todo stability experimental + * @todo api */ ol.extent.getBottomRight = function(extent) { return [extent[2], extent[1]]; @@ -449,7 +445,7 @@ ol.extent.getBottomRight = function(extent) { /** * @param {ol.Extent} extent Extent. * @return {ol.Coordinate} Center. - * @todo stability experimental + * @todo api */ ol.extent.getCenter = function(extent) { return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2]; @@ -477,7 +473,6 @@ ol.extent.getEnlargedArea = function(extent1, extent2) { * @param {ol.Size} size Size. * @param {ol.Extent=} opt_extent Destination extent. * @return {ol.Extent} Extent. - * @todo stability experimental */ ol.extent.getForView2DAndSize = function(center, resolution, rotation, size, opt_extent) { @@ -503,7 +498,7 @@ ol.extent.getForView2DAndSize = /** * @param {ol.Extent} extent Extent. * @return {number} Height. - * @todo stability experimental + * @todo api */ ol.extent.getHeight = function(extent) { return extent[3] - extent[1]; @@ -536,7 +531,7 @@ ol.extent.getMargin = function(extent) { /** * @param {ol.Extent} extent Extent. * @return {ol.Size} Size. - * @todo stability experimental + * @todo api */ ol.extent.getSize = function(extent) { return [extent[2] - extent[0], extent[3] - extent[1]]; @@ -546,7 +541,7 @@ ol.extent.getSize = function(extent) { /** * @param {ol.Extent} extent Extent. * @return {ol.Coordinate} Top left coordinate. - * @todo stability experimental + * @todo api */ ol.extent.getTopLeft = function(extent) { return [extent[0], extent[3]]; @@ -556,7 +551,7 @@ ol.extent.getTopLeft = function(extent) { /** * @param {ol.Extent} extent Extent. * @return {ol.Coordinate} Top right coordinate. - * @todo stability experimental + * @todo api */ ol.extent.getTopRight = function(extent) { return [extent[2], extent[3]]; @@ -566,7 +561,7 @@ ol.extent.getTopRight = function(extent) { /** * @param {ol.Extent} extent Extent. * @return {number} Width. - * @todo stability experimental + * @todo api */ ol.extent.getWidth = function(extent) { return extent[2] - extent[0]; @@ -577,7 +572,7 @@ ol.extent.getWidth = function(extent) { * @param {ol.Extent} extent1 Extent 1. * @param {ol.Extent} extent2 Extent. * @return {boolean} Intersects. - * @todo stability experimental + * @todo api */ ol.extent.intersects = function(extent1, extent2) { return extent1[0] <= extent2[2] && @@ -590,7 +585,7 @@ ol.extent.intersects = function(extent1, extent2) { /** * @param {ol.Extent} extent Extent. * @return {boolean} Is empty. - * @todo stability experimental + * @todo api */ ol.extent.isEmpty = function(extent) { return extent[2] < extent[0] || extent[3] < extent[1]; @@ -600,7 +595,6 @@ ol.extent.isEmpty = function(extent) { /** * @param {ol.Extent} extent Extent. * @return {boolean} Is infinite. - * @todo stability experimental */ ol.extent.isInfinite = function(extent) { return extent[0] == -Infinity || extent[1] == -Infinity || @@ -612,7 +606,6 @@ ol.extent.isInfinite = function(extent) { * @param {ol.Extent} extent Extent. * @param {ol.Coordinate} coordinate Coordinate. * @return {ol.Coordinate} Coordinate. - * @todo stability experimental */ ol.extent.normalize = function(extent, coordinate) { return [ @@ -643,7 +636,6 @@ ol.extent.returnOrUpdate = function(extent, opt_extent) { /** * @param {ol.Extent} extent Extent. * @param {number} value Value. - * @todo stability experimental */ ol.extent.scaleFromCenter = function(extent, value) { var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1); @@ -712,7 +704,6 @@ ol.extent.segmentIntersects = function(extent, start, end) { * @param {ol.Extent} extent1 Extent 1. * @param {ol.Extent} extent2 Extent 2. * @return {boolean} Touches. - * @todo stability experimental */ ol.extent.touches = function(extent1, extent2) { var intersects = ol.extent.intersects(extent1, extent2); @@ -727,7 +718,7 @@ ol.extent.touches = function(extent1, extent2) { * @param {ol.TransformFunction} transformFn Transform function. * @param {ol.Extent=} opt_extent Destination extent. * @return {ol.Extent} Extent. - * @todo stability experimental + * @todo api */ ol.extent.transform = function(extent, transformFn, opt_extent) { var coordinates = [ diff --git a/src/ol/feature.exports b/src/ol/feature.exports deleted file mode 100644 index 6c1f200ea6..0000000000 --- a/src/ol/feature.exports +++ /dev/null @@ -1,8 +0,0 @@ -@exportSymbol ol.Feature -@exportProperty ol.Feature.prototype.getGeometryName -@exportProperty ol.Feature.prototype.getId -@exportProperty ol.Feature.prototype.getStyle -@exportProperty ol.Feature.prototype.getStyleFunction -@exportProperty ol.Feature.prototype.setGeometryName -@exportProperty ol.Feature.prototype.setId -@exportProperty ol.Feature.prototype.setStyle diff --git a/src/ol/feature.js b/src/ol/feature.js index 79354c03a6..10d5f87b9d 100644 --- a/src/ol/feature.js +++ b/src/ol/feature.js @@ -20,7 +20,7 @@ goog.require('ol.style.Style'); * @extends {ol.Object} * @param {ol.geom.Geometry|Object.=} opt_geometryOrValues * Values or geometry. - * @todo stability experimental + * @todo api */ ol.Feature = function(opt_geometryOrValues) { @@ -80,7 +80,7 @@ goog.inherits(ol.Feature, ol.Object); /** * @return {ol.geom.Geometry|undefined} Geometry. - * @todo stability experimental + * @todo api */ ol.Feature.prototype.getGeometry = function() { return /** @type {ol.geom.Geometry|undefined} */ ( @@ -94,7 +94,7 @@ goog.exportProperty( /** * @return {number|string|undefined} Id. - * @todo stability experimental + * @todo api */ ol.Feature.prototype.getId = function() { return this.id_; @@ -103,7 +103,7 @@ ol.Feature.prototype.getId = function() { /** * @return {string} Geometry property name. - * @todo stability experimental + * @todo api */ ol.Feature.prototype.getGeometryName = function() { return this.geometryName_; @@ -113,7 +113,7 @@ ol.Feature.prototype.getGeometryName = function() { /** * @return {ol.style.Style|Array.| * ol.feature.FeatureStyleFunction} User provided style. - * @todo stability experimental + * @todo api */ ol.Feature.prototype.getStyle = function() { return this.style_; @@ -122,7 +122,7 @@ ol.Feature.prototype.getStyle = function() { /** * @return {ol.feature.FeatureStyleFunction|undefined} Style function. - * @todo stability experimental + * @todo api */ ol.Feature.prototype.getStyleFunction = function() { return this.styleFunction_; @@ -156,7 +156,7 @@ ol.Feature.prototype.handleGeometryChanged_ = function() { /** * @param {ol.geom.Geometry|undefined} geometry Geometry. - * @todo stability experimental + * @todo api */ ol.Feature.prototype.setGeometry = function(geometry) { this.set(this.geometryName_, geometry); @@ -170,7 +170,7 @@ goog.exportProperty( /** * @param {ol.style.Style|Array.| * ol.feature.FeatureStyleFunction} style Feature style. - * @todo stability experimental + * @todo api */ ol.Feature.prototype.setStyle = function(style) { this.style_ = style; @@ -181,7 +181,7 @@ ol.Feature.prototype.setStyle = function(style) { /** * @param {number|string|undefined} id Id. - * @todo stability experimental + * @todo api */ ol.Feature.prototype.setId = function(id) { this.id_ = id; @@ -190,7 +190,7 @@ ol.Feature.prototype.setId = function(id) { /** * @param {string} name Geometry property name. - * @todo stability experimental + * @todo api */ ol.Feature.prototype.setGeometryName = function(name) { goog.events.unlisten( @@ -211,7 +211,7 @@ ol.Feature.prototype.setGeometryName = function(name) { * {@link ol.Feature} to be styled. * * @typedef {function(this: ol.Feature, number): Array.} - * @todo stability experimental + * @todo api */ ol.feature.FeatureStyleFunction; @@ -221,7 +221,6 @@ ol.feature.FeatureStyleFunction; * @param {number} resolution Resolution. * @return {Array.} Style. * @this {ol.Feature} - * @todo stability experimental */ ol.feature.defaultFeatureStyleFunction = function(resolution) { var fill = new ol.style.Fill({ @@ -261,7 +260,7 @@ ol.feature.defaultFeatureStyleFunction = function(resolution) { * {@link ol.style.Style}. This way e.g. a vector layer can be styled. * * @typedef {function(ol.Feature, number): Array.} - * @todo stability experimental + * @todo api */ ol.feature.StyleFunction; @@ -270,7 +269,6 @@ ol.feature.StyleFunction; * @param {ol.Feature} feature Feature. * @param {number} resolution Resolution. * @return {Array.} Style. - * @todo stability experimental */ ol.feature.defaultStyleFunction = function(feature, resolution) { var featureStyleFunction = feature.getStyleFunction(); @@ -351,7 +349,6 @@ ol.feature.createStyleFunction = function(obj) { /** * Default styles for editing features. * @return {Object.>} Styles - * @todo stability experimental */ ol.feature.createDefaultEditingStyles = function() { /** @type {Object.>} */ diff --git a/src/ol/featureoverlay.exports b/src/ol/featureoverlay.exports deleted file mode 100644 index b471a281f6..0000000000 --- a/src/ol/featureoverlay.exports +++ /dev/null @@ -1,9 +0,0 @@ -@exportSymbol ol.FeatureOverlay -@exportProperty ol.FeatureOverlay.prototype.addFeature -@exportProperty ol.FeatureOverlay.prototype.getFeatures -@exportProperty ol.FeatureOverlay.prototype.getStyle -@exportProperty ol.FeatureOverlay.prototype.getStyleFunction -@exportProperty ol.FeatureOverlay.prototype.removeFeature -@exportProperty ol.FeatureOverlay.prototype.setFeatures -@exportProperty ol.FeatureOverlay.prototype.setMap -@exportProperty ol.FeatureOverlay.prototype.setStyle diff --git a/src/ol/featureoverlay.js b/src/ol/featureoverlay.js index 08fbcacf52..5c45f45c78 100644 --- a/src/ol/featureoverlay.js +++ b/src/ol/featureoverlay.js @@ -16,7 +16,7 @@ goog.require('ol.render.EventType'); /** * @constructor * @param {olx.FeatureOverlayOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.FeatureOverlay = function(opt_options) { @@ -85,7 +85,7 @@ ol.FeatureOverlay = function(opt_options) { /** * @param {ol.Feature} feature Feature. - * @todo stability experimental + * @todo api */ ol.FeatureOverlay.prototype.addFeature = function(feature) { this.features_.push(feature); @@ -94,7 +94,7 @@ ol.FeatureOverlay.prototype.addFeature = function(feature) { /** * @return {ol.Collection} Features collection. - * @todo stability experimental + * @todo api */ ol.FeatureOverlay.prototype.getFeatures = function() { return this.features_; @@ -167,7 +167,7 @@ ol.FeatureOverlay.prototype.handleMapPostCompose_ = function(event) { /** * @param {ol.Feature} feature Feature. - * @todo stability experimental + * @todo api */ ol.FeatureOverlay.prototype.removeFeature = function(feature) { this.features_.remove(feature); @@ -186,7 +186,7 @@ ol.FeatureOverlay.prototype.render_ = function() { /** * @param {ol.Collection} features Features collection. - * @todo stability experimental + * @todo api */ ol.FeatureOverlay.prototype.setFeatures = function(features) { if (!goog.isNull(this.featuresListenerKeys_)) { @@ -220,7 +220,7 @@ ol.FeatureOverlay.prototype.setFeatures = function(features) { /** * @param {ol.Map} map Map. - * @todo stability experimental + * @todo api */ ol.FeatureOverlay.prototype.setMap = function(map) { if (!goog.isNull(this.postComposeListenerKey_)) { @@ -244,7 +244,7 @@ ol.FeatureOverlay.prototype.setMap = function(map) { * an array of styles. * @param {ol.style.Style|Array.|ol.feature.StyleFunction} style * Overlay style. - * @todo stability experimental + * @todo api */ ol.FeatureOverlay.prototype.setStyle = function(style) { this.style_ = style; @@ -258,6 +258,7 @@ ol.FeatureOverlay.prototype.setStyle = function(style) { * option at construction or to the `setStyle` method. * @return {ol.style.Style|Array.|ol.feature.StyleFunction} * Overlay style. + * @todo api */ ol.FeatureOverlay.prototype.getStyle = function() { return this.style_; @@ -267,6 +268,7 @@ ol.FeatureOverlay.prototype.getStyle = function() { /** * Get the style function. * @return {ol.feature.StyleFunction|undefined} Style function. + * @todo api */ ol.FeatureOverlay.prototype.getStyleFunction = function() { return this.styleFunction_; diff --git a/src/ol/format/geojsonformat.exports b/src/ol/format/geojsonformat.exports deleted file mode 100644 index 620f1bfad7..0000000000 --- a/src/ol/format/geojsonformat.exports +++ /dev/null @@ -1,8 +0,0 @@ -@exportSymbol ol.format.GeoJSON -@exportProperty ol.format.GeoJSON.prototype.readFeature -@exportProperty ol.format.GeoJSON.prototype.readFeatures -@exportProperty ol.format.GeoJSON.prototype.readGeometry -@exportProperty ol.format.GeoJSON.prototype.readProjection -@exportProperty ol.format.GeoJSON.prototype.writeFeature -@exportProperty ol.format.GeoJSON.prototype.writeFeatures -@exportProperty ol.format.GeoJSON.prototype.writeGeometry diff --git a/src/ol/format/geojsonformat.js b/src/ol/format/geojsonformat.js index a9e53bc413..66ca9075cb 100644 --- a/src/ol/format/geojsonformat.js +++ b/src/ol/format/geojsonformat.js @@ -26,7 +26,7 @@ goog.require('ol.proj'); * @constructor * @extends {ol.format.JSONFeature} * @param {olx.format.GeoJSONOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.format.GeoJSON = function(opt_options) { @@ -322,6 +322,7 @@ ol.format.GeoJSON.prototype.getExtensions = function() { * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.Feature} Feature. + * @todo api */ ol.format.GeoJSON.prototype.readFeature; @@ -333,6 +334,7 @@ ol.format.GeoJSON.prototype.readFeature; * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {Array.} Features. + * @todo api */ ol.format.GeoJSON.prototype.readFeatures; @@ -386,6 +388,7 @@ ol.format.GeoJSON.prototype.readFeaturesFromObject = function(object) { * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.geom.Geometry} Geometry. + * @todo api */ ol.format.GeoJSON.prototype.readGeometry; @@ -404,6 +407,7 @@ ol.format.GeoJSON.prototype.readGeometryFromObject = function(object) { * * @param {ArrayBuffer|Document|Node|Object|string} object Source. * @return {ol.proj.Projection} Projection. + * @todo api */ ol.format.GeoJSON.prototype.readProjection = function(object) { var geoJSONObject = /** @type {GeoJSONObject} */ (object); @@ -433,6 +437,7 @@ ol.format.GeoJSON.prototype.readProjection = function(object) { * @function * @param {ol.Feature} feature Feature. * @return {ArrayBuffer|Node|Object|string} Result. + * @todo api */ ol.format.GeoJSON.prototype.writeFeature; @@ -468,6 +473,7 @@ ol.format.GeoJSON.prototype.writeFeatureObject = function(feature) { * @function * @param {Array.} features Features. * @return {ArrayBuffer|Node|Object|string} Result. + * @todo api */ ol.format.GeoJSON.prototype.writeFeatures; diff --git a/src/ol/format/gmlformat.js b/src/ol/format/gmlformat.js index 61d008f387..ab7332d13f 100644 --- a/src/ol/format/gmlformat.js +++ b/src/ol/format/gmlformat.js @@ -29,7 +29,6 @@ goog.require('ol.xml'); * @param {olx.format.GMLOptions=} opt_options * Optional configuration object. * @extends {ol.format.XMLFeature} - * @todo stability experimental */ ol.format.GML = function(opt_options) { var options = /** @type {olx.format.GMLOptions} */ diff --git a/src/ol/format/gpxformat.exports b/src/ol/format/gpxformat.exports deleted file mode 100644 index ac072e55dd..0000000000 --- a/src/ol/format/gpxformat.exports +++ /dev/null @@ -1,5 +0,0 @@ -@exportSymbol ol.format.GPX -@exportProperty ol.format.GPX.prototype.readFeature -@exportProperty ol.format.GPX.prototype.readFeatures -@exportProperty ol.format.GPX.prototype.readProjection -@exportProperty ol.format.GPX.prototype.writeFeatures diff --git a/src/ol/format/gpxformat.js b/src/ol/format/gpxformat.js index e99526e163..478d6b9a60 100644 --- a/src/ol/format/gpxformat.js +++ b/src/ol/format/gpxformat.js @@ -19,7 +19,7 @@ goog.require('ol.xml'); /** * @constructor * @extends {ol.format.XMLFeature} - * @todo stability experimental + * @todo api */ ol.format.GPX = function() { goog.base(this); @@ -369,6 +369,7 @@ ol.format.GPX.WPT_PARSERS_ = ol.xml.makeParsersNS( * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.Feature} Feature. + * @todo api */ ol.format.GPX.prototype.readFeature; @@ -399,6 +400,7 @@ ol.format.GPX.prototype.readFeatureFromNode = function(node) { * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {Array.} Features. + * @todo api */ ol.format.GPX.prototype.readFeatures; @@ -430,6 +432,7 @@ ol.format.GPX.prototype.readFeaturesFromNode = function(node) { * * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. + * @todo api */ ol.format.GPX.prototype.readProjection; @@ -791,7 +794,6 @@ ol.format.GPX.GPX_SERIALIZERS_ = ol.xml.makeStructureNS( /** * @constructor * @extends {ol.format.GPX} - * @todo stability experimental */ ol.format.GPX.V1_1 = function() { goog.base(this); @@ -805,6 +807,7 @@ goog.inherits(ol.format.GPX.V1_1, ol.format.GPX); * @function * @param {Array.} features Features. * @return {ArrayBuffer|Node|Object|string} Result. + * @todo api */ ol.format.GPX.prototype.writeFeatures; diff --git a/src/ol/format/igcformat.exports b/src/ol/format/igcformat.exports deleted file mode 100644 index 6a6acf7e15..0000000000 --- a/src/ol/format/igcformat.exports +++ /dev/null @@ -1,4 +0,0 @@ -@exportSymbol ol.format.IGC -@exportProperty ol.format.IGC.prototype.readFeature -@exportProperty ol.format.IGC.prototype.readFeatures -@exportProperty ol.format.IGC.prototype.readProjection diff --git a/src/ol/format/igcformat.js b/src/ol/format/igcformat.js index f73902a934..57d9aa4c62 100644 --- a/src/ol/format/igcformat.js +++ b/src/ol/format/igcformat.js @@ -25,7 +25,7 @@ ol.format.IGCZ = { * @constructor * @extends {ol.format.TextFeature} * @param {olx.format.IGCOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.format.IGC = function(opt_options) { @@ -91,6 +91,7 @@ ol.format.IGC.prototype.getExtensions = function() { * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.Feature} Feature. + * @todo api */ ol.format.IGC.prototype.readFeature; @@ -176,6 +177,7 @@ ol.format.IGC.prototype.readFeatureFromText = function(text) { * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {Array.} Features. + * @todo api */ ol.format.IGC.prototype.readFeatures; @@ -199,6 +201,7 @@ ol.format.IGC.prototype.readFeaturesFromText = function(text) { * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. + * @todo api */ ol.format.IGC.prototype.readProjection; diff --git a/src/ol/format/kmlformat.exports b/src/ol/format/kmlformat.exports deleted file mode 100644 index edafad12f2..0000000000 --- a/src/ol/format/kmlformat.exports +++ /dev/null @@ -1,5 +0,0 @@ -@exportSymbol ol.format.KML -@exportProperty ol.format.KML.prototype.readFeature -@exportProperty ol.format.KML.prototype.readFeatures -@exportProperty ol.format.KML.prototype.readName -@exportProperty ol.format.KML.prototype.readProjection diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index 78b816765f..af9351e789 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -54,7 +54,7 @@ ol.format.KMLGxTrackObject_; * @constructor * @extends {ol.format.XMLFeature} * @param {olx.format.KMLOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.format.KML = function(opt_options) { @@ -1450,6 +1450,7 @@ ol.format.KML.prototype.readSharedStyleMap_ = function(node, objectStack) { * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.Feature} Feature. + * @todo api */ ol.format.KML.prototype.readFeature; @@ -1478,6 +1479,7 @@ ol.format.KML.prototype.readFeatureFromNode = function(node) { * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {Array.} Features. + * @todo api */ ol.format.KML.prototype.readFeatures; @@ -1526,7 +1528,6 @@ ol.format.KML.prototype.readFeaturesFromNode = function(node) { /** * @param {Document|Node|string} source Souce. * @return {string|undefined} Name. - * @todo stability experimental */ ol.format.KML.prototype.readName = function(source) { if (ol.xml.isDocument(source)) { @@ -1596,6 +1597,7 @@ ol.format.KML.prototype.readNameFromNode = function(node) { * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. + * @todo api */ ol.format.KML.prototype.readProjection; diff --git a/src/ol/format/osmxmlformat.exports b/src/ol/format/osmxmlformat.exports deleted file mode 100644 index e9bb1a6835..0000000000 --- a/src/ol/format/osmxmlformat.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.format.OSMXML diff --git a/src/ol/format/osmxmlformat.js b/src/ol/format/osmxmlformat.js index 3b7278a093..987401104e 100644 --- a/src/ol/format/osmxmlformat.js +++ b/src/ol/format/osmxmlformat.js @@ -18,6 +18,7 @@ goog.require('ol.xml'); /** * @constructor * @extends {ol.format.XMLFeature} + * @todo api */ ol.format.OSMXML = function() { goog.base(this); diff --git a/src/ol/format/topojsonformat.exports b/src/ol/format/topojsonformat.exports deleted file mode 100644 index 367c42efb8..0000000000 --- a/src/ol/format/topojsonformat.exports +++ /dev/null @@ -1,3 +0,0 @@ -@exportSymbol ol.format.TopoJSON -@exportProperty ol.format.TopoJSON.prototype.readFeatures -@exportProperty ol.format.TopoJSON.prototype.readProjection diff --git a/src/ol/format/topojsonformat.js b/src/ol/format/topojsonformat.js index 5b484b4ca7..ee3e347486 100644 --- a/src/ol/format/topojsonformat.js +++ b/src/ol/format/topojsonformat.js @@ -19,7 +19,7 @@ goog.require('ol.proj'); * @constructor * @extends {ol.format.JSONFeature} * @param {olx.format.TopoJSONOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.format.TopoJSON = function(opt_options) { @@ -271,6 +271,7 @@ ol.format.TopoJSON.readFeatureFromGeometry_ = function(object, arcs, * @function * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {Array.} Features. + * @todo api */ ol.format.TopoJSON.prototype.readFeatures; @@ -380,6 +381,7 @@ ol.format.TopoJSON.transformVertex_ = function(vertex, scale, translate) { * @function * @param {ArrayBuffer|Document|Node|Object|string} object Source. * @return {ol.proj.Projection} Projection. + * @todo api */ ol.format.TopoJSON.prototype.readProjection = function(object) { return this.defaultProjection_; diff --git a/src/ol/format/wfsformat.exports b/src/ol/format/wfsformat.exports deleted file mode 100644 index d37ea38997..0000000000 --- a/src/ol/format/wfsformat.exports +++ /dev/null @@ -1,6 +0,0 @@ -@exportSymbol ol.format.WFS -@exportProperty ol.format.WFS.prototype.readFeatures -@exportProperty ol.format.WFS.prototype.readTransactionResponse -@exportProperty ol.format.WFS.prototype.readFeatureCollectionMetadata -@exportProperty ol.format.WFS.prototype.writeGetFeature -@exportProperty ol.format.WFS.prototype.writeTransaction diff --git a/src/ol/format/wfsformat.js b/src/ol/format/wfsformat.js index c6a8124bb9..6969ae31f8 100644 --- a/src/ol/format/wfsformat.js +++ b/src/ol/format/wfsformat.js @@ -17,7 +17,7 @@ goog.require('ol.xml'); * @param {olx.format.WFSOptions=} opt_options * Optional configuration object. * @extends {ol.format.XMLFeature} - * @todo stability experimental + * @todo api */ ol.format.WFS = function(opt_options) { var options = /** @type {olx.format.WFSOptions} */ @@ -92,6 +92,7 @@ ol.format.WFS.prototype.readFeaturesFromNode = function(node) { /** * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.format.WFS.TransactionResponse|undefined} Transaction response. + * @todo api */ ol.format.WFS.prototype.readTransactionResponse = function(source) { if (ol.xml.isDocument(source)) { @@ -113,6 +114,7 @@ ol.format.WFS.prototype.readTransactionResponse = function(source) { * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @return {ol.format.WFS.FeatureCollectionMetadata|undefined} * FeatureCollection metadata. + * @todo api */ ol.format.WFS.prototype.readFeatureCollectionMetadata = function(source) { if (ol.xml.isDocument(source)) { @@ -549,6 +551,7 @@ ol.format.WFS.writeGetFeature_ = function(node, featureTypes, objectStack) { /** * @param {olx.format.WFSWriteGetFeatureOptions} options Options. * @return {Node} Result. + * @todo api */ ol.format.WFS.prototype.writeGetFeature = function(options) { var node = ol.xml.createElementNS('http://www.opengis.net/wfs', @@ -600,6 +603,7 @@ ol.format.WFS.prototype.writeGetFeature = function(options) { * @param {Array.} deletes The features to delete. * @param {olx.format.WFSWriteTransactionOptions} options Write options. * @return {Node} Result. + * @todo api */ ol.format.WFS.prototype.writeTransaction = function(inserts, updates, deletes, options) { diff --git a/src/ol/format/wmscapabilitiesformat.exports b/src/ol/format/wmscapabilitiesformat.exports deleted file mode 100644 index 0b1c5a8deb..0000000000 --- a/src/ol/format/wmscapabilitiesformat.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.format.WMSCapabilities -@exportProperty ol.format.WMSCapabilities.prototype.read diff --git a/src/ol/format/wmscapabilitiesformat.js b/src/ol/format/wmscapabilitiesformat.js index 856a670153..2f0aaf44d6 100644 --- a/src/ol/format/wmscapabilitiesformat.js +++ b/src/ol/format/wmscapabilitiesformat.js @@ -15,6 +15,7 @@ goog.require('ol.xml'); /** * @constructor * @extends {ol.format.XML} + * @todo api */ ol.format.WMSCapabilities = function() { @@ -28,6 +29,17 @@ ol.format.WMSCapabilities = function() { goog.inherits(ol.format.WMSCapabilities, ol.format.XML); +/** + * Read a WMS capabilities document. + * + * @function + * @param {Document|Node|string} source The XML source. + * @return {Object} An object representing the WMS capabilities. + * @todo api + */ +ol.format.WMSCapabilities.prototype.read; + + /** * @param {Document} doc Document. * @return {Object} WMS Capability object. diff --git a/src/ol/framestate.js b/src/ol/framestate.js index 4e65c53f23..8eccdbb9c4 100644 --- a/src/ol/framestate.js +++ b/src/ol/framestate.js @@ -12,6 +12,11 @@ ol.PostRenderFunction; /** + * Function to perform manipulations before rendering. This function is called + * with the {@link ol.Map} as first and an optional {@link oli.FrameState} as + * second argument. Return `true` to keep this function for the next frame, + * `false` to remove it. * @typedef {function(ol.Map, ?oli.FrameState): boolean} + * @todo api */ ol.PreRenderFunction; diff --git a/src/ol/geolocation.exports b/src/ol/geolocation.exports deleted file mode 100644 index adc26edc01..0000000000 --- a/src/ol/geolocation.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.Geolocation diff --git a/src/ol/geolocation.js b/src/ol/geolocation.js index f2a291dbab..ecbf7e6669 100644 --- a/src/ol/geolocation.js +++ b/src/ol/geolocation.js @@ -51,7 +51,6 @@ ol.GeolocationProperty = { * @constructor * @extends {ol.Object} * @param {olx.GeolocationOptions=} opt_options Options. - * @todo stability experimental * @todo observable accuracy {number} readonly the accuracy of the position * measurement in meters * @todo observable accuracyGeometry {ol.geom.Geometry} readonly a @@ -72,6 +71,7 @@ ol.GeolocationProperty = { * @todo observable trackingOptions {GeolocationPositionOptions} PositionOptions * as defined by the HTML5 Geolocation spec at * http://www.w3.org/TR/geolocation-API/#position_options_interface + * @todo api */ ol.Geolocation = function(opt_options) { @@ -206,7 +206,7 @@ ol.Geolocation.prototype.positionError_ = function(error) { /** * Get the accuracy of the position in meters. * @return {number|undefined} Position accuracy in meters. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getAccuracy = function() { return /** @type {number|undefined} */ ( @@ -221,7 +221,7 @@ goog.exportProperty( /** * Get a geometry of the position accuracy. * @return {?ol.geom.Geometry} Accuracy geometry. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getAccuracyGeometry = function() { return /** @type {?ol.geom.Geometry} */ ( @@ -236,7 +236,7 @@ goog.exportProperty( /** * Get the altitude associated with the position. * @return {number|undefined} The altitude in meters above the mean sea level. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getAltitude = function() { return /** @type {number|undefined} */ ( @@ -251,7 +251,7 @@ goog.exportProperty( /** * Get the altitude accuracy of the position. * @return {number|undefined} Altitude accuracy in meters. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getAltitudeAccuracy = function() { return /** @type {number|undefined} */ ( @@ -266,7 +266,7 @@ goog.exportProperty( /** * Get the heading as radians clockwise from North. * @return {number|undefined} Heading. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getHeading = function() { return /** @type {number|undefined} */ ( @@ -281,7 +281,7 @@ goog.exportProperty( /** * Get the position of the device. * @return {ol.Coordinate|undefined} position. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getPosition = function() { return /** @type {ol.Coordinate|undefined} */ ( @@ -296,7 +296,7 @@ goog.exportProperty( /** * Get the projection associated with the position. * @return {ol.proj.Projection|undefined} projection. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getProjection = function() { return /** @type {ol.proj.Projection|undefined} */ ( @@ -311,7 +311,7 @@ goog.exportProperty( /** * Get the speed in meters per second. * @return {number|undefined} Speed. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getSpeed = function() { return /** @type {number|undefined} */ ( @@ -326,7 +326,7 @@ goog.exportProperty( /** * Are we tracking the user's position? * @return {boolean} tracking. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getTracking = function() { return /** @type {boolean} */ ( @@ -343,7 +343,7 @@ goog.exportProperty( * @see http://www.w3.org/TR/geolocation-API/#position-options * @return {GeolocationPositionOptions|undefined} HTML 5 Gelocation * tracking options. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.getTrackingOptions = function() { return /** @type {GeolocationPositionOptions|undefined} */ ( @@ -358,7 +358,7 @@ goog.exportProperty( /** * Set the projection to use for transforming the coordinates. * @param {ol.proj.Projection} projection Projection. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.setProjection = function(projection) { this.set(ol.GeolocationProperty.PROJECTION, projection); @@ -372,7 +372,7 @@ goog.exportProperty( /** * Enable/disable tracking. * @param {boolean} tracking Enable or disable tracking. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.setTracking = function(tracking) { this.set(ol.GeolocationProperty.TRACKING, tracking); @@ -388,7 +388,7 @@ goog.exportProperty( * @see http://www.w3.org/TR/geolocation-API/#position-options * @param {GeolocationPositionOptions} options HTML 5 Geolocation * tracking options. - * @todo stability experimental + * @todo api */ ol.Geolocation.prototype.setTrackingOptions = function(options) { this.set(ol.GeolocationProperty.TRACKING_OPTIONS, options); diff --git a/src/ol/geom/circle.exports b/src/ol/geom/circle.exports deleted file mode 100644 index e08d6f83be..0000000000 --- a/src/ol/geom/circle.exports +++ /dev/null @@ -1,11 +0,0 @@ -@exportSymbol ol.geom.Circle -@exportProperty ol.geom.Circle.prototype.clone -@exportProperty ol.geom.Circle.prototype.getCenter -@exportProperty ol.geom.Circle.prototype.getExtent -@exportProperty ol.geom.Circle.prototype.getRadius -@exportProperty ol.geom.Circle.prototype.getSimplifiedGeometry -@exportProperty ol.geom.Circle.prototype.getType -@exportProperty ol.geom.Circle.prototype.setCenter -@exportProperty ol.geom.Circle.prototype.setCenterAndRadius -@exportProperty ol.geom.Circle.prototype.setRadius -@exportProperty ol.geom.Circle.prototype.transform diff --git a/src/ol/geom/circle.js b/src/ol/geom/circle.js index 72457fd35d..10efe0cefb 100644 --- a/src/ol/geom/circle.js +++ b/src/ol/geom/circle.js @@ -14,7 +14,7 @@ goog.require('ol.geom.flat.deflate'); * @param {ol.geom.RawPoint} center Center. * @param {number=} opt_radius Radius. * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.Circle = function(center, opt_radius, opt_layout) { goog.base(this); @@ -27,6 +27,7 @@ goog.inherits(ol.geom.Circle, ol.geom.SimpleGeometry); /** * @inheritDoc + * @todo api */ ol.geom.Circle.prototype.clone = function() { var circle = new ol.geom.Circle(null); @@ -79,7 +80,7 @@ ol.geom.Circle.prototype.containsXY = function(x, y) { /** * @return {ol.geom.RawPoint} Center. - * @todo stability experimental + * @todo api */ ol.geom.Circle.prototype.getCenter = function() { return this.flatCoordinates.slice(0, this.stride); @@ -88,6 +89,7 @@ ol.geom.Circle.prototype.getCenter = function() { /** * @inheritDoc + * @todo api */ ol.geom.Circle.prototype.getExtent = function(opt_extent) { if (this.extentRevision != this.getRevision()) { @@ -106,7 +108,7 @@ ol.geom.Circle.prototype.getExtent = function(opt_extent) { /** * @return {number} Radius. - * @todo stability experimental + * @todo api */ ol.geom.Circle.prototype.getRadius = function() { return Math.sqrt(this.getRadiusSquared_()); @@ -126,6 +128,7 @@ ol.geom.Circle.prototype.getRadiusSquared_ = function() { /** * @inheritDoc + * @todo api */ ol.geom.Circle.prototype.getSimplifiedGeometry = function(squaredTolerance) { return this; @@ -134,6 +137,7 @@ ol.geom.Circle.prototype.getSimplifiedGeometry = function(squaredTolerance) { /** * @inheritDoc + * @todo api */ ol.geom.Circle.prototype.getType = function() { return ol.geom.GeometryType.CIRCLE; @@ -142,7 +146,7 @@ ol.geom.Circle.prototype.getType = function() { /** * @param {ol.geom.RawPoint} center Center. - * @todo stability experimental + * @todo api */ ol.geom.Circle.prototype.setCenter = function(center) { var stride = this.stride; @@ -162,7 +166,7 @@ ol.geom.Circle.prototype.setCenter = function(center) { * @param {ol.geom.RawPoint} center Center. * @param {number} radius Radius. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.Circle.prototype.setCenterAndRadius = function(center, radius, opt_layout) { @@ -201,7 +205,7 @@ ol.geom.Circle.prototype.setFlatCoordinates = /** * @param {number} radius Radius. - * @todo stability experimental + * @todo api */ ol.geom.Circle.prototype.setRadius = function(radius) { goog.asserts.assert(!goog.isNull(this.flatCoordinates)); diff --git a/src/ol/geom/geometry.exports b/src/ol/geom/geometry.exports deleted file mode 100644 index 4c332d46de..0000000000 --- a/src/ol/geom/geometry.exports +++ /dev/null @@ -1,3 +0,0 @@ -@exportSymbol ol.geom.Geometry -@exportProperty ol.geom.Geometry.prototype.getClosestPoint -@exportProperty ol.geom.Geometry.prototype.getType diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index 0cf308b55f..613de8949d 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -7,7 +7,11 @@ goog.require('ol.Observable'); /** + * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`, + * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`, + * `'GeometryCollection'`, `'Circle'`. * @enum {string} + * @todo api */ ol.geom.GeometryType = { POINT: 'Point', @@ -23,7 +27,11 @@ ol.geom.GeometryType = { /** + * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z') + * or measure ('M') coordinate is available. Supported values are `'XY'`, + * `'XYZ'`, `'XYM'`, `'XYZM'`. * @enum {string} + * @todo api */ ol.geom.GeometryLayout = { XY: 'XY', @@ -37,7 +45,7 @@ ol.geom.GeometryLayout = { /** * @constructor * @extends {ol.Observable} - * @todo stability experimental + * @todo api */ ol.geom.Geometry = function() { @@ -78,8 +86,8 @@ goog.inherits(ol.geom.Geometry, ol.Observable); /** + * @function * @return {ol.geom.Geometry} Clone. - * @todo stability experimental */ ol.geom.Geometry.prototype.clone = goog.abstractMethod; @@ -98,7 +106,7 @@ ol.geom.Geometry.prototype.closestPointXY = goog.abstractMethod; * @param {ol.Coordinate} point Point. * @param {ol.Coordinate=} opt_closestPoint Closest point. * @return {ol.Coordinate} Closest point. - * @todo stability experimental + * @todo api */ ol.geom.Geometry.prototype.getClosestPoint = function(point, opt_closestPoint) { var closestPoint = goog.isDef(opt_closestPoint) ? @@ -111,7 +119,6 @@ ol.geom.Geometry.prototype.getClosestPoint = function(point, opt_closestPoint) { /** * @param {ol.Coordinate} coordinate Coordinate. * @return {boolean} Contains coordinate. - * @todo stability experimental */ ol.geom.Geometry.prototype.containsCoordinate = function(coordinate) { return this.containsXY(coordinate[0], coordinate[1]); @@ -127,14 +134,17 @@ ol.geom.Geometry.prototype.containsXY = goog.functions.FALSE; /** + * Get the extent of the geometry. + * @function * @param {ol.Extent=} opt_extent Extent. * @return {ol.Extent} extent Extent. - * @todo stability experimental + * @todo api */ ol.geom.Geometry.prototype.getExtent = goog.abstractMethod; /** + * @function * @param {number} squaredTolerance Squared tolerance. * @return {ol.geom.Geometry} Simplified geometry. */ @@ -142,15 +152,15 @@ ol.geom.Geometry.prototype.getSimplifiedGeometry = goog.abstractMethod; /** + * @function * @return {ol.geom.GeometryType} Geometry type. - * @todo stability experimental */ ol.geom.Geometry.prototype.getType = goog.abstractMethod; /** + * @function * @param {ol.TransformFunction} transformFn Transform. - * @todo stability experimental */ ol.geom.Geometry.prototype.transform = goog.abstractMethod; diff --git a/src/ol/geom/geometrycollection.exports b/src/ol/geom/geometrycollection.exports deleted file mode 100644 index 103ce2c40f..0000000000 --- a/src/ol/geom/geometrycollection.exports +++ /dev/null @@ -1,7 +0,0 @@ -@exportSymbol ol.geom.GeometryCollection -@exportProperty ol.geom.GeometryCollection.prototype.clone -@exportProperty ol.geom.GeometryCollection.prototype.getExtent -@exportProperty ol.geom.GeometryCollection.prototype.getGeometries -@exportProperty ol.geom.GeometryCollection.prototype.getSimplifiedGeometry -@exportProperty ol.geom.GeometryCollection.prototype.getType -@exportProperty ol.geom.GeometryCollection.prototype.setGeometries diff --git a/src/ol/geom/geometrycollection.js b/src/ol/geom/geometrycollection.js index 12b8f5a0b5..f64ebf396a 100644 --- a/src/ol/geom/geometrycollection.js +++ b/src/ol/geom/geometrycollection.js @@ -15,7 +15,7 @@ goog.require('ol.geom.GeometryType'); * @constructor * @extends {ol.geom.Geometry} * @param {Array.=} opt_geometries Geometries. - * @todo stability experimental + * @todo api */ ol.geom.GeometryCollection = function(opt_geometries) { @@ -81,6 +81,7 @@ ol.geom.GeometryCollection.prototype.listenGeometriesChange_ = function() { /** * @inheritDoc + * @todo api */ ol.geom.GeometryCollection.prototype.clone = function() { var geometryCollection = new ol.geom.GeometryCollection(null); @@ -125,6 +126,7 @@ ol.geom.GeometryCollection.prototype.containsXY = function(x, y) { /** * @inheritDoc + * @todo api */ ol.geom.GeometryCollection.prototype.getExtent = function(opt_extent) { if (this.extentRevision != this.getRevision()) { @@ -144,7 +146,7 @@ ol.geom.GeometryCollection.prototype.getExtent = function(opt_extent) { /** * @return {Array.} Geometries. - * @todo stability experimental + * @todo api */ ol.geom.GeometryCollection.prototype.getGeometries = function() { return ol.geom.GeometryCollection.cloneGeometries_(this.geometries_); @@ -161,6 +163,7 @@ ol.geom.GeometryCollection.prototype.getGeometriesArray = function() { /** * @inheritDoc + * @todo api */ ol.geom.GeometryCollection.prototype.getSimplifiedGeometry = function(squaredTolerance) { @@ -205,6 +208,7 @@ ol.geom.GeometryCollection.prototype.getSimplifiedGeometry = /** * @inheritDoc + * @todo api */ ol.geom.GeometryCollection.prototype.getType = function() { return ol.geom.GeometryType.GEOMETRY_COLLECTION; @@ -213,7 +217,6 @@ ol.geom.GeometryCollection.prototype.getType = function() { /** * @return {boolean} Is empty. - * @todo stability experimental */ ol.geom.GeometryCollection.prototype.isEmpty = function() { return goog.array.isEmpty(this.geometries_); @@ -222,7 +225,7 @@ ol.geom.GeometryCollection.prototype.isEmpty = function() { /** * @param {Array.} geometries Geometries. - * @todo stability experimental + * @todo api */ ol.geom.GeometryCollection.prototype.setGeometries = function(geometries) { this.setGeometriesArray( diff --git a/src/ol/geom/linearring.exports b/src/ol/geom/linearring.exports deleted file mode 100644 index 568949b1bb..0000000000 --- a/src/ol/geom/linearring.exports +++ /dev/null @@ -1,6 +0,0 @@ -@exportSymbol ol.geom.LinearRing -@exportProperty ol.geom.LinearRing.prototype.clone -@exportProperty ol.geom.LinearRing.prototype.getArea -@exportProperty ol.geom.LinearRing.prototype.getCoordinates -@exportProperty ol.geom.LinearRing.prototype.getType -@exportProperty ol.geom.LinearRing.prototype.setCoordinates diff --git a/src/ol/geom/linearring.js b/src/ol/geom/linearring.js index 18250e7613..c2cd1b8dfa 100644 --- a/src/ol/geom/linearring.js +++ b/src/ol/geom/linearring.js @@ -16,7 +16,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawLinearRing} coordinates Coordinates. * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.LinearRing = function(coordinates, opt_layout) { @@ -43,6 +43,7 @@ goog.inherits(ol.geom.LinearRing, ol.geom.SimpleGeometry); /** * @inheritDoc + * @todo api */ ol.geom.LinearRing.prototype.clone = function() { var linearRing = new ol.geom.LinearRing(null); @@ -73,7 +74,7 @@ ol.geom.LinearRing.prototype.closestPointXY = /** * @return {number} Area. - * @todo stability experimental + * @todo api */ ol.geom.LinearRing.prototype.getArea = function() { return ol.geom.flat.area.linearRing( @@ -83,7 +84,7 @@ ol.geom.LinearRing.prototype.getArea = function() { /** * @return {ol.geom.RawLinearRing} Coordinates. - * @todo stability experimental + * @todo api */ ol.geom.LinearRing.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinates( @@ -109,6 +110,7 @@ ol.geom.LinearRing.prototype.getSimplifiedGeometryInternal = /** * @inheritDoc + * @todo api */ ol.geom.LinearRing.prototype.getType = function() { return ol.geom.GeometryType.LINEAR_RING; @@ -118,7 +120,7 @@ ol.geom.LinearRing.prototype.getType = function() { /** * @param {ol.geom.RawLinearRing} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.LinearRing.prototype.setCoordinates = function(coordinates, opt_layout) { diff --git a/src/ol/geom/linestring.exports b/src/ol/geom/linestring.exports deleted file mode 100644 index f1f95ce7c1..0000000000 --- a/src/ol/geom/linestring.exports +++ /dev/null @@ -1,8 +0,0 @@ -@exportSymbol ol.geom.LineString -@exportProperty ol.geom.LineString.prototype.appendCoordinate -@exportProperty ol.geom.LineString.prototype.clone -@exportProperty ol.geom.LineString.prototype.getCoordinateAtM -@exportProperty ol.geom.LineString.prototype.getCoordinates -@exportProperty ol.geom.LineString.prototype.getLength -@exportProperty ol.geom.LineString.prototype.getType -@exportProperty ol.geom.LineString.prototype.setCoordinates diff --git a/src/ol/geom/linestring.js b/src/ol/geom/linestring.js index 92d99f5d98..0dcd57df7d 100644 --- a/src/ol/geom/linestring.js +++ b/src/ol/geom/linestring.js @@ -20,7 +20,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawLineString} coordinates Coordinates. * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.LineString = function(coordinates, opt_layout) { @@ -59,6 +59,7 @@ goog.inherits(ol.geom.LineString, ol.geom.SimpleGeometry); /** * @param {ol.Coordinate} coordinate Coordinate. + * @todo api */ ol.geom.LineString.prototype.appendCoordinate = function(coordinate) { goog.asserts.assert(coordinate.length == this.stride); @@ -73,6 +74,7 @@ ol.geom.LineString.prototype.appendCoordinate = function(coordinate) { /** * @inheritDoc + * @todo api */ ol.geom.LineString.prototype.clone = function() { var lineString = new ol.geom.LineString(null); @@ -113,6 +115,7 @@ ol.geom.LineString.prototype.closestPointXY = * @param {number} m M. * @param {boolean=} opt_extrapolate Extrapolate. * @return {ol.Coordinate} Coordinate. + * @todo api */ ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) { if (this.layout != ol.geom.GeometryLayout.XYM && @@ -127,7 +130,7 @@ ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) { /** * @return {ol.geom.RawLineString} Coordinates. - * @todo stability experimental + * @todo api */ ol.geom.LineString.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinates( @@ -137,7 +140,7 @@ ol.geom.LineString.prototype.getCoordinates = function() { /** * @return {number} Length. - * @todo stability experimental + * @todo api */ ol.geom.LineString.prototype.getLength = function() { return ol.geom.flat.length.lineString( @@ -177,6 +180,7 @@ ol.geom.LineString.prototype.getSimplifiedGeometryInternal = /** * @inheritDoc + * @todo api */ ol.geom.LineString.prototype.getType = function() { return ol.geom.GeometryType.LINE_STRING; @@ -186,7 +190,7 @@ ol.geom.LineString.prototype.getType = function() { /** * @param {ol.geom.RawLineString} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.LineString.prototype.setCoordinates = function(coordinates, opt_layout) { diff --git a/src/ol/geom/multilinestring.exports b/src/ol/geom/multilinestring.exports deleted file mode 100644 index 9390428f2a..0000000000 --- a/src/ol/geom/multilinestring.exports +++ /dev/null @@ -1,9 +0,0 @@ -@exportSymbol ol.geom.MultiLineString -@exportProperty ol.geom.MultiLineString.prototype.appendLineString -@exportProperty ol.geom.MultiLineString.prototype.clone -@exportProperty ol.geom.MultiLineString.prototype.getCoordinateAtM -@exportProperty ol.geom.MultiLineString.prototype.getCoordinates -@exportProperty ol.geom.MultiLineString.prototype.getLineString -@exportProperty ol.geom.MultiLineString.prototype.getLineStrings -@exportProperty ol.geom.MultiLineString.prototype.getType -@exportProperty ol.geom.MultiLineString.prototype.setCoordinates diff --git a/src/ol/geom/multilinestring.js b/src/ol/geom/multilinestring.js index 895bf6472e..842d41d1a1 100644 --- a/src/ol/geom/multilinestring.js +++ b/src/ol/geom/multilinestring.js @@ -20,7 +20,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawMultiLineString} coordinates Coordinates. * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.MultiLineString = function(coordinates, opt_layout) { @@ -53,6 +53,7 @@ goog.inherits(ol.geom.MultiLineString, ol.geom.SimpleGeometry); /** * @param {ol.geom.LineString} lineString LineString. + * @todo api */ ol.geom.MultiLineString.prototype.appendLineString = function(lineString) { goog.asserts.assert(lineString.getLayout() == this.layout); @@ -69,6 +70,7 @@ ol.geom.MultiLineString.prototype.appendLineString = function(lineString) { /** * @inheritDoc + * @todo api */ ol.geom.MultiLineString.prototype.clone = function() { var multiLineString = new ol.geom.MultiLineString(null); @@ -118,6 +120,7 @@ ol.geom.MultiLineString.prototype.closestPointXY = * @param {boolean=} opt_extrapolate Extrapolate. * @param {boolean=} opt_interpolate Interpolate. * @return {ol.Coordinate} Coordinate. + * @todo api */ ol.geom.MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_interpolate) { @@ -135,7 +138,7 @@ ol.geom.MultiLineString.prototype.getCoordinateAtM = /** * @return {ol.geom.RawMultiLineString} Coordinates. - * @todo stability experimental + * @todo api */ ol.geom.MultiLineString.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinatess( @@ -154,6 +157,7 @@ ol.geom.MultiLineString.prototype.getEnds = function() { /** * @param {number} index Index. * @return {ol.geom.LineString} LineString. + * @todo api */ ol.geom.MultiLineString.prototype.getLineString = function(index) { goog.asserts.assert(0 <= index && index < this.ends_.length); @@ -169,7 +173,7 @@ ol.geom.MultiLineString.prototype.getLineString = function(index) { /** * @return {Array.} LineStrings. - * @todo stability experimental + * @todo api */ ol.geom.MultiLineString.prototype.getLineStrings = function() { var flatCoordinates = this.flatCoordinates; @@ -230,6 +234,7 @@ ol.geom.MultiLineString.prototype.getSimplifiedGeometryInternal = /** * @inheritDoc + * @todo api */ ol.geom.MultiLineString.prototype.getType = function() { return ol.geom.GeometryType.MULTI_LINE_STRING; @@ -239,7 +244,7 @@ ol.geom.MultiLineString.prototype.getType = function() { /** * @param {ol.geom.RawMultiLineString} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.MultiLineString.prototype.setCoordinates = function(coordinates, opt_layout) { @@ -280,7 +285,6 @@ ol.geom.MultiLineString.prototype.setFlatCoordinates = /** * @param {Array.} lineStrings LineStrings. - * @todo stability experimental */ ol.geom.MultiLineString.prototype.setLineStrings = function(lineStrings) { var layout = ol.geom.GeometryLayout.XY; diff --git a/src/ol/geom/multipoint.exports b/src/ol/geom/multipoint.exports deleted file mode 100644 index b00ddcae09..0000000000 --- a/src/ol/geom/multipoint.exports +++ /dev/null @@ -1,8 +0,0 @@ -@exportSymbol ol.geom.MultiPoint -@exportProperty ol.geom.MultiPoint.prototype.appendPoint -@exportProperty ol.geom.MultiPoint.prototype.clone -@exportProperty ol.geom.MultiPoint.prototype.getCoordinates -@exportProperty ol.geom.MultiPoint.prototype.getPoint -@exportProperty ol.geom.MultiPoint.prototype.getPoints -@exportProperty ol.geom.MultiPoint.prototype.getType -@exportProperty ol.geom.MultiPoint.prototype.setCoordinates diff --git a/src/ol/geom/multipoint.js b/src/ol/geom/multipoint.js index 1e5c12d91f..badab06dd9 100644 --- a/src/ol/geom/multipoint.js +++ b/src/ol/geom/multipoint.js @@ -18,7 +18,7 @@ goog.require('ol.math'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawMultiPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.MultiPoint = function(coordinates, opt_layout) { goog.base(this); @@ -30,6 +30,7 @@ goog.inherits(ol.geom.MultiPoint, ol.geom.SimpleGeometry); /** * @param {ol.geom.Point} point Point. + * @todo api */ ol.geom.MultiPoint.prototype.appendPoint = function(point) { goog.asserts.assert(point.getLayout() == this.layout); @@ -44,6 +45,7 @@ ol.geom.MultiPoint.prototype.appendPoint = function(point) { /** * @inheritDoc + * @todo api */ ol.geom.MultiPoint.prototype.clone = function() { var multiPoint = new ol.geom.MultiPoint(null); @@ -81,7 +83,7 @@ ol.geom.MultiPoint.prototype.closestPointXY = /** * @return {ol.geom.RawMultiPoint} Coordinates. - * @todo stability experimental + * @todo api */ ol.geom.MultiPoint.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinates( @@ -92,6 +94,7 @@ ol.geom.MultiPoint.prototype.getCoordinates = function() { /** * @param {number} index Index. * @return {ol.geom.Point} Point. + * @todo api */ ol.geom.MultiPoint.prototype.getPoint = function(index) { var n = goog.isNull(this.flatCoordinates) ? @@ -109,7 +112,7 @@ ol.geom.MultiPoint.prototype.getPoint = function(index) { /** * @return {Array.} Points. - * @todo stability experimental + * @todo api */ ol.geom.MultiPoint.prototype.getPoints = function() { var flatCoordinates = this.flatCoordinates; @@ -129,6 +132,7 @@ ol.geom.MultiPoint.prototype.getPoints = function() { /** * @inheritDoc + * @todo api */ ol.geom.MultiPoint.prototype.getType = function() { return ol.geom.GeometryType.MULTI_POINT; @@ -138,7 +142,7 @@ ol.geom.MultiPoint.prototype.getType = function() { /** * @param {ol.geom.RawMultiPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.MultiPoint.prototype.setCoordinates = function(coordinates, opt_layout) { diff --git a/src/ol/geom/multipolygon.exports b/src/ol/geom/multipolygon.exports deleted file mode 100644 index 6f67842bc3..0000000000 --- a/src/ol/geom/multipolygon.exports +++ /dev/null @@ -1,10 +0,0 @@ -@exportSymbol ol.geom.MultiPolygon -@exportProperty ol.geom.MultiPolygon.prototype.appendPolygon -@exportProperty ol.geom.MultiPolygon.prototype.clone -@exportProperty ol.geom.MultiPolygon.prototype.getArea -@exportProperty ol.geom.MultiPolygon.prototype.getCoordinates -@exportProperty ol.geom.MultiPolygon.prototype.getInteriorPoints -@exportProperty ol.geom.MultiPolygon.prototype.getPolygon -@exportProperty ol.geom.MultiPolygon.prototype.getPolygons -@exportProperty ol.geom.MultiPolygon.prototype.getType -@exportProperty ol.geom.MultiPolygon.prototype.setCoordinates diff --git a/src/ol/geom/multipolygon.js b/src/ol/geom/multipolygon.js index 1030852894..4379765c03 100644 --- a/src/ol/geom/multipolygon.js +++ b/src/ol/geom/multipolygon.js @@ -25,7 +25,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawMultiPolygon} coordinates Coordinates. * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.MultiPolygon = function(coordinates, opt_layout) { @@ -82,6 +82,7 @@ goog.inherits(ol.geom.MultiPolygon, ol.geom.SimpleGeometry); /** * @param {ol.geom.Polygon} polygon Polygon. + * @todo api */ ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) { goog.asserts.assert(polygon.getLayout() == this.layout); @@ -107,6 +108,7 @@ ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) { /** * @inheritDoc + * @todo api */ ol.geom.MultiPolygon.prototype.clone = function() { var multiPolygon = new ol.geom.MultiPolygon(null); @@ -147,7 +149,7 @@ ol.geom.MultiPolygon.prototype.containsXY = function(x, y) { /** * @return {number} Area. - * @todo stability experimental + * @todo api */ ol.geom.MultiPolygon.prototype.getArea = function() { return ol.geom.flat.area.linearRingss( @@ -157,7 +159,7 @@ ol.geom.MultiPolygon.prototype.getArea = function() { /** * @return {ol.geom.RawMultiPolygon} Coordinates. - * @todo stability experimental + * @todo api */ ol.geom.MultiPolygon.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinatesss( @@ -191,6 +193,7 @@ ol.geom.MultiPolygon.prototype.getFlatInteriorPoints = function() { /** * @return {ol.geom.MultiPoint} Interior points. + * @todo api */ ol.geom.MultiPolygon.prototype.getInteriorPoints = function() { var interiorPoints = new ol.geom.MultiPoint(null); @@ -242,6 +245,7 @@ ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal = /** * @param {number} index Index. * @return {ol.geom.Polygon} Polygon. + * @todo api */ ol.geom.MultiPolygon.prototype.getPolygon = function(index) { goog.asserts.assert(0 <= index && index < this.endss_.length); @@ -272,7 +276,7 @@ ol.geom.MultiPolygon.prototype.getPolygon = function(index) { /** * @return {Array.} Polygons. - * @todo stability experimental + * @todo api */ ol.geom.MultiPolygon.prototype.getPolygons = function() { var layout = this.layout; @@ -301,6 +305,7 @@ ol.geom.MultiPolygon.prototype.getPolygons = function() { /** * @inheritDoc + * @todo api */ ol.geom.MultiPolygon.prototype.getType = function() { return ol.geom.GeometryType.MULTI_POLYGON; @@ -310,7 +315,7 @@ ol.geom.MultiPolygon.prototype.getType = function() { /** * @param {ol.geom.RawMultiPolygon} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.MultiPolygon.prototype.setCoordinates = function(coordinates, opt_layout) { @@ -354,7 +359,6 @@ ol.geom.MultiPolygon.prototype.setFlatCoordinates = /** * @param {Array.} polygons Polygons. - * @todo stability experimental */ ol.geom.MultiPolygon.prototype.setPolygons = function(polygons) { var layout = ol.geom.GeometryLayout.XY; diff --git a/src/ol/geom/point.exports b/src/ol/geom/point.exports deleted file mode 100644 index f48a3b7a4d..0000000000 --- a/src/ol/geom/point.exports +++ /dev/null @@ -1,5 +0,0 @@ -@exportSymbol ol.geom.Point -@exportProperty ol.geom.Point.prototype.clone -@exportProperty ol.geom.Point.prototype.getCoordinates -@exportProperty ol.geom.Point.prototype.getType -@exportProperty ol.geom.Point.prototype.setCoordinates diff --git a/src/ol/geom/point.js b/src/ol/geom/point.js index fafd43f30b..90c2d40f84 100644 --- a/src/ol/geom/point.js +++ b/src/ol/geom/point.js @@ -14,7 +14,7 @@ goog.require('ol.math'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.Point = function(coordinates, opt_layout) { goog.base(this); @@ -26,6 +26,7 @@ goog.inherits(ol.geom.Point, ol.geom.SimpleGeometry); /** * @inheritDoc + * @todo api */ ol.geom.Point.prototype.clone = function() { var point = new ol.geom.Point(null); @@ -58,7 +59,7 @@ ol.geom.Point.prototype.closestPointXY = /** * @return {ol.geom.RawPoint} Coordinates. - * @todo stability experimental + * @todo api */ ol.geom.Point.prototype.getCoordinates = function() { return this.flatCoordinates.slice(); @@ -81,6 +82,7 @@ ol.geom.Point.prototype.getExtent = function(opt_extent) { /** * @inheritDoc + * @todo api */ ol.geom.Point.prototype.getType = function() { return ol.geom.GeometryType.POINT; @@ -90,7 +92,7 @@ ol.geom.Point.prototype.getType = function() { /** * @param {ol.geom.RawPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.Point.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { diff --git a/src/ol/geom/polygon.exports b/src/ol/geom/polygon.exports deleted file mode 100644 index 214d5e02c6..0000000000 --- a/src/ol/geom/polygon.exports +++ /dev/null @@ -1,10 +0,0 @@ -@exportSymbol ol.geom.Polygon -@exportProperty ol.geom.Polygon.prototype.appendLinearRing -@exportProperty ol.geom.Polygon.prototype.clone -@exportProperty ol.geom.Polygon.prototype.getArea -@exportProperty ol.geom.Polygon.prototype.getCoordinates -@exportProperty ol.geom.Polygon.prototype.getInteriorPoint -@exportProperty ol.geom.Polygon.prototype.getLinearRing -@exportProperty ol.geom.Polygon.prototype.getLinearRings -@exportProperty ol.geom.Polygon.prototype.getType -@exportProperty ol.geom.Polygon.prototype.setCoordinates diff --git a/src/ol/geom/polygon.js b/src/ol/geom/polygon.js index a857b367fe..0d7bfd605e 100644 --- a/src/ol/geom/polygon.js +++ b/src/ol/geom/polygon.js @@ -24,7 +24,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawPolygon} coordinates Coordinates. * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.Polygon = function(coordinates, opt_layout) { @@ -81,6 +81,7 @@ goog.inherits(ol.geom.Polygon, ol.geom.SimpleGeometry); /** * @param {ol.geom.LinearRing} linearRing Linear ring. + * @todo api */ ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) { goog.asserts.assert(linearRing.getLayout() == this.layout); @@ -96,6 +97,7 @@ ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) { /** * @inheritDoc + * @todo api */ ol.geom.Polygon.prototype.clone = function() { var polygon = new ol.geom.Polygon(null); @@ -136,7 +138,7 @@ ol.geom.Polygon.prototype.containsXY = function(x, y) { /** * @return {number} Area. - * @todo stability experimental + * @todo api */ ol.geom.Polygon.prototype.getArea = function() { return ol.geom.flat.area.linearRings( @@ -146,7 +148,7 @@ ol.geom.Polygon.prototype.getArea = function() { /** * @return {ol.geom.RawPolygon} Coordinates. - * @todo stability experimental + * @todo api */ ol.geom.Polygon.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinatess( @@ -179,6 +181,7 @@ ol.geom.Polygon.prototype.getFlatInteriorPoint = function() { /** * @return {ol.geom.Point} Interior point. + * @todo api */ ol.geom.Polygon.prototype.getInteriorPoint = function() { return new ol.geom.Point(this.getFlatInteriorPoint()); @@ -188,6 +191,7 @@ ol.geom.Polygon.prototype.getInteriorPoint = function() { /** * @param {number} index Index. * @return {ol.geom.LinearRing} Linear ring. + * @todo api */ ol.geom.Polygon.prototype.getLinearRing = function(index) { goog.asserts.assert(0 <= index && index < this.ends_.length); @@ -203,7 +207,7 @@ ol.geom.Polygon.prototype.getLinearRing = function(index) { /** * @return {Array.} Linear rings. - * @todo stability experimental + * @todo api */ ol.geom.Polygon.prototype.getLinearRings = function() { var layout = this.layout; @@ -264,6 +268,7 @@ ol.geom.Polygon.prototype.getSimplifiedGeometryInternal = /** * @inheritDoc + * @todo api */ ol.geom.Polygon.prototype.getType = function() { return ol.geom.GeometryType.POLYGON; @@ -273,7 +278,7 @@ ol.geom.Polygon.prototype.getType = function() { /** * @param {ol.geom.RawPolygon} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @todo stability experimental + * @todo api */ ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { diff --git a/src/ol/geom/simplegeometry.exports b/src/ol/geom/simplegeometry.exports deleted file mode 100644 index 9ba0b04b69..0000000000 --- a/src/ol/geom/simplegeometry.exports +++ /dev/null @@ -1,7 +0,0 @@ -@exportSymbol ol.geom.SimpleGeometry -@exportProperty ol.geom.SimpleGeometry.prototype.getExtent -@exportProperty ol.geom.SimpleGeometry.prototype.getFirstCoordinate -@exportProperty ol.geom.SimpleGeometry.prototype.getLastCoordinate -@exportProperty ol.geom.SimpleGeometry.prototype.getLayout -@exportProperty ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry -@exportProperty ol.geom.SimpleGeometry.prototype.transform diff --git a/src/ol/geom/simplegeometry.js b/src/ol/geom/simplegeometry.js index e1841008d3..24adb6b983 100644 --- a/src/ol/geom/simplegeometry.js +++ b/src/ol/geom/simplegeometry.js @@ -12,7 +12,7 @@ goog.require('ol.geom.flat.transform'); /** * @constructor * @extends {ol.geom.Geometry} - * @todo stability experimental + * @todo api */ ol.geom.SimpleGeometry = function() { @@ -86,6 +86,7 @@ ol.geom.SimpleGeometry.prototype.containsXY = goog.functions.FALSE; /** * @inheritDoc + * @todo api */ ol.geom.SimpleGeometry.prototype.getExtent = function(opt_extent) { if (this.extentRevision != this.getRevision()) { @@ -101,6 +102,7 @@ ol.geom.SimpleGeometry.prototype.getExtent = function(opt_extent) { /** * @return {ol.Coordinate} First coordinate. + * @todo api */ ol.geom.SimpleGeometry.prototype.getFirstCoordinate = function() { return this.flatCoordinates.slice(0, this.stride); @@ -117,6 +119,7 @@ ol.geom.SimpleGeometry.prototype.getFlatCoordinates = function() { /** * @return {ol.Coordinate} Last point. + * @todo api */ ol.geom.SimpleGeometry.prototype.getLastCoordinate = function() { return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride); @@ -125,7 +128,7 @@ ol.geom.SimpleGeometry.prototype.getLastCoordinate = function() { /** * @return {ol.geom.GeometryLayout} Layout. - * @todo stability experimental + * @todo api */ ol.geom.SimpleGeometry.prototype.getLayout = function() { return this.layout; @@ -134,6 +137,7 @@ ol.geom.SimpleGeometry.prototype.getLayout = function() { /** * @inheritDoc + * @todo api */ ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry = function(squaredTolerance) { @@ -238,6 +242,7 @@ ol.geom.SimpleGeometry.prototype.setLayout = /** * @inheritDoc + * @todo api */ ol.geom.SimpleGeometry.prototype.transform = function(transformFn) { if (!goog.isNull(this.flatCoordinates)) { diff --git a/src/ol/imagetile.exports b/src/ol/imagetile.exports deleted file mode 100644 index 25d191acba..0000000000 --- a/src/ol/imagetile.exports +++ /dev/null @@ -1 +0,0 @@ -@exportProperty ol.ImageTile.prototype.getImage diff --git a/src/ol/imagetile.js b/src/ol/imagetile.js index 1fa5c9b866..637c2eda22 100644 --- a/src/ol/imagetile.js +++ b/src/ol/imagetile.js @@ -20,7 +20,6 @@ goog.require('ol.TileState'); * @param {string} src Image source URI. * @param {?string} crossOrigin Cross origin. * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function. - * @todo stability experimental */ ol.ImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction) { @@ -68,7 +67,7 @@ goog.inherits(ol.ImageTile, ol.Tile); /** * @inheritDoc - * @todo stability experimental + * @todo api */ ol.ImageTile.prototype.getImage = function(opt_context) { if (goog.isDef(opt_context)) { diff --git a/src/ol/interaction/doubleclickzoom.exports b/src/ol/interaction/doubleclickzoom.exports deleted file mode 100644 index 796868f1f1..0000000000 --- a/src/ol/interaction/doubleclickzoom.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.DoubleClickZoom diff --git a/src/ol/interaction/doubleclickzoominteraction.js b/src/ol/interaction/doubleclickzoominteraction.js index e5b019de33..d109f64994 100644 --- a/src/ol/interaction/doubleclickzoominteraction.js +++ b/src/ol/interaction/doubleclickzoominteraction.js @@ -15,7 +15,7 @@ goog.require('ol.interaction.Interaction'); * @constructor * @extends {ol.interaction.Interaction} * @param {olx.interaction.DoubleClickZoomOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.DoubleClickZoom = function(opt_options) { diff --git a/src/ol/interaction/draganddropinteraction.exports b/src/ol/interaction/draganddropinteraction.exports deleted file mode 100644 index 50e9fef9e3..0000000000 --- a/src/ol/interaction/draganddropinteraction.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.DragAndDrop diff --git a/src/ol/interaction/draganddropinteraction.js b/src/ol/interaction/draganddropinteraction.js index f2a62ba773..a1a31bc010 100644 --- a/src/ol/interaction/draganddropinteraction.js +++ b/src/ol/interaction/draganddropinteraction.js @@ -22,6 +22,7 @@ goog.require('ol.proj'); * @fires {@link ol.interaction.DragAndDropEvent} * ol.interaction.DragAndDropEvent * @param {olx.interaction.DragAndDropOptions=} opt_options Options. + * @todo api */ ol.interaction.DragAndDrop = function(opt_options) { @@ -182,7 +183,7 @@ ol.interaction.DragAndDropEventType = { /** * Triggered when features are added * @event ol.interaction.DragAndDropEvent#addfeatures - * @todo stability experimental + * @todo api */ ADD_FEATURES: 'addfeatures' }; @@ -206,19 +207,16 @@ ol.interaction.DragAndDropEvent = /** * @type {Array.|undefined} - * @todo stability experimental */ this.features = opt_features; /** * @type {File} - * @todo stability experimental */ this.file = file; /** * @type {ol.proj.Projection|undefined} - * @todo stability experimental */ this.projection = opt_projection; diff --git a/src/ol/interaction/dragboxinteraction.exports b/src/ol/interaction/dragboxinteraction.exports deleted file mode 100644 index 7b578e067a..0000000000 --- a/src/ol/interaction/dragboxinteraction.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.interaction.DragBox -@exportProperty ol.interaction.DragBox.prototype.getGeometry diff --git a/src/ol/interaction/dragboxinteraction.js b/src/ol/interaction/dragboxinteraction.js index 998fb985bd..3cefb74049 100644 --- a/src/ol/interaction/dragboxinteraction.js +++ b/src/ol/interaction/dragboxinteraction.js @@ -35,13 +35,13 @@ ol.DragBoxEventType = { /** * Triggered upon drag box start. * @event ol.DragBoxEvent#boxstart - * @todo stability experimental + * @todo api */ BOXSTART: 'boxstart', /** * Triggered upon drag box end. * @event ol.DragBoxEvent#boxstart - * @todo stability experimental + * @todo api */ BOXEND: 'boxend' }; @@ -83,7 +83,7 @@ goog.inherits(ol.DragBoxEvent, goog.events.Event); * @extends {ol.interaction.Pointer} * @fires {@link ol.DragBoxEvent} ol.DragBoxEvent * @param {olx.interaction.DragBoxOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.DragBox = function(opt_options) { @@ -135,6 +135,7 @@ ol.interaction.DragBox.prototype.handlePointerDrag = function(mapBrowserEvent) { /** * Returns geometry of last drawn box. * @return {ol.geom.Geometry} Geometry. + * @todo api */ ol.interaction.DragBox.prototype.getGeometry = function() { return this.box_.getGeometry(); diff --git a/src/ol/interaction/dragpaninteraction.exports b/src/ol/interaction/dragpaninteraction.exports deleted file mode 100644 index dbc71bf21a..0000000000 --- a/src/ol/interaction/dragpaninteraction.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.DragPan diff --git a/src/ol/interaction/dragpaninteraction.js b/src/ol/interaction/dragpaninteraction.js index 022aca8974..666ed0e4cd 100644 --- a/src/ol/interaction/dragpaninteraction.js +++ b/src/ol/interaction/dragpaninteraction.js @@ -18,7 +18,7 @@ goog.require('ol.interaction.Pointer'); * @constructor * @extends {ol.interaction.Pointer} * @param {olx.interaction.DragPanOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.DragPan = function(opt_options) { diff --git a/src/ol/interaction/dragrotate.exports b/src/ol/interaction/dragrotate.exports deleted file mode 100644 index b17241c644..0000000000 --- a/src/ol/interaction/dragrotate.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.DragRotate diff --git a/src/ol/interaction/dragrotateandzoom.exports b/src/ol/interaction/dragrotateandzoom.exports deleted file mode 100644 index f39bc1cf2a..0000000000 --- a/src/ol/interaction/dragrotateandzoom.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.DragRotateAndZoom diff --git a/src/ol/interaction/dragrotateandzoominteraction.js b/src/ol/interaction/dragrotateandzoominteraction.js index 80b689dfa4..658b4d99a4 100644 --- a/src/ol/interaction/dragrotateandzoominteraction.js +++ b/src/ol/interaction/dragrotateandzoominteraction.js @@ -31,7 +31,7 @@ ol.interaction.DRAGROTATEANDZOOM_ANIMATION_DURATION = 400; * @constructor * @extends {ol.interaction.Pointer} * @param {olx.interaction.DragRotateAndZoomOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.DragRotateAndZoom = function(opt_options) { diff --git a/src/ol/interaction/dragrotateinteraction.js b/src/ol/interaction/dragrotateinteraction.js index a9304e3ccd..1f383c41f0 100644 --- a/src/ol/interaction/dragrotateinteraction.js +++ b/src/ol/interaction/dragrotateinteraction.js @@ -25,6 +25,7 @@ ol.interaction.DRAGROTATE_ANIMATION_DURATION = 250; * @constructor * @extends {ol.interaction.Pointer} * @param {olx.interaction.DragRotateOptions=} opt_options Options. + * @todo api */ ol.interaction.DragRotate = function(opt_options) { diff --git a/src/ol/interaction/dragzoominteraction.exports b/src/ol/interaction/dragzoominteraction.exports deleted file mode 100644 index 204afabe7e..0000000000 --- a/src/ol/interaction/dragzoominteraction.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.DragZoom diff --git a/src/ol/interaction/dragzoominteraction.js b/src/ol/interaction/dragzoominteraction.js index 3955158a15..5723f1e6b0 100644 --- a/src/ol/interaction/dragzoominteraction.js +++ b/src/ol/interaction/dragzoominteraction.js @@ -23,7 +23,7 @@ ol.interaction.DRAGZOOM_ANIMATION_DURATION = 200; * @constructor * @extends {ol.interaction.DragBox} * @param {olx.interaction.DragZoomOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.DragZoom = function(opt_options) { var options = goog.isDef(opt_options) ? opt_options : {}; diff --git a/src/ol/interaction/drawinteraction.exports b/src/ol/interaction/drawinteraction.exports deleted file mode 100644 index 890ae0f515..0000000000 --- a/src/ol/interaction/drawinteraction.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.Draw diff --git a/src/ol/interaction/drawinteraction.js b/src/ol/interaction/drawinteraction.js index d7ea269531..c58c005445 100644 --- a/src/ol/interaction/drawinteraction.js +++ b/src/ol/interaction/drawinteraction.js @@ -29,13 +29,13 @@ ol.DrawEventType = { /** * Triggered upon feature draw start * @event ol.DrawEvent#drawstart - * @todo stability experimental + * @todo api */ DRAWSTART: 'drawstart', /** * Triggered upon feature draw end * @event ol.DrawEvent#drawend - * @todo stability experimental + * @todo api */ DRAWEND: 'drawend' }; @@ -56,7 +56,6 @@ ol.DrawEvent = function(type, feature) { /** * The feature being drawn. * @type {ol.Feature} - * @todo stability experimental */ this.feature = feature; @@ -71,7 +70,7 @@ goog.inherits(ol.DrawEvent, goog.events.Event); * @extends {ol.interaction.Pointer} * @fires {@link ol.DrawEvent} ol.DrawEvent * @param {olx.interaction.DrawOptions} options Options. - * @todo stability experimental + * @todo api */ ol.interaction.Draw = function(options) { diff --git a/src/ol/interaction/interactiondefaults.exports b/src/ol/interaction/interactiondefaults.exports deleted file mode 100644 index 6a928864a2..0000000000 --- a/src/ol/interaction/interactiondefaults.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.defaults diff --git a/src/ol/interaction/interactiondefaults.js b/src/ol/interaction/interactiondefaults.js index cebb6c1e5b..d724dfc6ee 100644 --- a/src/ol/interaction/interactiondefaults.js +++ b/src/ol/interaction/interactiondefaults.js @@ -25,7 +25,7 @@ goog.require('ol.interaction.PinchZoom'); * @param {olx.interaction.DefaultsOptions=} opt_options Defaults options. * @return {ol.Collection} A collection of interactions to be used with * the ol.Map constructor's interactions option. - * @todo stability experimental + * @todo api */ ol.interaction.defaults = function(opt_options) { diff --git a/src/ol/interaction/keyboardpan.exports b/src/ol/interaction/keyboardpan.exports deleted file mode 100644 index a09f837004..0000000000 --- a/src/ol/interaction/keyboardpan.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.KeyboardPan diff --git a/src/ol/interaction/keyboardpaninteraction.js b/src/ol/interaction/keyboardpaninteraction.js index a500383f3a..1b9125c0fb 100644 --- a/src/ol/interaction/keyboardpaninteraction.js +++ b/src/ol/interaction/keyboardpaninteraction.js @@ -33,7 +33,7 @@ ol.interaction.KEYBOARD_PAN_DURATION = 100; * @constructor * @extends {ol.interaction.Interaction} * @param {olx.interaction.KeyboardPanOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.KeyboardPan = function(opt_options) { diff --git a/src/ol/interaction/keyboardzoom.exports b/src/ol/interaction/keyboardzoom.exports deleted file mode 100644 index 01a6a9d315..0000000000 --- a/src/ol/interaction/keyboardzoom.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.KeyboardZoom diff --git a/src/ol/interaction/keyboardzoominteraction.js b/src/ol/interaction/keyboardzoominteraction.js index 65db9890e7..4087619fb8 100644 --- a/src/ol/interaction/keyboardzoominteraction.js +++ b/src/ol/interaction/keyboardzoominteraction.js @@ -23,7 +23,7 @@ goog.require('ol.interaction.Interaction'); * @constructor * @param {olx.interaction.KeyboardZoomOptions=} opt_options Options. * @extends {ol.interaction.Interaction} - * @todo stability experimental + * @todo api */ ol.interaction.KeyboardZoom = function(opt_options) { diff --git a/src/ol/interaction/modifyinteraction.exports b/src/ol/interaction/modifyinteraction.exports deleted file mode 100644 index 60378a3759..0000000000 --- a/src/ol/interaction/modifyinteraction.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.Modify diff --git a/src/ol/interaction/modifyinteraction.js b/src/ol/interaction/modifyinteraction.js index dd4a589960..2aff57d691 100644 --- a/src/ol/interaction/modifyinteraction.js +++ b/src/ol/interaction/modifyinteraction.js @@ -40,6 +40,7 @@ ol.interaction.SegmentDataType; * @constructor * @extends {ol.interaction.Pointer} * @param {olx.interaction.ModifyOptions} options Options. + * @todo api */ ol.interaction.Modify = function(options) { diff --git a/src/ol/interaction/mousewheelzoom.exports b/src/ol/interaction/mousewheelzoom.exports deleted file mode 100644 index bd6f492da3..0000000000 --- a/src/ol/interaction/mousewheelzoom.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.MouseWheelZoom diff --git a/src/ol/interaction/mousewheelzoominteraction.js b/src/ol/interaction/mousewheelzoominteraction.js index 43834a5db2..cb7db3a2ab 100644 --- a/src/ol/interaction/mousewheelzoominteraction.js +++ b/src/ol/interaction/mousewheelzoominteraction.js @@ -28,7 +28,7 @@ ol.interaction.MOUSEWHEELZOOM_TIMEOUT_DURATION = 80; * @constructor * @extends {ol.interaction.Interaction} * @param {olx.interaction.MouseWheelZoomOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.MouseWheelZoom = function(opt_options) { diff --git a/src/ol/interaction/pinchrotateinteraction.exports b/src/ol/interaction/pinchrotateinteraction.exports deleted file mode 100644 index 91c10d7b0f..0000000000 --- a/src/ol/interaction/pinchrotateinteraction.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.PinchRotate diff --git a/src/ol/interaction/pinchrotateinteraction.js b/src/ol/interaction/pinchrotateinteraction.js index 3ae73f0a42..76c2d5355e 100644 --- a/src/ol/interaction/pinchrotateinteraction.js +++ b/src/ol/interaction/pinchrotateinteraction.js @@ -23,7 +23,7 @@ ol.interaction.ROTATE_ANIMATION_DURATION = 250; * @constructor * @extends {ol.interaction.Pointer} * @param {olx.interaction.PinchRotateOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.PinchRotate = function(opt_options) { diff --git a/src/ol/interaction/pinchzoominteraction.exports b/src/ol/interaction/pinchzoominteraction.exports deleted file mode 100644 index 4636cdfad8..0000000000 --- a/src/ol/interaction/pinchzoominteraction.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.interaction.PinchZoom diff --git a/src/ol/interaction/pinchzoominteraction.js b/src/ol/interaction/pinchzoominteraction.js index 06f3f45fd6..fc828b6ba6 100644 --- a/src/ol/interaction/pinchzoominteraction.js +++ b/src/ol/interaction/pinchzoominteraction.js @@ -17,7 +17,7 @@ goog.require('ol.interaction.Pointer'); * @constructor * @extends {ol.interaction.Pointer} * @param {olx.interaction.PinchZoomOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.PinchZoom = function(opt_options) { diff --git a/src/ol/interaction/selectinteraction.exports b/src/ol/interaction/selectinteraction.exports deleted file mode 100644 index eeccc7e10a..0000000000 --- a/src/ol/interaction/selectinteraction.exports +++ /dev/null @@ -1,3 +0,0 @@ -@exportSymbol ol.interaction.Select -@exportProperty ol.interaction.Select.prototype.getFeatures -@exportProperty ol.interaction.Select.prototype.setMap diff --git a/src/ol/interaction/selectinteraction.js b/src/ol/interaction/selectinteraction.js index 30bad1a3a3..8c4f669f45 100644 --- a/src/ol/interaction/selectinteraction.js +++ b/src/ol/interaction/selectinteraction.js @@ -18,7 +18,7 @@ goog.require('ol.interaction.Interaction'); * @constructor * @extends {ol.interaction.Interaction} * @param {olx.interaction.SelectOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.interaction.Select = function(opt_options) { @@ -100,7 +100,7 @@ goog.inherits(ol.interaction.Select, ol.interaction.Interaction); /** * @return {ol.Collection} Features collection. - * @todo stability experimental + * @todo api */ ol.interaction.Select.prototype.getFeatures = function() { return this.featureOverlay_.getFeatures(); @@ -170,7 +170,10 @@ ol.interaction.Select.prototype.handleMapBrowserEvent = /** - * @inheritDoc + * Remove the interaction from its current map, if any, and attach it to a new + * map, if any. Pass `null` to just remove the interaction from the current map. + * @param {ol.Map} map Map. + * @todo api */ ol.interaction.Select.prototype.setMap = function(map) { var currentMap = this.getMap(); diff --git a/src/ol/iview2d.js b/src/ol/iview2d.js index dcdf0c9f22..4e1a4e6d2d 100644 --- a/src/ol/iview2d.js +++ b/src/ol/iview2d.js @@ -14,7 +14,6 @@ ol.IView2D = function() { /** * @return {ol.Coordinate|undefined} Map center. - * @todo stability experimental */ ol.IView2D.prototype.getCenter = function() { }; @@ -22,7 +21,6 @@ ol.IView2D.prototype.getCenter = function() { /** * @return {ol.proj.Projection|undefined} Map projection. - * @todo stability experimental */ ol.IView2D.prototype.getProjection = function() { }; @@ -30,7 +28,6 @@ ol.IView2D.prototype.getProjection = function() { /** * @return {number|undefined} Map resolution. - * @todo stability experimental */ ol.IView2D.prototype.getResolution = function() { }; @@ -38,7 +35,6 @@ ol.IView2D.prototype.getResolution = function() { /** * @return {number|undefined} Map rotation. - * @todo stability experimental */ ol.IView2D.prototype.getRotation = function() { }; diff --git a/src/ol/kinetic.exports b/src/ol/kinetic.exports deleted file mode 100644 index aa3f543286..0000000000 --- a/src/ol/kinetic.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.Kinetic diff --git a/src/ol/kinetic.js b/src/ol/kinetic.js index 6be0b123f9..d8e704391a 100644 --- a/src/ol/kinetic.js +++ b/src/ol/kinetic.js @@ -13,7 +13,7 @@ goog.require('ol.animation'); * @param {number} delay Delay to consider to calculate the kinetic * initial values (milliseconds). * @struct - * @todo stability experimental + * @todo api */ ol.Kinetic = function(decay, minVelocity, delay) { diff --git a/src/ol/layer/heatmaplayer.exports b/src/ol/layer/heatmaplayer.exports deleted file mode 100644 index be2de928b7..0000000000 --- a/src/ol/layer/heatmaplayer.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.layer.Heatmap diff --git a/src/ol/layer/heatmaplayer.js b/src/ol/layer/heatmaplayer.js index 6ddd2b9120..ff756312f6 100644 --- a/src/ol/layer/heatmaplayer.js +++ b/src/ol/layer/heatmaplayer.js @@ -25,7 +25,7 @@ ol.layer.HeatmapLayerProperty = { * @extends {ol.layer.Vector} * @fires {@link ol.render.Event} ol.render.Event * @param {olx.layer.HeatmapOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.layer.Heatmap = function(opt_options) { var options = goog.isDef(opt_options) ? opt_options : {}; diff --git a/src/ol/layer/imagelayer.exports b/src/ol/layer/imagelayer.exports deleted file mode 100644 index 0027269144..0000000000 --- a/src/ol/layer/imagelayer.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.layer.Image diff --git a/src/ol/layer/imagelayer.js b/src/ol/layer/imagelayer.js index dfa37cfe40..22414b83b5 100644 --- a/src/ol/layer/imagelayer.js +++ b/src/ol/layer/imagelayer.js @@ -9,7 +9,7 @@ goog.require('ol.layer.Layer'); * @extends {ol.layer.Layer} * @fires {@link ol.render.Event} ol.render.Event * @param {olx.layer.LayerOptions} options Layer options. - * @todo stability experimental + * @todo api */ ol.layer.Image = function(options) { goog.base(this, options); diff --git a/src/ol/layer/layer.exports b/src/ol/layer/layer.exports deleted file mode 100644 index 1bc8b440a7..0000000000 --- a/src/ol/layer/layer.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.layer.Layer -@exportProperty ol.layer.Layer.prototype.getSource diff --git a/src/ol/layer/layer.js b/src/ol/layer/layer.js index 55850bafb5..26bffd25cd 100644 --- a/src/ol/layer/layer.js +++ b/src/ol/layer/layer.js @@ -14,7 +14,6 @@ goog.require('ol.source.Source'); * @extends {ol.layer.Base} * @fires {@link ol.render.Event} ol.render.Event * @param {olx.layer.LayerOptions} options Layer options. - * @todo stability experimental * @todo observable brightness {number} the brightness of the layer * @todo observable contrast {number} the contrast of the layer * @todo observable hue {number} the hue of the layer @@ -23,6 +22,7 @@ goog.require('ol.source.Source'); * @todo observable visible {boolean} the visiblity of the layer * @todo observable maxResolution {number} the maximum resolution of the layer * @todo observable minResolution {number} the minimum resolution of the layer + * @todo api */ ol.layer.Layer = function(options) { @@ -66,7 +66,7 @@ ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) { /** * @return {ol.source.Source} Source. - * @todo stability experimental + * @todo api */ ol.layer.Layer.prototype.getSource = function() { return this.source_; diff --git a/src/ol/layer/layerbase.js b/src/ol/layer/layerbase.js index a55b2b9aa4..1ba6792803 100644 --- a/src/ol/layer/layerbase.js +++ b/src/ol/layer/layerbase.js @@ -41,6 +41,8 @@ ol.layer.LayerState; /** + * Base class for all layers. The most basic implementation is + * {@link ol.layer.Layer}. See {@link ol.layer} for all implementations. * @constructor * @extends {ol.Object} * @param {olx.layer.BaseOptions} options Layer options. @@ -77,6 +79,7 @@ goog.inherits(ol.layer.Base, ol.Object); /** * @return {number|undefined} Brightness. + * @todo api */ ol.layer.Base.prototype.getBrightness = function() { return /** @type {number|undefined} */ ( @@ -90,6 +93,7 @@ goog.exportProperty( /** * @return {number|undefined} Contrast. + * @todo api */ ol.layer.Base.prototype.getContrast = function() { return /** @type {number|undefined} */ ( @@ -103,6 +107,7 @@ goog.exportProperty( /** * @return {number|undefined} Hue. + * @todo api */ ol.layer.Base.prototype.getHue = function() { return /** @type {number|undefined} */ (this.get(ol.layer.LayerProperty.HUE)); @@ -159,6 +164,7 @@ ol.layer.Base.prototype.getLayerStatesArray = goog.abstractMethod; /** * @return {number|undefined} MaxResolution. + * @todo api */ ol.layer.Base.prototype.getMaxResolution = function() { return /** @type {number|undefined} */ ( @@ -172,6 +178,7 @@ goog.exportProperty( /** * @return {number|undefined} MinResolution. + * @todo api */ ol.layer.Base.prototype.getMinResolution = function() { return /** @type {number|undefined} */ ( @@ -185,6 +192,7 @@ goog.exportProperty( /** * @return {number|undefined} Opacity. + * @todo api */ ol.layer.Base.prototype.getOpacity = function() { return /** @type {number|undefined} */ ( @@ -198,6 +206,7 @@ goog.exportProperty( /** * @return {number|undefined} Saturation. + * @todo api */ ol.layer.Base.prototype.getSaturation = function() { return /** @type {number|undefined} */ ( @@ -217,6 +226,7 @@ ol.layer.Base.prototype.getSourceState = goog.abstractMethod; /** * @return {boolean|undefined} Visible. + * @todo api */ ol.layer.Base.prototype.getVisible = function() { return /** @type {boolean|undefined} */ ( @@ -247,6 +257,7 @@ goog.exportProperty( * [3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647 * * @param {number|undefined} brightness Brightness. + * @todo api */ ol.layer.Base.prototype.setBrightness = function(brightness) { this.set(ol.layer.LayerProperty.BRIGHTNESS, brightness); @@ -263,6 +274,7 @@ goog.exportProperty( * linear multipliers on the effect (and values over 1 are permitted). * * @param {number|undefined} contrast Contrast. + * @todo api */ ol.layer.Base.prototype.setContrast = function(contrast) { this.set(ol.layer.LayerProperty.CONTRAST, contrast); @@ -277,6 +289,7 @@ goog.exportProperty( * Apply a hue-rotation to the layer. A value of 0 will leave the hue * unchanged. Other values are radians around the color circle. * @param {number|undefined} hue Hue. + * @todo api */ ol.layer.Base.prototype.setHue = function(hue) { this.set(ol.layer.LayerProperty.HUE, hue); @@ -289,6 +302,7 @@ goog.exportProperty( /** * @param {number|undefined} maxResolution MaxResolution. + * @todo api */ ol.layer.Base.prototype.setMaxResolution = function(maxResolution) { this.set(ol.layer.LayerProperty.MAX_RESOLUTION, maxResolution); @@ -301,6 +315,7 @@ goog.exportProperty( /** * @param {number|undefined} minResolution MinResolution. + * @todo api */ ol.layer.Base.prototype.setMinResolution = function(minResolution) { this.set(ol.layer.LayerProperty.MIN_RESOLUTION, minResolution); @@ -313,6 +328,7 @@ goog.exportProperty( /** * @param {number|undefined} opacity Opacity. + * @todo api */ ol.layer.Base.prototype.setOpacity = function(opacity) { this.set(ol.layer.LayerProperty.OPACITY, opacity); @@ -330,6 +346,7 @@ goog.exportProperty( * permitted). * * @param {number|undefined} saturation Saturation. + * @todo api */ ol.layer.Base.prototype.setSaturation = function(saturation) { this.set(ol.layer.LayerProperty.SATURATION, saturation); @@ -342,6 +359,7 @@ goog.exportProperty( /** * @param {boolean|undefined} visible Visible. + * @todo api */ ol.layer.Base.prototype.setVisible = function(visible) { this.set(ol.layer.LayerProperty.VISIBLE, visible); diff --git a/src/ol/layer/layergroup.exports b/src/ol/layer/layergroup.exports deleted file mode 100644 index 54bd439663..0000000000 --- a/src/ol/layer/layergroup.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.layer.Group diff --git a/src/ol/layer/layergroup.js b/src/ol/layer/layergroup.js index d814571de3..bc793ae5ea 100644 --- a/src/ol/layer/layergroup.js +++ b/src/ol/layer/layergroup.js @@ -28,9 +28,9 @@ ol.layer.GroupProperty = { * @constructor * @extends {ol.layer.Base} * @param {olx.layer.GroupOptions=} opt_options Layer options. - * @todo stability experimental - * @todo observable layers {ol.Collection} collection of layers that are part - * of this group + * @todo observable layers {ol.Collection} collection of {@link ol.layer} layers + * that are part of this group + * @todo api */ ol.layer.Group = function(opt_options) { @@ -143,7 +143,6 @@ ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) { /** * @return {ol.Collection|undefined} Collection of layers. - * @todo stability experimental */ ol.layer.Group.prototype.getLayers = function() { return /** @type {ol.Collection|undefined} */ (this.get( @@ -157,7 +156,6 @@ goog.exportProperty( /** * @param {ol.Collection|undefined} layers Collection of layers. - * @todo stability experimental */ ol.layer.Group.prototype.setLayers = function(layers) { this.set(ol.layer.GroupProperty.LAYERS, layers); diff --git a/src/ol/layer/tilelayer.exports b/src/ol/layer/tilelayer.exports deleted file mode 100644 index 941be6ffc8..0000000000 --- a/src/ol/layer/tilelayer.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.layer.Tile diff --git a/src/ol/layer/tilelayer.js b/src/ol/layer/tilelayer.js index 0d4cfa3ce2..502f8aefaf 100644 --- a/src/ol/layer/tilelayer.js +++ b/src/ol/layer/tilelayer.js @@ -18,8 +18,8 @@ ol.layer.TileProperty = { * @extends {ol.layer.Layer} * @fires {@link ol.render.Event} ol.render.Event * @param {olx.layer.TileOptions} options Tile layer options. - * @todo stability experimental * @todo observable preload {number} the level to preload tiles up to + * @todo api */ ol.layer.Tile = function(options) { goog.base(this, options); @@ -30,7 +30,6 @@ goog.inherits(ol.layer.Tile, ol.layer.Layer); /** * @return {number|undefined} Preload. - * @todo stability experimental */ ol.layer.Tile.prototype.getPreload = function() { return /** @type {number|undefined} */ ( @@ -44,7 +43,6 @@ goog.exportProperty( /** * @param {number} preload Preload. - * @todo stability experimental */ ol.layer.Tile.prototype.setPreload = function(preload) { this.set(ol.layer.TileProperty.PRELOAD, preload); @@ -57,7 +55,6 @@ goog.exportProperty( /** * @return {boolean|undefined} Use interim tiles on error. - * @todo stability experimental */ ol.layer.Tile.prototype.getUseInterimTilesOnError = function() { return /** @type {boolean|undefined} */ ( @@ -71,7 +68,6 @@ goog.exportProperty( /** * @param {boolean|undefined} useInterimTilesOnError Use interim tiles on error. - * @todo stability experimental */ ol.layer.Tile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) { diff --git a/src/ol/layer/vectorlayer.exports b/src/ol/layer/vectorlayer.exports deleted file mode 100644 index be493b810d..0000000000 --- a/src/ol/layer/vectorlayer.exports +++ /dev/null @@ -1,4 +0,0 @@ -@exportSymbol ol.layer.Vector -@exportProperty ol.layer.Vector.prototype.getStyle -@exportProperty ol.layer.Vector.prototype.getStyleFunction -@exportProperty ol.layer.Vector.prototype.setStyle diff --git a/src/ol/layer/vectorlayer.js b/src/ol/layer/vectorlayer.js index 5b457dff48..5252255461 100644 --- a/src/ol/layer/vectorlayer.js +++ b/src/ol/layer/vectorlayer.js @@ -21,7 +21,7 @@ ol.layer.VectorProperty = { * @extends {ol.layer.Layer} * @fires {@link ol.render.Event} ol.render.Event * @param {olx.layer.VectorOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.layer.Vector = function(opt_options) { @@ -70,6 +70,7 @@ ol.layer.Vector.prototype.getRenderOrder = function() { * option at construction or to the `setStyle` method. * @return {ol.style.Style|Array.|ol.feature.StyleFunction} * Layer style. + * @todo api */ ol.layer.Vector.prototype.getStyle = function() { return this.style_; @@ -79,7 +80,7 @@ ol.layer.Vector.prototype.getStyle = function() { /** * Get the style function. * @return {ol.feature.StyleFunction|undefined} Layer style function. - * @todo stability experimental + * @todo api */ ol.layer.Vector.prototype.getStyleFunction = function() { return this.styleFunction_; @@ -101,7 +102,7 @@ ol.layer.Vector.prototype.setRenderOrder = function(renderOrder) { * an array of styles. * @param {ol.style.Style|Array.|ol.feature.StyleFunction} style * Layer style. - * @todo stability experimental + * @todo api */ ol.layer.Vector.prototype.setStyle = function(style) { this.style_ = style; diff --git a/src/ol/loadingstrategy.exports b/src/ol/loadingstrategy.exports deleted file mode 100644 index 711262d776..0000000000 --- a/src/ol/loadingstrategy.exports +++ /dev/null @@ -1,3 +0,0 @@ -@exportSymbol ol.loadingstrategy.all -@exportSymbol ol.loadingstrategy.bbox -@exportSymbol ol.loadingstrategy.createTile diff --git a/src/ol/loadingstrategy.js b/src/ol/loadingstrategy.js index 58a5dd4b3b..a6af39a671 100644 --- a/src/ol/loadingstrategy.js +++ b/src/ol/loadingstrategy.js @@ -7,6 +7,7 @@ goog.require('ol.TileCoord'); * @param {ol.Extent} extent Extent. * @param {number} resolution Resolution. * @return {Array.} Extents. + * @todo api */ ol.loadingstrategy.all = function(extent, resolution) { return [[-Infinity, -Infinity, Infinity, Infinity]]; @@ -17,6 +18,7 @@ ol.loadingstrategy.all = function(extent, resolution) { * @param {ol.Extent} extent Extent. * @param {number} resolution Resolution. * @return {Array.} Extents. + * @todo api */ ol.loadingstrategy.bbox = function(extent, resolution) { return [extent]; @@ -26,6 +28,7 @@ ol.loadingstrategy.bbox = function(extent, resolution) { /** * @param {ol.tilegrid.TileGrid} tileGrid Tile grid. * @return {function(ol.Extent, number): Array.} Loading strategy. + * @todo api */ ol.loadingstrategy.createTile = function(tileGrid) { return ( diff --git a/src/ol/map.exports b/src/ol/map.exports deleted file mode 100644 index 53dcfd0a63..0000000000 --- a/src/ol/map.exports +++ /dev/null @@ -1,23 +0,0 @@ -@exportSymbol ol.Map -@exportProperty ol.Map.prototype.addControl -@exportProperty ol.Map.prototype.addInteraction -@exportProperty ol.Map.prototype.addLayer -@exportProperty ol.Map.prototype.addOverlay -@exportProperty ol.Map.prototype.beforeRender -@exportProperty ol.Map.prototype.forEachFeatureAtPixel -@exportProperty ol.Map.prototype.getControls -@exportProperty ol.Map.prototype.getCoordinateFromPixel -@exportProperty ol.Map.prototype.getEventCoordinate -@exportProperty ol.Map.prototype.getEventPixel -@exportProperty ol.Map.prototype.getInteractions -@exportProperty ol.Map.prototype.getLayers -@exportProperty ol.Map.prototype.getOverlays -@exportProperty ol.Map.prototype.getPixelFromCoordinate -@exportProperty ol.Map.prototype.getViewport -@exportProperty ol.Map.prototype.removeControl -@exportProperty ol.Map.prototype.removeInteraction -@exportProperty ol.Map.prototype.removeLayer -@exportProperty ol.Map.prototype.removeOverlay -@exportProperty ol.Map.prototype.render -@exportProperty ol.Map.prototype.renderSync -@exportProperty ol.Map.prototype.updateSize diff --git a/src/ol/map.js b/src/ol/map.js index de4181a09b..05f180dc17 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -99,8 +99,9 @@ ol.OL3_LOGO_URL = 'data:image/png;base64,' + /** + * Available renderers: `'canvas'`, `'dom'` or `'webgl'`. * @enum {string} - * @todo stability experimental + * @todo api */ ol.RendererHint = { CANVAS: 'canvas', @@ -158,13 +159,13 @@ ol.MapProperty = { * @fires {@link ol.MapBrowserEvent} ol.MapBrowserEvent * @fires {@link ol.MapEvent} ol.MapEvent * @fires {@link ol.render.Event} ol.render.Event - * @todo stability experimental - * @todo observable layergroup {ol.layer.LayerGroup} a layer group containing - * the layers in this map. + * @todo observable layergroup {ol.layer.Group} a layer group containing the + * layers in this map. * @todo observable size {ol.Size} the size in pixels of the map in the DOM * @todo observable target {string|Element} the Element or id of the Element * that the map is rendered in. * @todo observable view {ol.IView} the view that controls this map + * @todo api */ ol.Map = function(options) { @@ -465,7 +466,7 @@ goog.inherits(ol.Map, ol.Object); /** * Add the given control to the map. * @param {ol.control.Control} control Control. - * @todo stability experimental + * @todo api */ ol.Map.prototype.addControl = function(control) { var controls = this.getControls(); @@ -477,6 +478,7 @@ ol.Map.prototype.addControl = function(control) { /** * Add the given interaction to the map. * @param {ol.interaction.Interaction} interaction Interaction to add. + * @todo api */ ol.Map.prototype.addInteraction = function(interaction) { var interactions = this.getInteractions(); @@ -488,7 +490,7 @@ ol.Map.prototype.addInteraction = function(interaction) { /** * Adds the given layer to the top of this map. * @param {ol.layer.Base} layer Layer. - * @todo stability experimental + * @todo api */ ol.Map.prototype.addLayer = function(layer) { var layers = this.getLayerGroup().getLayers(); @@ -500,7 +502,7 @@ ol.Map.prototype.addLayer = function(layer) { /** * Add the given overlay to the map. * @param {ol.Overlay} overlay Overlay. - * @todo stability experimental + * @todo api */ ol.Map.prototype.addOverlay = function(overlay) { var overlays = this.getOverlays(); @@ -514,7 +516,7 @@ ol.Map.prototype.addOverlay = function(overlay) { * animations before updating the map's view. The {@link ol.animation} * namespace provides several static methods for creating prerender functions. * @param {...ol.PreRenderFunction} var_args Any number of pre-render functions. - * @todo stability experimental + * @todo api */ ol.Map.prototype.beforeRender = function(var_args) { this.render(); @@ -553,6 +555,7 @@ ol.Map.prototype.disposeInternal = function() { * @param {U=} opt_this2 Value to use as `this` when executing `layerFilter`. * @return {T|undefined} Callback result. * @template S,T,U + * @todo api */ ol.Map.prototype.forEachFeatureAtPixel = function(pixel, callback, opt_this, opt_layerFilter, opt_this2) { @@ -574,7 +577,7 @@ ol.Map.prototype.forEachFeatureAtPixel = * Returns the geographical coordinate for a browser event. * @param {Event} event Event. * @return {ol.Coordinate} Coordinate. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getEventCoordinate = function(event) { return this.getCoordinateFromPixel(this.getEventPixel(event)); @@ -585,7 +588,7 @@ ol.Map.prototype.getEventCoordinate = function(event) { * Returns the map pixel position for a browser event. * @param {Event} event Event. * @return {ol.Pixel} Pixel. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getEventPixel = function(event) { // goog.style.getRelativePosition is based on event.targetTouches, @@ -612,7 +615,7 @@ ol.Map.prototype.getEventPixel = function(event) { * Note that this returns what is entered as an option or in setTarget: * if that was an element, it returns an element; if a string, it returns that. * @return {Element|string|undefined} Target. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getTarget = function() { return /** @type {Element|string|undefined} */ ( @@ -627,6 +630,7 @@ goog.exportProperty( /** * @param {ol.Pixel} pixel Pixel. * @return {ol.Coordinate} Coordinate. + * @todo api */ ol.Map.prototype.getCoordinateFromPixel = function(pixel) { var frameState = this.frameState_; @@ -641,7 +645,7 @@ ol.Map.prototype.getCoordinateFromPixel = function(pixel) { /** * @return {ol.Collection} Controls. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getControls = function() { return this.controls_; @@ -650,7 +654,7 @@ ol.Map.prototype.getControls = function() { /** * @return {ol.Collection} Overlays. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getOverlays = function() { return this.overlays_; @@ -665,7 +669,7 @@ ol.Map.prototype.getOverlays = function() { * * Interactions are used for e.g. pan, zoom and rotate. * @return {ol.Collection} Interactions. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getInteractions = function() { return this.interactions_; @@ -675,7 +679,7 @@ ol.Map.prototype.getInteractions = function() { /** * Get the layergroup associated with this map. * @return {ol.layer.Group} LayerGroup. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getLayerGroup = function() { return /** @type {ol.layer.Group} */ ( @@ -690,7 +694,7 @@ goog.exportProperty( /** * Get the collection of layers associated with this map. * @return {ol.Collection|undefined} Layers. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getLayers = function() { var layerGroup = this.getLayerGroup(); @@ -705,6 +709,7 @@ ol.Map.prototype.getLayers = function() { /** * @param {ol.Coordinate} coordinate Coordinate. * @return {ol.Pixel} Pixel. + * @todo api */ ol.Map.prototype.getPixelFromCoordinate = function(coordinate) { var frameState = this.frameState_; @@ -720,7 +725,7 @@ ol.Map.prototype.getPixelFromCoordinate = function(coordinate) { /** * Get the size of this map. * @return {ol.Size|undefined} Size. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getSize = function() { return /** @type {ol.Size|undefined} */ (this.get(ol.MapProperty.SIZE)); @@ -735,7 +740,7 @@ goog.exportProperty( * Get the view associated with this map. This can be a 2D or 3D view. A 2D * view manages properties such as center and resolution. * @return {ol.View|undefined} View. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getView = function() { return /** @type {ol.View} */ (this.get(ol.MapProperty.VIEW)); @@ -748,7 +753,7 @@ goog.exportProperty( /** * @return {Element} Viewport. - * @todo stability experimental + * @todo api */ ol.Map.prototype.getViewport = function() { return this.viewport_; @@ -1058,6 +1063,7 @@ ol.Map.prototype.isRendered = function() { /** * Render. + * @todo api */ ol.Map.prototype.renderSync = function() { this.animationDelay_.fire(); @@ -1066,6 +1072,7 @@ ol.Map.prototype.renderSync = function() { /** * Request that renderFrame_ be called some time in the future. + * @todo api */ ol.Map.prototype.render = function() { if (!this.animationDelay_.isActive()) { @@ -1079,7 +1086,7 @@ ol.Map.prototype.render = function() { * @param {ol.control.Control} control Control. * @return {ol.control.Control|undefined} The removed control of undefined * if the control was not found. - * @todo stability experimental + * @todo api */ ol.Map.prototype.removeControl = function(control) { var controls = this.getControls(); @@ -1096,6 +1103,7 @@ ol.Map.prototype.removeControl = function(control) { * @param {ol.interaction.Interaction} interaction Interaction to remove. * @return {ol.interaction.Interaction|undefined} The removed interaction (or * undefined if the interaction was not found). + * @todo api */ ol.Map.prototype.removeInteraction = function(interaction) { var removed; @@ -1113,7 +1121,7 @@ ol.Map.prototype.removeInteraction = function(interaction) { * @param {ol.layer.Base} layer Layer. * @return {ol.layer.Base|undefined} The removed layer or undefined if the * layer was not found. - * @todo stability experimental + * @todo api */ ol.Map.prototype.removeLayer = function(layer) { var layers = this.getLayerGroup().getLayers(); @@ -1127,7 +1135,7 @@ ol.Map.prototype.removeLayer = function(layer) { * @param {ol.Overlay} overlay Overlay. * @return {ol.Overlay|undefined} The removed overlay of undefined * if the overlay was not found. - * @todo stability experimental + * @todo api */ ol.Map.prototype.removeOverlay = function(overlay) { var overlays = this.getOverlays(); @@ -1249,7 +1257,7 @@ ol.Map.prototype.renderFrame_ = function(time) { /** * Sets the layergroup of this map. * @param {ol.layer.Group} layerGroup Layergroup. - * @todo stability experimental + * @todo api */ ol.Map.prototype.setLayerGroup = function(layerGroup) { this.set(ol.MapProperty.LAYERGROUP, layerGroup); @@ -1263,7 +1271,7 @@ goog.exportProperty( /** * Set the size of this map. * @param {ol.Size|undefined} size Size. - * @todo stability experimental + * @todo api */ ol.Map.prototype.setSize = function(size) { this.set(ol.MapProperty.SIZE, size); @@ -1277,7 +1285,7 @@ goog.exportProperty( /** * Set the target element to render this map into. * @param {Element|string|undefined} target Target. - * @todo stability experimental + * @todo api */ ol.Map.prototype.setTarget = function(target) { this.set(ol.MapProperty.TARGET, target); @@ -1289,9 +1297,9 @@ goog.exportProperty( /** - * Set the view for this map. + * Set the view for this map. Currently {@link ol.View2D} is implememnted. * @param {ol.IView} view View. - * @todo stability experimental + * @todo api */ ol.Map.prototype.setView = function(view) { this.set(ol.MapProperty.VIEW, view); @@ -1315,7 +1323,7 @@ ol.Map.prototype.skipFeature = function(feature) { /** * Force a recalculation of the map viewport size. This should be called when * third-party code changes the size of the map viewport. - * @todo stability experimental + * @todo api */ ol.Map.prototype.updateSize = function() { var target = this.getTarget(); diff --git a/src/ol/mapbrowserevent.exports b/src/ol/mapbrowserevent.exports deleted file mode 100644 index 0ad1d2a276..0000000000 --- a/src/ol/mapbrowserevent.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportProperty ol.MapBrowserEvent.prototype.preventDefault -@exportProperty ol.MapBrowserEvent.prototype.stopPropagation diff --git a/src/ol/mapbrowserevent.js b/src/ol/mapbrowserevent.js index 31b7b4f6d3..ed2fbb4322 100644 --- a/src/ol/mapbrowserevent.js +++ b/src/ol/mapbrowserevent.js @@ -26,7 +26,6 @@ goog.require('ol.pointer.PointerEventHandler'); * @param {ol.Map} map Map. * @param {goog.events.BrowserEvent} browserEvent Browser event. * @param {?oli.FrameState=} opt_frameState Frame state. - * @todo stability experimental */ ol.MapBrowserEvent = function(type, map, browserEvent, opt_frameState) { @@ -41,19 +40,16 @@ ol.MapBrowserEvent = function(type, map, browserEvent, opt_frameState) { /** * @const * @type {Event} - * @todo stability experimental */ this.originalEvent = browserEvent.getBrowserEvent(); /** * @type {ol.Coordinate} - * @todo stability experimental */ this.coordinate = map.getEventCoordinate(this.originalEvent); /** * @type {ol.Pixel} - * @todo stability experimental */ this.pixel = map.getEventPixel(this.originalEvent); @@ -65,7 +61,7 @@ goog.inherits(ol.MapBrowserEvent, ol.MapEvent); * Prevents the default browser action. * @see https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault * @override - * @todo stability experimental + * @todo api */ ol.MapBrowserEvent.prototype.preventDefault = function() { goog.base(this, 'preventDefault'); @@ -77,7 +73,7 @@ ol.MapBrowserEvent.prototype.preventDefault = function() { * Prevents further propagation of the current event. * @see https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation * @override - * @todo stability experimental + * @todo api */ ol.MapBrowserEvent.prototype.stopPropagation = function() { goog.base(this, 'stopPropagation'); @@ -93,7 +89,6 @@ ol.MapBrowserEvent.prototype.stopPropagation = function() { * @param {ol.Map} map Map. * @param {ol.pointer.PointerEvent} pointerEvent Pointer event. * @param {?oli.FrameState=} opt_frameState Frame state. - * @todo stability experimental */ ol.MapBrowserPointerEvent = function(type, map, pointerEvent, opt_frameState) { @@ -471,25 +466,25 @@ ol.MapBrowserEvent.EventType = { * A true single click with no dragging and no double click. Note that this * event is delayed by 250 ms to ensure that it is not a double click. * @event ol.MapBrowserEvent#singleclick - * @todo stability experimental + * @todo api */ SINGLECLICK: 'singleclick', /** * A click with no dragging. A double click will fire two of this. * @event ol.MapBrowserEvent#click - * @todo stability experimental + * @todo api */ CLICK: goog.events.EventType.CLICK, /** * A true double click, with no dragging. * @event ol.MapBrowserEvent#dblclick - * @todo stability experimental + * @todo api */ DBLCLICK: goog.events.EventType.DBLCLICK, /** * Triggered when a pointer is dragged. * @event ol.MapBrowserEvent#pointerdrag - * @todo stability experimental + * @todo api */ POINTERDRAG: 'pointerdrag', @@ -497,7 +492,7 @@ ol.MapBrowserEvent.EventType = { /** * Triggered when a pointer is moved. * @event ol.MapBrowserEvent#pointermove - * @todo stability experimental + * @todo api */ POINTERMOVE: 'pointermove', POINTERDOWN: 'pointerdown', diff --git a/src/ol/mapevent.js b/src/ol/mapevent.js index db97c66063..f6279cce22 100644 --- a/src/ol/mapevent.js +++ b/src/ol/mapevent.js @@ -11,13 +11,13 @@ ol.MapEventType = { /** * Triggered after a map frame is rendered. * @event ol.MapEvent#postrender - * @todo stability experimental + * @todo api */ POSTRENDER: 'postrender', /** * Triggered after the map is moved. * @event ol.MapEvent#moveend - * @todo stability experimental + * @todo api */ MOVEEND: 'moveend' }; diff --git a/src/ol/object.exports b/src/ol/object.exports deleted file mode 100644 index 9a647cc6db..0000000000 --- a/src/ol/object.exports +++ /dev/null @@ -1,10 +0,0 @@ -@exportSymbol ol.Object -@exportProperty ol.Object.prototype.bindTo -@exportProperty ol.Object.prototype.get -@exportProperty ol.Object.prototype.getKeys -@exportProperty ol.Object.prototype.getProperties -@exportProperty ol.Object.prototype.notify -@exportProperty ol.Object.prototype.set -@exportProperty ol.Object.prototype.setValues -@exportProperty ol.Object.prototype.unbind -@exportProperty ol.Object.prototype.unbindAll diff --git a/src/ol/object.js b/src/ol/object.js index 1c27959761..ecab3f413e 100644 --- a/src/ol/object.js +++ b/src/ol/object.js @@ -23,13 +23,13 @@ ol.ObjectEventType = { /** * Triggered before a property is changed. * @event ol.ObjectEvent#beforepropertychange - * @todo stability experimental + * @todo api */ BEFOREPROPERTYCHANGE: 'beforepropertychange', /** * Triggered when a property is changed. * @event ol.ObjectEvent#propertychange - * @todo stability experimental + * @todo api */ PROPERTYCHANGE: 'propertychange' }; @@ -63,7 +63,6 @@ goog.inherits(ol.ObjectEvent, goog.events.Event); * @constructor * @param {ol.Object} target * @param {string} key - * @todo stability experimental */ ol.ObjectAccessor = function(target, key) { @@ -110,7 +109,7 @@ ol.ObjectAccessor.prototype.transform = function(from, to) { * @extends {ol.Observable} * @param {Object.=} opt_values Values. * @fires {@link ol.ObjectEvent} ol.ObjectEvent - * @todo stability experimental + * @todo api */ ol.Object = function(opt_values) { goog.base(this); @@ -243,7 +242,7 @@ ol.Object.getSetterName = function(key) { * @param {ol.Object} target Target. * @param {string=} opt_targetKey Target key. * @return {ol.ObjectAccessor} - * @todo stability experimental + * @todo api */ ol.Object.prototype.bindTo = function(key, target, opt_targetKey) { var targetKey = opt_targetKey || key; @@ -300,7 +299,7 @@ ol.Object.prototype.createBeforeChangeListener_ = function(key, targetKey) { * Gets a value. * @param {string} key Key name. * @return {*} Value. - * @todo stability experimental + * @todo api */ ol.Object.prototype.get = function(key) { var value; @@ -328,6 +327,7 @@ ol.Object.prototype.get = function(key) { /** * Get a list of object property names. * @return {Array.} List of property names. + * @todo api */ ol.Object.prototype.getKeys = function() { var accessors = this.accessors_; @@ -359,7 +359,7 @@ ol.Object.prototype.getKeys = function() { /** * Get an object of all property names and values. * @return {Object.} Object. - * @todo stability experimental + * @todo api */ ol.Object.prototype.getProperties = function() { var properties = {}; @@ -379,7 +379,7 @@ ol.Object.prototype.getProperties = function() { * objects that are bound to the object's property as well as the object * that it is bound to. * @param {string} key Key name. - * @todo stability experimental + * @todo api */ ol.Object.prototype.notify = function(key) { var accessors = this.accessors_; @@ -410,7 +410,7 @@ ol.Object.prototype.notifyInternal_ = function(key) { * Sets a value. * @param {string} key Key name. * @param {*} value Value. - * @todo stability experimental + * @todo api */ ol.Object.prototype.set = function(key, value) { this.dispatchEvent( @@ -439,7 +439,7 @@ ol.Object.prototype.set = function(key, value) { /** * Sets a collection of key-value pairs. * @param {Object.} values Values. - * @todo stability experimental + * @todo api */ ol.Object.prototype.setValues = function(values) { var key; @@ -453,7 +453,7 @@ ol.Object.prototype.setValues = function(values) { * Removes a binding. Unbinding will set the unbound property to the current * value. The object will not be notified, as the value has not changed. * @param {string} key Key name. - * @todo stability experimental + * @todo api */ ol.Object.prototype.unbind = function(key) { var listeners = this.listeners_; @@ -477,7 +477,7 @@ ol.Object.prototype.unbind = function(key) { /** * Removes all bindings. - * @todo stability experimental + * @todo api */ ol.Object.prototype.unbindAll = function() { for (var key in this.listeners_) { diff --git a/src/ol/observable.exports b/src/ol/observable.exports deleted file mode 100644 index cd9d88898b..0000000000 --- a/src/ol/observable.exports +++ /dev/null @@ -1,6 +0,0 @@ -@exportSymbol ol.Observable -@exportProperty ol.Observable.prototype.dispatchChangeEvent -@exportProperty ol.Observable.prototype.on -@exportProperty ol.Observable.prototype.once -@exportProperty ol.Observable.prototype.un -@exportProperty ol.Observable.prototype.unByKey diff --git a/src/ol/observable.js b/src/ol/observable.js index 6d1f23d44a..379a372058 100644 --- a/src/ol/observable.js +++ b/src/ol/observable.js @@ -14,7 +14,7 @@ goog.require('goog.events.EventType'); * @extends {goog.events.EventTarget} * @suppress {checkStructDictInheritance} * @struct - * @todo stability experimental + * @todo api */ ol.Observable = function() { @@ -34,7 +34,7 @@ goog.inherits(ol.Observable, goog.events.EventTarget); * Dispatches a `change` event. Register a listener for this event to get * notified of changes. * @fires change - * @todo stability experimental + * @todo api */ ol.Observable.prototype.dispatchChangeEvent = function() { ++this.revision_; @@ -44,7 +44,6 @@ ol.Observable.prototype.dispatchChangeEvent = function() { /** * @return {number} Revision. - * @todo stability experimental */ ol.Observable.prototype.getRevision = function() { return this.revision_; @@ -57,7 +56,7 @@ ol.Observable.prototype.getRevision = function() { * @param {function(?): ?} listener The listener function. * @param {Object=} opt_this The object to use as `this` in `listener`. * @return {goog.events.Key} Unique key for the listener. - * @todo stability experimental + * @todo api */ ol.Observable.prototype.on = function(type, listener, opt_this) { return goog.events.listen(this, type, listener, false, opt_this); @@ -70,7 +69,7 @@ ol.Observable.prototype.on = function(type, listener, opt_this) { * @param {function(?): ?} listener The listener function. * @param {Object=} opt_this The object to use as `this` in `listener`. * @return {goog.events.Key} Unique key for the listener. - * @todo stability experimental + * @todo api */ ol.Observable.prototype.once = function(type, listener, opt_this) { return goog.events.listenOnce(this, type, listener, false, opt_this); @@ -82,7 +81,7 @@ ol.Observable.prototype.once = function(type, listener, opt_this) { * @param {string|Array.} type The event type or array of event types. * @param {function(?): ?} listener The listener function. * @param {Object=} opt_this The object to use as `this` in `listener`. - * @todo stability experimental + * @todo api */ ol.Observable.prototype.un = function(type, listener, opt_this) { goog.events.unlisten(this, type, listener, false, opt_this); @@ -92,7 +91,7 @@ ol.Observable.prototype.un = function(type, listener, opt_this) { /** * Removes an event listener using the key returned by `on()` or `once()`. * @param {goog.events.Key} key Key. - * @todo stability experimental + * @todo api */ ol.Observable.prototype.unByKey = function(key) { goog.events.unlistenByKey(key); diff --git a/src/ol/ol.exports b/src/ol/ol.exports deleted file mode 100644 index e6371ba44b..0000000000 --- a/src/ol/ol.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.inherits diff --git a/src/ol/ol.js b/src/ol/ol.js index 6a7e7312e6..e22bd02a73 100644 --- a/src/ol/ol.js +++ b/src/ol/ol.js @@ -9,7 +9,7 @@ goog.provide('ol'); * linter complains with: * * "Missing newline between constructor and goog.inherits" - * @todo stability experimental + * @todo api */ ol.inherits = goog.inherits; diff --git a/src/ol/overlay.exports b/src/ol/overlay.exports deleted file mode 100644 index c2ce24085b..0000000000 --- a/src/ol/overlay.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.Overlay diff --git a/src/ol/overlay.js b/src/ol/overlay.js index 0254ad7c14..f749fa1449 100644 --- a/src/ol/overlay.js +++ b/src/ol/overlay.js @@ -25,8 +25,11 @@ ol.OverlayProperty = { /** + * Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`, + * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`, + * `'top-center'`, `'top-right'` * @enum {string} - * @todo stability experimental + * @todo api */ ol.OverlayPositioning = { BOTTOM_LEFT: 'bottom-left', @@ -56,13 +59,13 @@ ol.OverlayPositioning = { * @constructor * @extends {ol.Object} * @param {olx.OverlayOptions} options Overlay options. - * @todo stability stable * @todo observable element {Element} the Element containing the overlay * @todo observable map {ol.Map} the map that the overlay is part of * @todo observable position {ol.Coordinate} the spatial point that the overlay * is anchored at * @todo observable positioning {ol.OverlayPositioning} how the overlay is * positioned relative to its point on the map + * @todo api stable */ ol.Overlay = function(options) { @@ -157,7 +160,7 @@ goog.inherits(ol.Overlay, ol.Object); /** * Get the DOM element of this overlay. * @return {Element|undefined} Element. - * @todo stability experimental + * @todo api */ ol.Overlay.prototype.getElement = function() { return /** @type {Element|undefined} */ ( @@ -172,7 +175,7 @@ goog.exportProperty( /** * Get the map associated with this overlay. * @return {ol.Map|undefined} Map. - * @todo stability experimental + * @todo api */ ol.Overlay.prototype.getMap = function() { return /** @type {ol.Map|undefined} */ ( @@ -187,7 +190,7 @@ goog.exportProperty( /** * Get the current position of this overlay. * @return {ol.Coordinate|undefined} Position. - * @todo stability experimental + * @todo api */ ol.Overlay.prototype.getPosition = function() { return /** @type {ol.Coordinate|undefined} */ ( @@ -202,7 +205,7 @@ goog.exportProperty( /** * Get the current positioning of this overlay. * @return {ol.OverlayPositioning|undefined} Positioning. - * @todo stability experimental + * @todo api */ ol.Overlay.prototype.getPositioning = function() { return /** @type {ol.OverlayPositioning|undefined} */ ( @@ -279,7 +282,7 @@ ol.Overlay.prototype.handlePositioningChanged = function() { /** * Set the DOM element to be associated with this overlay. * @param {Element|undefined} element Element. - * @todo stability experimental + * @todo api */ ol.Overlay.prototype.setElement = function(element) { this.set(ol.OverlayProperty.ELEMENT, element); @@ -293,7 +296,7 @@ goog.exportProperty( /** * Set the map to be associated with this overlay. * @param {ol.Map|undefined} map Map. - * @todo stability experimental + * @todo api */ ol.Overlay.prototype.setMap = function(map) { this.set(ol.OverlayProperty.MAP, map); @@ -307,7 +310,7 @@ goog.exportProperty( /** * Set the position for this overlay. * @param {ol.Coordinate|undefined} position Position. - * @todo stability stable + * @todo api stable */ ol.Overlay.prototype.setPosition = function(position) { this.set(ol.OverlayProperty.POSITION, position); @@ -321,7 +324,7 @@ goog.exportProperty( /** * Set the positioning for this overlay. * @param {ol.OverlayPositioning|undefined} positioning Positioning. - * @todo stability experimental + * @todo api */ ol.Overlay.prototype.setPositioning = function(positioning) { this.set(ol.OverlayProperty.POSITIONING, positioning); diff --git a/src/ol/proj/chprojection.js b/src/ol/proj/chprojection.js index 50b5fd3818..901181af56 100644 --- a/src/ol/proj/chprojection.js +++ b/src/ol/proj/chprojection.js @@ -17,6 +17,7 @@ goog.require('ol.proj.Units'); * @constructor * @extends {ol.proj.Projection} * @param {{code: string, extent: ol.Extent}} options Options. + * @todo api */ ol.proj.CH = function(options) { goog.base(this, { @@ -395,6 +396,7 @@ ol.proj.CH.prototype.getPointResolution = function(resolution, point) { * The EPSG:2056 projection, also known as LV95 (CH1903+). * @constructor * @extends {ol.proj.CH} + * @todo api */ ol.proj.EPSG2056 = function() { goog.base(this, { @@ -433,6 +435,7 @@ ol.proj.EPSG2056.add = function() { * The EPSG:21781 projection, also known as LV03 (CH1903). * @constructor * @extends {ol.proj.CH} + * @todo api */ ol.proj.EPSG21781 = function() { goog.base(this, { diff --git a/src/ol/proj/common.js b/src/ol/proj/common.js index 00965a28e6..d249485cce 100644 --- a/src/ol/proj/common.js +++ b/src/ol/proj/common.js @@ -7,6 +7,7 @@ goog.require('ol.proj.EPSG4326'); /** * FIXME empty description for jsdoc + * @todo api */ ol.proj.common.add = function() { // Add transformations that don't alter coordinates to convert within set of diff --git a/src/ol/proj/epsg3857projection.js b/src/ol/proj/epsg3857projection.js index 7c7fb374d4..e811a42ecc 100644 --- a/src/ol/proj/epsg3857projection.js +++ b/src/ol/proj/epsg3857projection.js @@ -13,6 +13,7 @@ goog.require('ol.proj.Units'); * @constructor * @extends {ol.proj.Projection} * @param {string} code Code. + * @todo api */ ol.proj.EPSG3857 = function(code) { goog.base(this, { diff --git a/src/ol/proj/epsg4326projection.js b/src/ol/proj/epsg4326projection.js index 3f291ef5f1..c891790b14 100644 --- a/src/ol/proj/epsg4326projection.js +++ b/src/ol/proj/epsg4326projection.js @@ -11,6 +11,7 @@ goog.require('ol.proj.Units'); * @extends {ol.proj.Projection} * @param {string} code Code. * @param {string=} opt_axisOrientation Axis orientation. + * @todo api */ ol.proj.EPSG4326 = function(code, opt_axisOrientation) { goog.base(this, { diff --git a/src/ol/proj/proj.exports b/src/ol/proj/proj.exports deleted file mode 100644 index e78ec36f9a..0000000000 --- a/src/ol/proj/proj.exports +++ /dev/null @@ -1,16 +0,0 @@ -@exportSymbol ol.proj.Projection -@exportProperty ol.proj.Projection.prototype.getCode -@exportProperty ol.proj.Projection.prototype.getExtent -@exportProperty ol.proj.Projection.prototype.getUnits - -@exportSymbol ol.proj.addProjection -@exportSymbol ol.proj.get -@exportSymbol ol.proj.getTransform -@exportSymbol ol.proj.getTransformFromProjections -@exportSymbol ol.proj.transform -@exportSymbol ol.proj.transformWithProjections -@exportSymbol ol.proj.configureProj4jsProjection - -@exportSymbol ol.proj.common.add - -@exportSymbol ol.proj.METERS_PER_UNIT diff --git a/src/ol/proj/proj.js b/src/ol/proj/proj.js index bf3ddc3882..71601e09e3 100644 --- a/src/ol/proj/proj.js +++ b/src/ol/proj/proj.js @@ -30,14 +30,15 @@ ol.HAVE_PROJ4JS = ol.ENABLE_PROJ4JS && typeof Proj4js == 'object'; * A projection as {@link ol.proj.Projection}, SRS identifier string or * undefined. * @typedef {ol.proj.Projection|string|undefined} ol.proj.ProjectionLike - * @todo stability experimental + * @todo api */ ol.proj.ProjectionLike; /** + * Projection units: `'degrees'`, `'ft'`, `'m'` or `'pixels'`. * @enum {string} - * @todo stability experimental + * @todo api */ ol.proj.Units = { DEGREES: 'degrees', @@ -51,6 +52,7 @@ ol.proj.Units = { * Meters per unit lookup table. * @const * @type {Object.} + * @todo api */ ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] = 2 * Math.PI * ol.sphere.NORMAL.radius / 360; @@ -63,7 +65,7 @@ ol.proj.METERS_PER_UNIT[ol.proj.Units.METERS] = 1; * @constructor * @param {olx.ProjectionOptions} options Projection options. * @struct - * @todo stability experimental + * @todo api */ ol.proj.Projection = function(options) { @@ -110,6 +112,7 @@ ol.proj.Projection = function(options) { /** * Get the code for this projection, e.g. 'EPSG:4326'. * @return {string} Code. + * @todo api */ ol.proj.Projection.prototype.getCode = function() { return this.code_; @@ -119,6 +122,7 @@ ol.proj.Projection.prototype.getCode = function() { /** * Get the validity extent for this projection. * @return {ol.Extent} Extent. + * @todo api */ ol.proj.Projection.prototype.getExtent = function() { return this.extent_; @@ -141,6 +145,7 @@ ol.proj.Projection.prototype.getPointResolution = goog.abstractMethod; /** * Get the units of this projection. * @return {ol.proj.Units} Units. + * @todo api */ ol.proj.Projection.prototype.getUnits = function() { return this.units_; @@ -371,7 +376,7 @@ ol.proj.addProj4jsProjection_ = function(proj4jsProjection) { /** * @param {ol.proj.Projection} projection Projection. - * @todo stability experimental + * @todo api */ ol.proj.addProjection = function(projection) { var projections = ol.proj.projections_; @@ -469,7 +474,7 @@ ol.proj.removeTransform = function(source, destination) { * a combination of authority and identifier such as "EPSG:4326", or an * existing projection object, or undefined. * @return {ol.proj.Projection} Projection. - * @todo stability experimental + * @todo api */ ol.proj.get = function(projectionLike) { var projection; @@ -551,7 +556,7 @@ ol.proj.equivalent = function(projection1, projection2) { * @param {ol.proj.ProjectionLike} source Source. * @param {ol.proj.ProjectionLike} destination Destination. * @return {ol.TransformFunction} Transform. - * @todo stability experimental + * @todo api */ ol.proj.getTransform = function(source, destination) { var sourceProjection = ol.proj.get(source); @@ -568,7 +573,7 @@ ol.proj.getTransform = function(source, destination) { * @param {ol.proj.Projection} sourceProjection Source projection. * @param {ol.proj.Projection} destinationProjection Destination projection. * @return {ol.TransformFunction} Transform. - * @todo stability experimental + * @todo api */ ol.proj.getTransformFromProjections = function(sourceProjection, destinationProjection) { @@ -688,7 +693,7 @@ ol.proj.cloneTransform = function(input, opt_output, opt_dimension) { * @param {ol.proj.ProjectionLike} source Source. * @param {ol.proj.ProjectionLike} destination Destination. * @return {ol.Coordinate} Point. - * @todo stability experimental + * @todo api */ ol.proj.transform = function(point, source, destination) { var transformFn = ol.proj.getTransform(source, destination); @@ -703,7 +708,7 @@ ol.proj.transform = function(point, source, destination) { * @param {ol.proj.Projection} sourceProjection Source projection. * @param {ol.proj.Projection} destinationProjection Destination projection. * @return {ol.Coordinate} Point. - * @todo stability experimental + * @todo api */ ol.proj.transformWithProjections = function(point, sourceProjection, destinationProjection) { @@ -716,7 +721,7 @@ ol.proj.transformWithProjections = /** * @param {olx.Proj4jsProjectionOptions} options Proj4js projection options. * @return {ol.proj.Projection} Proj4js projection. - * @todo stability experimental + * @todo api */ ol.proj.configureProj4jsProjection = function(options) { goog.asserts.assert(!goog.object.containsKey( diff --git a/src/ol/render/canvas/canvasimmediate.exports b/src/ol/render/canvas/canvasimmediate.exports deleted file mode 100644 index 8654add64a..0000000000 --- a/src/ol/render/canvas/canvasimmediate.exports +++ /dev/null @@ -1,12 +0,0 @@ -@exportProperty ol.render.canvas.Immediate.prototype.drawAsync -@exportProperty ol.render.canvas.Immediate.prototype.drawCircleGeometry -@exportProperty ol.render.canvas.Immediate.prototype.drawFeature -@exportProperty ol.render.canvas.Immediate.prototype.drawLineStringGeometry -@exportProperty ol.render.canvas.Immediate.prototype.drawMultiLineStringGeometry -@exportProperty ol.render.canvas.Immediate.prototype.drawMultiPointGeometry -@exportProperty ol.render.canvas.Immediate.prototype.drawMultiPointGeometry -@exportProperty ol.render.canvas.Immediate.prototype.drawPointGeometry -@exportProperty ol.render.canvas.Immediate.prototype.drawPolygonGeometry -@exportProperty ol.render.canvas.Immediate.prototype.setFillStrokeStyle -@exportProperty ol.render.canvas.Immediate.prototype.setImageStyle -@exportProperty ol.render.canvas.Immediate.prototype.setTextStyle diff --git a/src/ol/render/canvas/canvasimmediate.js b/src/ol/render/canvas/canvasimmediate.js index ae805843ae..1968b406d7 100644 --- a/src/ol/render/canvas/canvasimmediate.js +++ b/src/ol/render/canvas/canvasimmediate.js @@ -380,6 +380,7 @@ ol.render.canvas.Immediate.prototype.drawRings_ = * * @param {number} zIndex Z index. * @param {function(ol.render.canvas.Immediate)} callback Callback. + * @todo api */ ol.render.canvas.Immediate.prototype.drawAsync = function(zIndex, callback) { var zIndexKey = zIndex.toString(); @@ -398,7 +399,7 @@ ol.render.canvas.Immediate.prototype.drawAsync = function(zIndex, callback) { * * @param {ol.geom.Circle} circleGeometry Circle geometry. * @param {Object} data Opaque data object, - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.drawCircleGeometry = function(circleGeometry, data) { @@ -443,7 +444,7 @@ ol.render.canvas.Immediate.prototype.drawCircleGeometry = * * @param {ol.Feature} feature Feature. * @param {ol.style.Style} style Style. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) { var geometry = feature.getGeometry(); @@ -474,7 +475,6 @@ ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) { * @param {ol.geom.GeometryCollection} geometryCollectionGeometry Geometry * collection. * @param {Object} data Opaque data object. - * @todo stability experimental */ ol.render.canvas.Immediate.prototype.drawGeometryCollectionGeometry = function(geometryCollectionGeometry, data) { @@ -496,7 +496,7 @@ ol.render.canvas.Immediate.prototype.drawGeometryCollectionGeometry = * * @param {ol.geom.Point} pointGeometry Point geometry. * @param {Object} data Opaque data object. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.drawPointGeometry = function(pointGeometry, data) { @@ -517,7 +517,7 @@ ol.render.canvas.Immediate.prototype.drawPointGeometry = * * @param {ol.geom.MultiPoint} multiPointGeometry MultiPoint geometry. * @param {Object} data Opaque data object. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.drawMultiPointGeometry = function(multiPointGeometry, data) { @@ -538,7 +538,7 @@ ol.render.canvas.Immediate.prototype.drawMultiPointGeometry = * * @param {ol.geom.LineString} lineStringGeometry Line string geometry. * @param {Object} data Opaque data object. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.drawLineStringGeometry = function(lineStringGeometry, data) { @@ -568,7 +568,7 @@ ol.render.canvas.Immediate.prototype.drawLineStringGeometry = * @param {ol.geom.MultiLineString} multiLineStringGeometry * MultiLineString geometry. * @param {Object} data Opaque data object. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.drawMultiLineStringGeometry = function(multiLineStringGeometry, data) { @@ -604,7 +604,7 @@ ol.render.canvas.Immediate.prototype.drawMultiLineStringGeometry = * * @param {ol.geom.Polygon} polygonGeometry Polygon geometry. * @param {Object} data Opaque data object. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.drawPolygonGeometry = function(polygonGeometry, data) { @@ -643,7 +643,7 @@ ol.render.canvas.Immediate.prototype.drawPolygonGeometry = * uses the current style. * @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry. * @param {Object} data Opaque data object. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.drawMultiPolygonGeometry = function(multiPolygonGeometry, data) { @@ -818,7 +818,7 @@ ol.render.canvas.Immediate.prototype.setContextTextState_ = * * @param {ol.style.Fill} fillStyle Fill style. * @param {ol.style.Stroke} strokeStyle Stroke style. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) { @@ -863,7 +863,7 @@ ol.render.canvas.Immediate.prototype.setFillStrokeStyle = * the image style. * * @param {ol.style.Image} imageStyle Image style. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) { if (goog.isNull(imageStyle)) { @@ -902,7 +902,7 @@ ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) { * remove the text style. * * @param {ol.style.Text} textStyle Text style. - * @todo stability experimental + * @todo api */ ol.render.canvas.Immediate.prototype.setTextStyle = function(textStyle) { if (goog.isNull(textStyle)) { diff --git a/src/ol/render/ivectorcontext.js b/src/ol/render/ivectorcontext.js index ade06fd2b4..22ba124831 100644 --- a/src/ol/render/ivectorcontext.js +++ b/src/ol/render/ivectorcontext.js @@ -8,7 +8,6 @@ goog.provide('ol.render.IVectorContext'); * VectorContext interface. Currently implemented by * {@link ol.render.canvas.Immediate} * @interface - * @todo stability experimental */ ol.render.IVectorContext = function() { }; @@ -17,7 +16,6 @@ ol.render.IVectorContext = function() { /** * @param {number} zIndex Z index. * @param {function(ol.render.canvas.Immediate)} callback Callback. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawAsync = function(zIndex, callback) { }; @@ -26,7 +24,6 @@ ol.render.IVectorContext.prototype.drawAsync = function(zIndex, callback) { /** * @param {ol.geom.Circle} circleGeometry Circle geometry. * @param {Object} data Opaque data object, - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawCircleGeometry = function(circleGeometry, data) { @@ -36,7 +33,6 @@ ol.render.IVectorContext.prototype.drawCircleGeometry = /** * @param {ol.Feature} feature Feature. * @param {ol.style.Style} style Style. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawFeature = function(feature, style) { }; @@ -46,7 +42,6 @@ ol.render.IVectorContext.prototype.drawFeature = function(feature, style) { * @param {ol.geom.GeometryCollection} geometryCollectionGeometry Geometry * collection. * @param {Object} data Opaque data object. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawGeometryCollectionGeometry = function(geometryCollectionGeometry, data) { @@ -56,7 +51,6 @@ ol.render.IVectorContext.prototype.drawGeometryCollectionGeometry = /** * @param {ol.geom.Point} pointGeometry Point geometry. * @param {Object} data Opaque data object. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawPointGeometry = function(pointGeometry, data) { @@ -66,7 +60,6 @@ ol.render.IVectorContext.prototype.drawPointGeometry = /** * @param {ol.geom.LineString} lineStringGeometry Line string geometry. * @param {Object} data Opaque data object. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawLineStringGeometry = function(lineStringGeometry, data) { @@ -77,7 +70,6 @@ ol.render.IVectorContext.prototype.drawLineStringGeometry = * @param {ol.geom.MultiLineString} multiLineStringGeometry * MultiLineString geometry. * @param {Object} data Opaque data object. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawMultiLineStringGeometry = function(multiLineStringGeometry, data) { @@ -87,7 +79,6 @@ ol.render.IVectorContext.prototype.drawMultiLineStringGeometry = /** * @param {ol.geom.MultiPoint} multiPointGeometry MultiPoint geometry. * @param {Object} data Opaque data object. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawMultiPointGeometry = function(multiPointGeometry, data) { @@ -97,7 +88,6 @@ ol.render.IVectorContext.prototype.drawMultiPointGeometry = /** * @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry. * @param {Object} data Opaque data object. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawMultiPolygonGeometry = function(multiPolygonGeometry, data) { @@ -107,7 +97,6 @@ ol.render.IVectorContext.prototype.drawMultiPolygonGeometry = /** * @param {ol.geom.Polygon} polygonGeometry Polygon geometry. * @param {Object} data Opaque data object. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawPolygonGeometry = function(polygonGeometry, data) { @@ -121,7 +110,6 @@ ol.render.IVectorContext.prototype.drawPolygonGeometry = * @param {number} stride Stride. * @param {ol.geom.Geometry} geometry Geometry. * @param {Object} data Opaque data object. - * @todo stability experimental */ ol.render.IVectorContext.prototype.drawText = function(flatCoordinates, offset, end, stride, geometry, data) { @@ -131,7 +119,6 @@ ol.render.IVectorContext.prototype.drawText = /** * @param {ol.style.Fill} fillStyle Fill style. * @param {ol.style.Stroke} strokeStyle Stroke style. - * @todo stability experimental */ ol.render.IVectorContext.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) { @@ -140,7 +127,6 @@ ol.render.IVectorContext.prototype.setFillStrokeStyle = /** * @param {ol.style.Image} imageStyle Image style. - * @todo stability experimental */ ol.render.IVectorContext.prototype.setImageStyle = function(imageStyle) { }; @@ -148,7 +134,6 @@ ol.render.IVectorContext.prototype.setImageStyle = function(imageStyle) { /** * @param {ol.style.Text} textStyle Text style. - * @todo stability experimental */ ol.render.IVectorContext.prototype.setTextStyle = function(textStyle) { }; diff --git a/src/ol/render/renderevent.js b/src/ol/render/renderevent.js index 017b20c276..7fdc3e513a 100644 --- a/src/ol/render/renderevent.js +++ b/src/ol/render/renderevent.js @@ -11,17 +11,17 @@ goog.require('ol.render.IVectorContext'); ol.render.EventType = { /** * @event ol.render.Event#postcompose - * @todo stability experimental + * @todo api */ POSTCOMPOSE: 'postcompose', /** * @event ol.render.Event#precompose - * @todo stability experimental + * @todo api */ PRECOMPOSE: 'precompose', /** * @event ol.render.Event#render - * @todo stability experimental + * @todo api */ RENDER: 'render' }; @@ -47,13 +47,11 @@ ol.render.Event = function( /** * @type {ol.render.IVectorContext|undefined} - * @todo stability experimental */ this.vectorContext = opt_vectorContext; /** * @type {oli.FrameState|undefined} - * @todo stability experimental */ this.frameState = opt_frameState; @@ -61,7 +59,6 @@ ol.render.Event = function( * Canvas context. Only available when a Canvas renderer is used, * null otherwise. * @type {CanvasRenderingContext2D|null|undefined} - * @todo stability experimental */ this.context = opt_context; @@ -69,7 +66,6 @@ ol.render.Event = function( * WebGL context. Only available when a WebGL renderer is used, null * otherwise. * @type {ol.webgl.Context|null|undefined} - * @todo stability experimental */ this.glContext = opt_glContext; diff --git a/src/ol/size.js b/src/ol/size.js index f4305b8046..2f0e572da8 100644 --- a/src/ol/size.js +++ b/src/ol/size.js @@ -4,8 +4,8 @@ goog.provide('ol.size'); /** * An array of numbers representing a size: `[width, height]`. - * @typedef {Array.} ol.Size - * @todo stability experimental + * @typedef {Array.} + * @todo api */ ol.Size; diff --git a/src/ol/source/bingmapssource.exports b/src/ol/source/bingmapssource.exports deleted file mode 100644 index 5f7481f7c9..0000000000 --- a/src/ol/source/bingmapssource.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.source.BingMaps -@exportProperty ol.source.BingMaps.TOS_ATTRIBUTION diff --git a/src/ol/source/bingmapssource.js b/src/ol/source/bingmapssource.js index fa93ddb4d5..0562241565 100644 --- a/src/ol/source/bingmapssource.js +++ b/src/ol/source/bingmapssource.js @@ -19,7 +19,7 @@ goog.require('ol.tilegrid.XYZ'); * @constructor * @extends {ol.source.TileImage} * @param {olx.source.BingMapsOptions} options Bing Maps options. - * @todo stability experimental + * @todo api */ ol.source.BingMaps = function(options) { @@ -55,6 +55,7 @@ goog.inherits(ol.source.BingMaps, ol.source.TileImage); /** * @const * @type {ol.Attribution} + * @todo api */ ol.source.BingMaps.TOS_ATTRIBUTION = new ol.Attribution({ html: '} Features. + * @todo api + */ +ol.source.ServerVector.prototype.readFeatures; diff --git a/src/ol/source/source.exports b/src/ol/source/source.exports deleted file mode 100644 index 1d3863d0f3..0000000000 --- a/src/ol/source/source.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportProperty ol.source.Source.prototype.getExtent -@exportProperty ol.source.Source.prototype.getState diff --git a/src/ol/source/source.js b/src/ol/source/source.js index c9039bbbf7..6a65fcd105 100644 --- a/src/ol/source/source.js +++ b/src/ol/source/source.js @@ -24,7 +24,6 @@ ol.source.State = { * logo: (string|undefined), * projection: ol.proj.ProjectionLike, * state: (ol.source.State|string|undefined)}} - * @todo stability experimental */ ol.source.SourceOptions; @@ -34,7 +33,6 @@ ol.source.SourceOptions; * @constructor * @extends {ol.Observable} * @param {ol.source.SourceOptions} options Source options. - * @todo stability experimental */ ol.source.Source = function(options) { @@ -131,6 +129,7 @@ ol.source.Source.prototype.getResolutions = goog.abstractMethod; /** * @return {ol.source.State} State. + * @todo api */ ol.source.Source.prototype.getState = function() { return this.state_; diff --git a/src/ol/source/stamensource.exports b/src/ol/source/stamensource.exports deleted file mode 100644 index 697330485e..0000000000 --- a/src/ol/source/stamensource.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.source.Stamen diff --git a/src/ol/source/stamensource.js b/src/ol/source/stamensource.js index 7ed9e2ed05..0d4c5c36a0 100644 --- a/src/ol/source/stamensource.js +++ b/src/ol/source/stamensource.js @@ -81,7 +81,7 @@ ol.source.StamenProviderConfig = { * @constructor * @extends {ol.source.XYZ} * @param {olx.source.StamenOptions} options Stamen options. - * @todo stability experimental + * @todo api */ ol.source.Stamen = function(options) { diff --git a/src/ol/source/staticvectorsource.exports b/src/ol/source/staticvectorsource.exports deleted file mode 100644 index 1c283475e6..0000000000 --- a/src/ol/source/staticvectorsource.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.source.StaticVector diff --git a/src/ol/source/staticvectorsource.js b/src/ol/source/staticvectorsource.js index 6ebc8ad278..9133cd25b8 100644 --- a/src/ol/source/staticvectorsource.js +++ b/src/ol/source/staticvectorsource.js @@ -10,7 +10,7 @@ goog.require('ol.source.State'); * @extends {ol.source.FormatVector} * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent * @param {olx.source.StaticVectorOptions} options Options. - * @todo stability experimental + * @todo api */ ol.source.StaticVector = function(options) { diff --git a/src/ol/source/tileimagesource.exports b/src/ol/source/tileimagesource.exports deleted file mode 100644 index e3dffc2601..0000000000 --- a/src/ol/source/tileimagesource.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.source.TileImage diff --git a/src/ol/source/tileimagesource.js b/src/ol/source/tileimagesource.js index 5ab8a69d5e..94107ddd0b 100644 --- a/src/ol/source/tileimagesource.js +++ b/src/ol/source/tileimagesource.js @@ -17,7 +17,7 @@ goog.require('ol.source.Tile'); * @constructor * @extends {ol.source.Tile} * @param {olx.source.TileImageOptions} options Image tile options. - * @todo stability experimental + * @todo api */ ol.source.TileImage = function(options) { diff --git a/src/ol/source/tilejsonsource.exports b/src/ol/source/tilejsonsource.exports deleted file mode 100644 index 56b3f56285..0000000000 --- a/src/ol/source/tilejsonsource.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.source.TileJSON diff --git a/src/ol/source/tilejsonsource.js b/src/ol/source/tilejsonsource.js index 0cc9692395..0cfd14c546 100644 --- a/src/ol/source/tilejsonsource.js +++ b/src/ol/source/tilejsonsource.js @@ -25,7 +25,7 @@ goog.require('ol.tilegrid.XYZ'); * @constructor * @extends {ol.source.TileImage} * @param {olx.source.TileJSONOptions} options TileJSON options. - * @todo stability experimental + * @todo api */ ol.source.TileJSON = function(options) { diff --git a/src/ol/source/tilesource.exports b/src/ol/source/tilesource.exports deleted file mode 100644 index fe7587ebea..0000000000 --- a/src/ol/source/tilesource.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.source.Tile -@exportProperty ol.source.Tile.prototype.getTileGrid diff --git a/src/ol/source/tilesource.js b/src/ol/source/tilesource.js index 732ab63d2f..fdcbcef744 100644 --- a/src/ol/source/tilesource.js +++ b/src/ol/source/tilesource.js @@ -18,7 +18,6 @@ goog.require('ol.tilegrid.TileGrid'); * opaque: (boolean|undefined), * projection: ol.proj.ProjectionLike, * tileGrid: (ol.tilegrid.TileGrid|undefined)}} - * @todo stability experimental */ ol.source.TileOptions; @@ -28,7 +27,7 @@ ol.source.TileOptions; * @constructor * @extends {ol.source.Source} * @param {ol.source.TileOptions} options Tile source options. - * @todo stability experimental + * @todo api */ ol.source.Tile = function(options) { @@ -153,6 +152,7 @@ ol.source.Tile.prototype.getTile = goog.abstractMethod; /** * @return {ol.tilegrid.TileGrid} Tile grid. + * @todo api */ ol.source.Tile.prototype.getTileGrid = function() { return this.tileGrid; diff --git a/src/ol/source/tilevectorsource.exports b/src/ol/source/tilevectorsource.exports deleted file mode 100644 index aca6bdb3e8..0000000000 --- a/src/ol/source/tilevectorsource.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.source.TileVector diff --git a/src/ol/source/tilevectorsource.js b/src/ol/source/tilevectorsource.js index cf64f35430..5e9d5c33c2 100644 --- a/src/ol/source/tilevectorsource.js +++ b/src/ol/source/tilevectorsource.js @@ -14,6 +14,7 @@ goog.require('ol.tilegrid.TileGrid'); * @constructor * @extends {ol.source.FormatVector} * @param {olx.source.TileVectorOptions} options Options. + * @todo api */ ol.source.TileVector = function(options) { @@ -229,7 +230,6 @@ ol.source.TileVector.prototype.setTileUrlFunction = function(tileUrlFunction) { /** * @param {string} url URL. - * @todo stability experimental */ ol.source.TileVector.prototype.setUrl = function(url) { this.setTileUrlFunction(ol.TileUrlFunction.createFromTemplates( diff --git a/src/ol/source/tilewmssource.exports b/src/ol/source/tilewmssource.exports deleted file mode 100644 index 93192f9d12..0000000000 --- a/src/ol/source/tilewmssource.exports +++ /dev/null @@ -1,5 +0,0 @@ -@exportSymbol ol.source.TileWMS -@exportProperty ol.source.TileWMS.prototype.getGetFeatureInfoUrl -@exportProperty ol.source.TileWMS.prototype.getParams -@exportProperty ol.source.TileWMS.prototype.getUrls -@exportProperty ol.source.TileWMS.prototype.updateParams diff --git a/src/ol/source/tilewmssource.js b/src/ol/source/tilewmssource.js index 2958b531d8..3bdf0dd4cf 100644 --- a/src/ol/source/tilewmssource.js +++ b/src/ol/source/tilewmssource.js @@ -23,7 +23,7 @@ goog.require('ol.source.wms.ServerType'); * @constructor * @extends {ol.source.TileImage} * @param {olx.source.TileWMSOptions=} opt_options Tile WMS options. - * @todo stability experimental + * @todo api */ ol.source.TileWMS = function(opt_options) { @@ -124,6 +124,7 @@ goog.inherits(ol.source.TileWMS, ol.source.TileImage); * in the `LAYERS` parameter will be used. `VERSION` should not be * specified here. * @return {string|undefined} GetFeatureInfo URL. + * @todo api */ ol.source.TileWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) { @@ -205,7 +206,7 @@ ol.source.TileWMS.prototype.getKeyZXY = function(z, x, y) { * Get the user-provided params, i.e. those passed to the constructor through * the "params" option, and possibly updated using the updateParams method. * @return {Object} Params. - * @todo stability experimental + * @todo api */ ol.source.TileWMS.prototype.getParams = function() { return this.params_; @@ -305,7 +306,7 @@ ol.source.TileWMS.prototype.getTilePixelSize = /** * Return the URLs used for this WMS source. * @return {Array.|undefined} URLs. - * @todo stability experimental + * @todo api */ ol.source.TileWMS.prototype.getUrls = function() { return this.urls_; @@ -389,7 +390,7 @@ ol.source.TileWMS.prototype.tileUrlFunction_ = /** * Update the user-provided params. * @param {Object} params Params. - * @todo stability experimental + * @todo api */ ol.source.TileWMS.prototype.updateParams = function(params) { goog.object.extend(this.params_, params); diff --git a/src/ol/source/topojsonsource.exports b/src/ol/source/topojsonsource.exports deleted file mode 100644 index d56afa819e..0000000000 --- a/src/ol/source/topojsonsource.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.source.TopoJSON diff --git a/src/ol/source/topojsonsource.js b/src/ol/source/topojsonsource.js index cd65cf76ba..5e68221b4d 100644 --- a/src/ol/source/topojsonsource.js +++ b/src/ol/source/topojsonsource.js @@ -10,7 +10,7 @@ goog.require('ol.source.StaticVector'); * @extends {ol.source.StaticVector} * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent * @param {olx.source.TopoJSONOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.source.TopoJSON = function(opt_options) { diff --git a/src/ol/source/vectorsource.exports b/src/ol/source/vectorsource.exports deleted file mode 100644 index 467542675a..0000000000 --- a/src/ol/source/vectorsource.exports +++ /dev/null @@ -1,10 +0,0 @@ -@exportSymbol ol.source.Vector -@exportProperty ol.source.Vector.prototype.addFeature -@exportProperty ol.source.Vector.prototype.addFeatures -@exportProperty ol.source.Vector.prototype.forEachFeature -@exportProperty ol.source.Vector.prototype.forEachFeatureInExtent -@exportProperty ol.source.Vector.prototype.getFeatures -@exportProperty ol.source.Vector.prototype.getFeaturesAtCoordinate -@exportProperty ol.source.Vector.prototype.getClosestFeatureToCoordinate -@exportProperty ol.source.Vector.prototype.getExtent -@exportProperty ol.source.Vector.prototype.removeFeature diff --git a/src/ol/source/vectorsource.js b/src/ol/source/vectorsource.js index 94ab64349a..f7a5d6239e 100644 --- a/src/ol/source/vectorsource.js +++ b/src/ol/source/vectorsource.js @@ -25,13 +25,13 @@ ol.source.VectorEventType = { /** * Triggered when a feature is added to the source. * @event ol.source.VectorEvent#addfeature - * @todo stability experimental + * @todo api */ ADDFEATURE: 'addfeature', /** * Triggered when a feature is removed from the source. * @event ol.source.VectorEvent#removefeature - * @todo stability experimental + * @todo api */ REMOVEFEATURE: 'removefeature' }; @@ -43,7 +43,7 @@ ol.source.VectorEventType = { * @extends {ol.source.Source} * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent * @param {olx.source.VectorOptions=} opt_options Vector source options. - * @todo stability experimental + * @todo api */ ol.source.Vector = function(opt_options) { @@ -85,7 +85,7 @@ goog.inherits(ol.source.Vector, ol.source.Source); /** * @param {ol.Feature} feature Feature. - * @todo stability experimental + * @todo api */ ol.source.Vector.prototype.addFeature = function(feature) { this.addFeatureInternal(feature); @@ -123,7 +123,7 @@ ol.source.Vector.prototype.addFeatureInternal = function(feature) { /** * @param {Array.} features Features. - * @todo stability experimental + * @todo api */ ol.source.Vector.prototype.addFeatures = function(features) { this.addFeaturesInternal(features); @@ -146,7 +146,7 @@ ol.source.Vector.prototype.addFeaturesInternal = function(features) { /** - * @todo stability experimental + * Clear the source */ ol.source.Vector.prototype.clear = function() { this.rBush_.forEach(this.removeFeatureInternal, this); @@ -164,7 +164,7 @@ ol.source.Vector.prototype.clear = function() { * @param {T=} opt_this The object to use as `this` in `f`. * @return {S|undefined} * @template T,S - * @todo stability experimental + * @todo api */ ol.source.Vector.prototype.forEachFeature = function(f, opt_this) { return this.rBush_.forEach(f, opt_this); @@ -177,7 +177,6 @@ ol.source.Vector.prototype.forEachFeature = function(f, opt_this) { * @param {T=} opt_this The object to use as `this` in `f`. * @return {S|undefined} * @template T,S - * @todo stability experimental */ ol.source.Vector.prototype.forEachFeatureAtCoordinate = function(coordinate, f, opt_this) { @@ -200,7 +199,7 @@ ol.source.Vector.prototype.forEachFeatureAtCoordinate = * @param {T=} opt_this The object to use as `this` in `f`. * @return {S|undefined} * @template T,S - * @todo stability experimental + * @todo api */ ol.source.Vector.prototype.forEachFeatureInExtent = function(extent, f, opt_this) { @@ -215,7 +214,6 @@ ol.source.Vector.prototype.forEachFeatureInExtent = * @param {T=} opt_this The object to use as `this` in `f`. * @return {S|undefined} * @template T,S - * @todo stability experimental */ ol.source.Vector.prototype.forEachFeatureInExtentAtResolution = function(extent, resolution, f, opt_this) { @@ -225,7 +223,7 @@ ol.source.Vector.prototype.forEachFeatureInExtentAtResolution = /** * @return {Array.} Features. - * @todo stability experimental + * @todo api */ ol.source.Vector.prototype.getFeatures = function() { var features = this.rBush_.getAll(); @@ -240,7 +238,7 @@ ol.source.Vector.prototype.getFeatures = function() { /** * @param {ol.Coordinate} coordinate Coordinate. * @return {Array.} Features. - * @todo stability experimental + * @todo api */ ol.source.Vector.prototype.getFeaturesAtCoordinate = function(coordinate) { var features = []; @@ -254,7 +252,6 @@ ol.source.Vector.prototype.getFeaturesAtCoordinate = function(coordinate) { /** * @param {ol.Extent} extent Extent. * @return {Array.} Features. - * @todo stability experimental */ ol.source.Vector.prototype.getFeaturesInExtent = function(extent) { return this.rBush_.getInExtent(extent); @@ -264,7 +261,7 @@ ol.source.Vector.prototype.getFeaturesInExtent = function(extent) { /** * @param {ol.Coordinate} coordinate Coordinate. * @return {ol.Feature} Closest feature. - * @todo stability experimental + * @todo api */ ol.source.Vector.prototype.getClosestFeatureToCoordinate = function(coordinate) { @@ -310,7 +307,7 @@ ol.source.Vector.prototype.getClosestFeatureToCoordinate = /** * @return {ol.Extent} Extent. - * @todo stability experimental + * @todo api */ ol.source.Vector.prototype.getExtent = function() { return this.rBush_.getExtent(); @@ -345,7 +342,6 @@ ol.source.Vector.prototype.handleFeatureChange_ = function(event) { /** * @return {boolean} Is empty. - * @todo stability experimental */ ol.source.Vector.prototype.isEmpty = function() { return this.rBush_.isEmpty() && @@ -363,7 +359,7 @@ ol.source.Vector.prototype.loadFeatures = goog.nullFunction; /** * @param {ol.Feature} feature Feature. - * @todo stability experimental + * @todo api */ ol.source.Vector.prototype.removeFeature = function(feature) { var featureKey = goog.getUid(feature).toString(); @@ -400,7 +396,6 @@ ol.source.Vector.prototype.removeFeatureInternal = function(feature) { * @implements {oli.source.VectorEvent} * @param {string} type Type. * @param {ol.Feature=} opt_feature Feature. - * @todo stability experimental */ ol.source.VectorEvent = function(type, opt_feature) { @@ -409,7 +404,6 @@ ol.source.VectorEvent = function(type, opt_feature) { /** * The feature being added or removed. * @type {ol.Feature|undefined} - * @todo stability experimental */ this.feature = opt_feature; diff --git a/src/ol/source/wmtssource.exports b/src/ol/source/wmtssource.exports deleted file mode 100644 index a81ed65df0..0000000000 --- a/src/ol/source/wmtssource.exports +++ /dev/null @@ -1,4 +0,0 @@ -@exportSymbol ol.source.WMTS -@exportProperty ol.source.WMTS.prototype.getDimensions -@exportProperty ol.source.WMTS.prototype.updateDimensions -@exportSymbol ol.source.WMTS.optionsFromCapabilities diff --git a/src/ol/source/wmtssource.js b/src/ol/source/wmtssource.js index c87014482d..37684a67a0 100644 --- a/src/ol/source/wmtssource.js +++ b/src/ol/source/wmtssource.js @@ -29,7 +29,7 @@ ol.source.WMTSRequestEncoding = { * @constructor * @extends {ol.source.TileImage} * @param {olx.source.WMTSOptions} options WMTS options. - * @todo stability experimental + * @todo api */ ol.source.WMTS = function(options) { @@ -195,7 +195,7 @@ goog.inherits(ol.source.WMTS, ol.source.TileImage); * "dimensions" option, and possibly updated using the updateDimensions * method. * @return {Object} Dimensions. - * @todo stability experimental + * @todo api */ ol.source.WMTS.prototype.getDimensions = function() { return this.dimensions_; @@ -226,7 +226,7 @@ ol.source.WMTS.prototype.resetCoordKeyPrefix_ = function() { /** * Update the dimensions. * @param {Object} dimensions Dimensions. - * @todo stability experimental + * @todo api */ ol.source.WMTS.prototype.updateDimensions = function(dimensions) { goog.object.extend(this.dimensions_, dimensions); @@ -239,7 +239,7 @@ ol.source.WMTS.prototype.updateDimensions = function(dimensions) { * @param {Object} wmtsCap An object representing the capabilities document. * @param {string} layer The layer identifier. * @return {olx.source.WMTSOptions} WMTS source options object. - * @todo stability experimental + * @todo api */ ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, layer) { diff --git a/src/ol/source/xyzsource.exports b/src/ol/source/xyzsource.exports deleted file mode 100644 index 3968a05264..0000000000 --- a/src/ol/source/xyzsource.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.source.XYZ -@exportProperty ol.source.XYZ.prototype.setUrl diff --git a/src/ol/source/xyzsource.js b/src/ol/source/xyzsource.js index 69bfd6f49f..6e365e0662 100644 --- a/src/ol/source/xyzsource.js +++ b/src/ol/source/xyzsource.js @@ -12,7 +12,7 @@ goog.require('ol.tilegrid.XYZ'); * @constructor * @extends {ol.source.TileImage} * @param {olx.source.XYZOptions} options XYZ options. - * @todo stability experimental + * @todo api */ ol.source.XYZ = function(options) { @@ -69,7 +69,7 @@ ol.source.XYZ.prototype.setTileUrlFunction = function(tileUrlFunction) { /** * @param {string} url URL. - * @todo stability experimental + * @todo api */ ol.source.XYZ.prototype.setUrl = function(url) { this.setTileUrlFunction(ol.TileUrlFunction.createFromTemplates( diff --git a/src/ol/source/zoomifysource.exports b/src/ol/source/zoomifysource.exports deleted file mode 100644 index 38f7c1657b..0000000000 --- a/src/ol/source/zoomifysource.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.source.Zoomify diff --git a/src/ol/source/zoomifysource.js b/src/ol/source/zoomifysource.js index 162649e33e..ae87d64aae 100644 --- a/src/ol/source/zoomifysource.js +++ b/src/ol/source/zoomifysource.js @@ -26,7 +26,7 @@ ol.source.ZoomifyTierSizeCalculation = { * @constructor * @extends {ol.source.TileImage} * @param {olx.source.ZoomifyOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.source.Zoomify = function(opt_options) { diff --git a/src/ol/sphere/sphere.exports b/src/ol/sphere/sphere.exports deleted file mode 100644 index 3d47177b3b..0000000000 --- a/src/ol/sphere/sphere.exports +++ /dev/null @@ -1 +0,0 @@ -@exportProperty ol.Sphere.prototype.circle diff --git a/src/ol/sphere/sphere.js b/src/ol/sphere/sphere.js index 3f5877bc24..ed095e7736 100644 --- a/src/ol/sphere/sphere.js +++ b/src/ol/sphere/sphere.js @@ -38,6 +38,7 @@ ol.Sphere = function(radius) { * @param {number} radius Radius. * @param {number=} opt_n N. * @return {ol.geom.Geometry} Circle geometry. + * @todo api */ ol.Sphere.prototype.circle = function(center, radius, opt_n) { var n = goog.isDef(opt_n) ? opt_n : 32; diff --git a/src/ol/sphere/wgs84sphere.exports b/src/ol/sphere/wgs84sphere.exports deleted file mode 100644 index 955afd150b..0000000000 --- a/src/ol/sphere/wgs84sphere.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.sphere.WGS84 diff --git a/src/ol/sphere/wgs84sphere.js b/src/ol/sphere/wgs84sphere.js index 19624fd6b2..dc3c5d78e4 100644 --- a/src/ol/sphere/wgs84sphere.js +++ b/src/ol/sphere/wgs84sphere.js @@ -7,5 +7,6 @@ goog.require('ol.Sphere'); * A sphere with radius equal to the semi-major axis of the WGS84 ellipsoid. * @const * @type {ol.Sphere} + * @todo api */ ol.sphere.WGS84 = new ol.Sphere(6378137); diff --git a/src/ol/structs/buffer.js b/src/ol/structs/buffer.js index cace303348..31ae062393 100644 --- a/src/ol/structs/buffer.js +++ b/src/ol/structs/buffer.js @@ -29,7 +29,6 @@ ol.BUFFER_REPLACE_UNUSED_ENTRIES_WITH_NANS = goog.DEBUG; * @param {number=} opt_used Used. * @param {number=} opt_usage Usage. * @struct - * @todo stability experimental */ ol.structs.Buffer = function(opt_arr, opt_used, opt_usage) { diff --git a/src/ol/style/circlestyle.exports b/src/ol/style/circlestyle.exports deleted file mode 100644 index fd4ebd1f1b..0000000000 --- a/src/ol/style/circlestyle.exports +++ /dev/null @@ -1,7 +0,0 @@ -@exportSymbol ol.style.Circle -@exportProperty ol.style.Circle.prototype.getAnchor -@exportProperty ol.style.Circle.prototype.getFill -@exportProperty ol.style.Circle.prototype.getImage -@exportProperty ol.style.Circle.prototype.getRadius -@exportProperty ol.style.Circle.prototype.getSize -@exportProperty ol.style.Circle.prototype.getStroke diff --git a/src/ol/style/circlestyle.js b/src/ol/style/circlestyle.js index 91647681db..34e4e4c71a 100644 --- a/src/ol/style/circlestyle.js +++ b/src/ol/style/circlestyle.js @@ -17,7 +17,7 @@ goog.require('ol.style.Stroke'); * @constructor * @param {olx.style.CircleOptions=} opt_options Options. * @extends {ol.style.Image} - * @todo stability experimental + * @todo api */ ol.style.Circle = function(opt_options) { @@ -82,6 +82,7 @@ goog.inherits(ol.style.Circle, ol.style.Image); /** * @inheritDoc + * @todo api */ ol.style.Circle.prototype.getAnchor = function() { return this.anchor_; @@ -90,6 +91,7 @@ ol.style.Circle.prototype.getAnchor = function() { /** * @return {ol.style.Fill} Fill style. + * @todo api */ ol.style.Circle.prototype.getFill = function() { return this.fill_; @@ -106,6 +108,7 @@ ol.style.Circle.prototype.getHitDetectionImage = function(pixelRatio) { /** * @inheritDoc + * @todo api */ ol.style.Circle.prototype.getImage = function(pixelRatio) { return this.canvas_; @@ -122,6 +125,7 @@ ol.style.Circle.prototype.getImageState = function() { /** * @return {number} Radius. + * @todo api */ ol.style.Circle.prototype.getRadius = function() { return this.radius_; @@ -130,6 +134,7 @@ ol.style.Circle.prototype.getRadius = function() { /** * @inheritDoc + * @todo api */ ol.style.Circle.prototype.getSize = function() { return this.size_; @@ -138,6 +143,7 @@ ol.style.Circle.prototype.getSize = function() { /** * @return {ol.style.Stroke} Stroke style. + * @todo api */ ol.style.Circle.prototype.getStroke = function() { return this.stroke_; diff --git a/src/ol/style/fillstyle.exports b/src/ol/style/fillstyle.exports deleted file mode 100644 index 81bb520fc8..0000000000 --- a/src/ol/style/fillstyle.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.style.Fill -@exportProperty ol.style.Fill.prototype.getColor diff --git a/src/ol/style/fillstyle.js b/src/ol/style/fillstyle.js index 25f59b0be0..f480d17893 100644 --- a/src/ol/style/fillstyle.js +++ b/src/ol/style/fillstyle.js @@ -7,6 +7,7 @@ goog.require('ol.color'); /** * @constructor * @param {olx.style.FillOptions=} opt_options Options. + * @todo api */ ol.style.Fill = function(opt_options) { @@ -22,6 +23,7 @@ ol.style.Fill = function(opt_options) { /** * @return {ol.Color|string} Color. + * @todo api */ ol.style.Fill.prototype.getColor = function() { return this.color_; diff --git a/src/ol/style/iconstyle.exports b/src/ol/style/iconstyle.exports deleted file mode 100644 index 5b7d6c6d77..0000000000 --- a/src/ol/style/iconstyle.exports +++ /dev/null @@ -1,5 +0,0 @@ -@exportSymbol ol.style.Icon -@exportProperty ol.style.Icon.prototype.getAnchor -@exportProperty ol.style.Icon.prototype.getImage -@exportProperty ol.style.Icon.prototype.getSize -@exportProperty ol.style.Icon.prototype.getSrc diff --git a/src/ol/style/iconstyle.js b/src/ol/style/iconstyle.js index f2310d1c13..d5b29b76c1 100644 --- a/src/ol/style/iconstyle.js +++ b/src/ol/style/iconstyle.js @@ -40,6 +40,7 @@ ol.style.IconAnchorUnits = { * @constructor * @param {olx.style.IconOptions=} opt_options Options. * @extends {ol.style.Image} + * @todo api */ ol.style.Icon = function(opt_options) { @@ -125,6 +126,7 @@ goog.inherits(ol.style.Icon, ol.style.Image); /** * @inheritDoc + * @todo api */ ol.style.Icon.prototype.getAnchor = function() { var anchor = this.anchor_; @@ -165,6 +167,7 @@ ol.style.Icon.prototype.getAnchor = function() { /** * @inheritDoc + * @todo api */ ol.style.Icon.prototype.getImage = function(pixelRatio) { return this.iconImage_.getImage(pixelRatio); @@ -189,6 +192,7 @@ ol.style.Icon.prototype.getHitDetectionImage = function(pixelRatio) { /** * @return {string|undefined} Image src. + * @todo api */ ol.style.Icon.prototype.getSrc = function() { return this.iconImage_.getSrc(); @@ -197,6 +201,7 @@ ol.style.Icon.prototype.getSrc = function() { /** * @inheritDoc + * @todo api */ ol.style.Icon.prototype.getSize = function() { return goog.isNull(this.size_) ? this.iconImage_.getSize() : this.size_; diff --git a/src/ol/style/imagestyle.exports b/src/ol/style/imagestyle.exports deleted file mode 100644 index 67498d3ed8..0000000000 --- a/src/ol/style/imagestyle.exports +++ /dev/null @@ -1,3 +0,0 @@ -@exportSymbol ol.style.Image -@exportProperty ol.style.Image.prototype.getRotation -@exportProperty ol.style.Image.prototype.getScale diff --git a/src/ol/style/imagestyle.js b/src/ol/style/imagestyle.js index 9b0411a22f..3928d92a5c 100644 --- a/src/ol/style/imagestyle.js +++ b/src/ol/style/imagestyle.js @@ -29,6 +29,7 @@ ol.style.ImageOptions; /** * @constructor * @param {ol.style.ImageOptions} options Options. + * @todo api */ ol.style.Image = function(options) { @@ -83,6 +84,7 @@ ol.style.Image.prototype.getRotateWithView = function() { /** * @return {number} Rotation. + * @todo api */ ol.style.Image.prototype.getRotation = function() { return this.rotation_; @@ -91,6 +93,7 @@ ol.style.Image.prototype.getRotation = function() { /** * @return {number} Scale. + * @todo api */ ol.style.Image.prototype.getScale = function() { return this.scale_; @@ -106,12 +109,14 @@ ol.style.Image.prototype.getSnapToPixel = function() { /** + * @function * @return {Array.} Anchor. */ ol.style.Image.prototype.getAnchor = goog.abstractMethod; /** + * @function * @param {number} pixelRatio Pixel ratio. * @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element. */ @@ -132,6 +137,7 @@ ol.style.Image.prototype.getHitDetectionImage = goog.abstractMethod; /** + * @function * @return {ol.Size} Size. */ ol.style.Image.prototype.getSize = goog.abstractMethod; diff --git a/src/ol/style/strokestyle.exports b/src/ol/style/strokestyle.exports deleted file mode 100644 index 3e2060e9d8..0000000000 --- a/src/ol/style/strokestyle.exports +++ /dev/null @@ -1,7 +0,0 @@ -@exportSymbol ol.style.Stroke -@exportProperty ol.style.Stroke.prototype.getColor -@exportProperty ol.style.Stroke.prototype.getLineCap -@exportProperty ol.style.Stroke.prototype.getLineDash -@exportProperty ol.style.Stroke.prototype.getLineJoin -@exportProperty ol.style.Stroke.prototype.getMiterLimit -@exportProperty ol.style.Stroke.prototype.getWidth diff --git a/src/ol/style/strokestyle.js b/src/ol/style/strokestyle.js index 08bbeab522..861a155c93 100644 --- a/src/ol/style/strokestyle.js +++ b/src/ol/style/strokestyle.js @@ -7,6 +7,7 @@ goog.require('ol.color'); /** * @constructor * @param {olx.style.StrokeOptions=} opt_options Options. + * @todo api */ ol.style.Stroke = function(opt_options) { @@ -52,6 +53,7 @@ ol.style.Stroke = function(opt_options) { /** * @return {ol.Color|string} Color. + * @todo api */ ol.style.Stroke.prototype.getColor = function() { return this.color_; @@ -60,6 +62,7 @@ ol.style.Stroke.prototype.getColor = function() { /** * @return {string|undefined} Line cap. + * @todo api */ ol.style.Stroke.prototype.getLineCap = function() { return this.lineCap_; @@ -68,6 +71,7 @@ ol.style.Stroke.prototype.getLineCap = function() { /** * @return {Array.} Line dash. + * @todo api */ ol.style.Stroke.prototype.getLineDash = function() { return this.lineDash_; @@ -76,6 +80,7 @@ ol.style.Stroke.prototype.getLineDash = function() { /** * @return {string|undefined} Line join. + * @todo api */ ol.style.Stroke.prototype.getLineJoin = function() { return this.lineJoin_; @@ -84,6 +89,7 @@ ol.style.Stroke.prototype.getLineJoin = function() { /** * @return {number|undefined} Miter limit. + * @todo api */ ol.style.Stroke.prototype.getMiterLimit = function() { return this.miterLimit_; @@ -92,6 +98,7 @@ ol.style.Stroke.prototype.getMiterLimit = function() { /** * @return {number|undefined} Width. + * @todo api */ ol.style.Stroke.prototype.getWidth = function() { return this.width_; diff --git a/src/ol/style/style.exports b/src/ol/style/style.exports deleted file mode 100644 index 94767397d0..0000000000 --- a/src/ol/style/style.exports +++ /dev/null @@ -1,6 +0,0 @@ -@exportSymbol ol.style.Style -@exportProperty ol.style.Style.prototype.getFill -@exportProperty ol.style.Style.prototype.getImage -@exportProperty ol.style.Style.prototype.getStroke -@exportProperty ol.style.Style.prototype.getText -@exportProperty ol.style.Style.prototype.getZIndex diff --git a/src/ol/style/style.js b/src/ol/style/style.js index 2016ee3f54..c6bc585fcc 100644 --- a/src/ol/style/style.js +++ b/src/ol/style/style.js @@ -8,7 +8,7 @@ goog.require('ol.style.Image'); /** * @constructor * @param {olx.style.StyleOptions=} opt_options Style options. - * @todo stability experimental + * @todo api */ ol.style.Style = function(opt_options) { @@ -49,6 +49,7 @@ ol.style.Style = function(opt_options) { /** * @return {ol.style.Fill} Fill style. + * @todo api */ ol.style.Style.prototype.getFill = function() { return this.fill_; @@ -57,6 +58,7 @@ ol.style.Style.prototype.getFill = function() { /** * @return {ol.style.Image} Image style. + * @todo api */ ol.style.Style.prototype.getImage = function() { return this.image_; @@ -65,6 +67,7 @@ ol.style.Style.prototype.getImage = function() { /** * @return {ol.style.Stroke} Stroke style. + * @todo api */ ol.style.Style.prototype.getStroke = function() { return this.stroke_; @@ -73,6 +76,7 @@ ol.style.Style.prototype.getStroke = function() { /** * @return {ol.style.Text} Text style. + * @todo api */ ol.style.Style.prototype.getText = function() { return this.text_; @@ -81,6 +85,7 @@ ol.style.Style.prototype.getText = function() { /** * @return {number|undefined} ZIndex. + * @todo api */ ol.style.Style.prototype.getZIndex = function() { return this.zIndex_; diff --git a/src/ol/style/textstyle.exports b/src/ol/style/textstyle.exports deleted file mode 100644 index 2dc53b5f5d..0000000000 --- a/src/ol/style/textstyle.exports +++ /dev/null @@ -1,9 +0,0 @@ -@exportSymbol ol.style.Text -@exportProperty ol.style.Text.prototype.getFill -@exportProperty ol.style.Text.prototype.getFont -@exportProperty ol.style.Text.prototype.getRotation -@exportProperty ol.style.Text.prototype.getScale -@exportProperty ol.style.Text.prototype.getStroke -@exportProperty ol.style.Text.prototype.getText -@exportProperty ol.style.Text.prototype.getTextAlign -@exportProperty ol.style.Text.prototype.getTextBaseline diff --git a/src/ol/style/textstyle.js b/src/ol/style/textstyle.js index da9bedee27..2ff02394b3 100644 --- a/src/ol/style/textstyle.js +++ b/src/ol/style/textstyle.js @@ -5,6 +5,7 @@ goog.provide('ol.style.Text'); /** * @constructor * @param {olx.style.TextOptions=} opt_options Options. + * @todo api */ ol.style.Text = function(opt_options) { @@ -74,6 +75,7 @@ ol.style.Text = function(opt_options) { /** * @return {string|undefined} Font. + * @todo api */ ol.style.Text.prototype.getFont = function() { return this.font_; @@ -98,6 +100,7 @@ ol.style.Text.prototype.getOffsetY = function() { /** * @return {ol.style.Fill} Fill style. + * @todo api */ ol.style.Text.prototype.getFill = function() { return this.fill_; @@ -106,6 +109,7 @@ ol.style.Text.prototype.getFill = function() { /** * @return {number|undefined} Rotation. + * @todo api */ ol.style.Text.prototype.getRotation = function() { return this.rotation_; @@ -114,6 +118,7 @@ ol.style.Text.prototype.getRotation = function() { /** * @return {number|undefined} Scale. + * @todo api */ ol.style.Text.prototype.getScale = function() { return this.scale_; @@ -122,6 +127,7 @@ ol.style.Text.prototype.getScale = function() { /** * @return {ol.style.Stroke} Stroke style. + * @todo api */ ol.style.Text.prototype.getStroke = function() { return this.stroke_; @@ -130,6 +136,7 @@ ol.style.Text.prototype.getStroke = function() { /** * @return {string|undefined} Text. + * @todo api */ ol.style.Text.prototype.getText = function() { return this.text_; @@ -138,6 +145,7 @@ ol.style.Text.prototype.getText = function() { /** * @return {string|undefined} Text align. + * @todo api */ ol.style.Text.prototype.getTextAlign = function() { return this.textAlign_; @@ -146,6 +154,7 @@ ol.style.Text.prototype.getTextAlign = function() { /** * @return {string|undefined} Text baseline. + * @todo api */ ol.style.Text.prototype.getTextBaseline = function() { return this.textBaseline_; diff --git a/src/ol/tile.exports b/src/ol/tile.exports deleted file mode 100644 index 33b1b0fdc8..0000000000 --- a/src/ol/tile.exports +++ /dev/null @@ -1 +0,0 @@ -@exportProperty ol.Tile.prototype.getTileCoord diff --git a/src/ol/tile.js b/src/ol/tile.js index 610150083e..4d13e0658b 100644 --- a/src/ol/tile.js +++ b/src/ol/tile.js @@ -72,7 +72,7 @@ ol.Tile.prototype.getKey = function() { /** * @return {ol.TileCoord} - * @todo stability experimental + * @todo api */ ol.Tile.prototype.getTileCoord = function() { return this.tileCoord; diff --git a/src/ol/tilecoord.exports b/src/ol/tilecoord.exports deleted file mode 100644 index 1719d37b9b..0000000000 --- a/src/ol/tilecoord.exports +++ /dev/null @@ -1 +0,0 @@ -@exportProperty ol.TileCoord.prototype.getZXY diff --git a/src/ol/tilecoord.js b/src/ol/tilecoord.js index 013cc5af2c..8d90fd393f 100644 --- a/src/ol/tilecoord.js +++ b/src/ol/tilecoord.js @@ -118,6 +118,7 @@ ol.TileCoord.getKeyZXY = function(z, x, y) { /** * @param {Array.=} opt_result Optional array to reuse. * @return {Array.} Array of z, x, y. + * @todo api */ ol.TileCoord.prototype.getZXY = function(opt_result) { if (goog.isDef(opt_result)) { diff --git a/src/ol/tilegrid/tilegrid.exports b/src/ol/tilegrid/tilegrid.exports deleted file mode 100644 index 5e1039d79f..0000000000 --- a/src/ol/tilegrid/tilegrid.exports +++ /dev/null @@ -1,5 +0,0 @@ -@exportSymbol ol.tilegrid.TileGrid -@exportProperty ol.tilegrid.TileGrid.prototype.getMinZoom -@exportProperty ol.tilegrid.TileGrid.prototype.getOrigin -@exportProperty ol.tilegrid.TileGrid.prototype.getResolutions -@exportProperty ol.tilegrid.TileGrid.prototype.getTileSize diff --git a/src/ol/tilegrid/tilegrid.js b/src/ol/tilegrid/tilegrid.js index ac547c42b3..beaf508869 100644 --- a/src/ol/tilegrid/tilegrid.js +++ b/src/ol/tilegrid/tilegrid.js @@ -29,7 +29,7 @@ ol.DEFAULT_MAX_ZOOM = 42; * @constructor * @param {olx.tilegrid.TileGridOptions} options Tile grid options. * @struct - * @todo stability experimental + * @todo api */ ol.tilegrid.TileGrid = function(options) { @@ -139,7 +139,6 @@ ol.tilegrid.TileGrid.prototype.forEachTileCoordParentTileRange = /** * @return {number} Max zoom. - * @todo stability experimental */ ol.tilegrid.TileGrid.prototype.getMaxZoom = function() { return this.maxZoom; @@ -148,7 +147,7 @@ ol.tilegrid.TileGrid.prototype.getMaxZoom = function() { /** * @return {number} Min zoom. - * @todo stability experimental + * @todo api */ ol.tilegrid.TileGrid.prototype.getMinZoom = function() { return this.minZoom; @@ -158,7 +157,7 @@ ol.tilegrid.TileGrid.prototype.getMinZoom = function() { /** * @param {number} z Z. * @return {ol.Coordinate} Origin. - * @todo stability experimental + * @todo api */ ol.tilegrid.TileGrid.prototype.getOrigin = function(z) { if (!goog.isNull(this.origin_)) { @@ -174,6 +173,7 @@ ol.tilegrid.TileGrid.prototype.getOrigin = function(z) { /** * @param {number} z Z. * @return {number} Resolution. + * @todo api */ ol.tilegrid.TileGrid.prototype.getResolution = function(z) { goog.asserts.assert(this.minZoom <= z && z <= this.maxZoom); @@ -183,7 +183,6 @@ ol.tilegrid.TileGrid.prototype.getResolution = function(z) { /** * @return {Array.} Resolutions. - * @todo stability experimental */ ol.tilegrid.TileGrid.prototype.getResolutions = function() { return this.resolutions_; @@ -372,7 +371,7 @@ ol.tilegrid.TileGrid.prototype.getTileCoordResolution = function(tileCoord) { /** * @param {number} z Z. * @return {number} Tile size. - * @todo stability experimental + * @todo api */ ol.tilegrid.TileGrid.prototype.getTileSize = function(z) { if (goog.isDef(this.tileSize_)) { diff --git a/src/ol/tilegrid/wmtstilegrid.exports b/src/ol/tilegrid/wmtstilegrid.exports deleted file mode 100644 index 654b18d9c8..0000000000 --- a/src/ol/tilegrid/wmtstilegrid.exports +++ /dev/null @@ -1,2 +0,0 @@ -@exportSymbol ol.tilegrid.WMTS -@exportProperty ol.tilegrid.WMTS.prototype.getMatrixIds diff --git a/src/ol/tilegrid/wmtstilegrid.js b/src/ol/tilegrid/wmtstilegrid.js index 5c4ad79de6..903ba96483 100644 --- a/src/ol/tilegrid/wmtstilegrid.js +++ b/src/ol/tilegrid/wmtstilegrid.js @@ -12,7 +12,7 @@ goog.require('ol.tilegrid.TileGrid'); * @extends {ol.tilegrid.TileGrid} * @param {olx.tilegrid.WMTSOptions} options WMTS options. * @struct - * @todo stability experimental + * @todo api */ ol.tilegrid.WMTS = function(options) { @@ -50,7 +50,7 @@ ol.tilegrid.WMTS.prototype.getMatrixId = function(z) { /** * @return {Array.} MatrixIds. - * @todo stability experimental + * @todo api */ ol.tilegrid.WMTS.prototype.getMatrixIds = function() { return this.matrixIds_; diff --git a/src/ol/tilegrid/xyztilegrid.exports b/src/ol/tilegrid/xyztilegrid.exports deleted file mode 100644 index f05509aca9..0000000000 --- a/src/ol/tilegrid/xyztilegrid.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.tilegrid.XYZ diff --git a/src/ol/tilegrid/xyztilegrid.js b/src/ol/tilegrid/xyztilegrid.js index d3bdd82d6b..75a63200b5 100644 --- a/src/ol/tilegrid/xyztilegrid.js +++ b/src/ol/tilegrid/xyztilegrid.js @@ -14,7 +14,7 @@ goog.require('ol.tilegrid.TileGrid'); * @extends {ol.tilegrid.TileGrid} * @param {olx.tilegrid.XYZOptions} options XYZ options. * @struct - * @todo stability experimental + * @todo api */ ol.tilegrid.XYZ = function(options) { diff --git a/src/ol/tilegrid/zoomifytilegrid.exports b/src/ol/tilegrid/zoomifytilegrid.exports deleted file mode 100644 index afbfc424a2..0000000000 --- a/src/ol/tilegrid/zoomifytilegrid.exports +++ /dev/null @@ -1 +0,0 @@ -@exportSymbol ol.tilegrid.Zoomify diff --git a/src/ol/tilegrid/zoomifytilegrid.js b/src/ol/tilegrid/zoomifytilegrid.js index 6bf221c8fd..43e5469282 100644 --- a/src/ol/tilegrid/zoomifytilegrid.js +++ b/src/ol/tilegrid/zoomifytilegrid.js @@ -11,7 +11,7 @@ goog.require('ol.tilegrid.TileGrid'); * @constructor * @extends {ol.tilegrid.TileGrid} * @param {olx.tilegrid.ZoomifyOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.tilegrid.Zoomify = function(opt_options) { var options = goog.isDef(opt_options) ? opt_options : options; diff --git a/src/ol/tileloadfunction.js b/src/ol/tileloadfunction.js index 9524830044..8e3ffa05c4 100644 --- a/src/ol/tileloadfunction.js +++ b/src/ol/tileloadfunction.js @@ -6,6 +6,6 @@ goog.provide('ol.TileLoadFunctionType'); * `{string}` for the src as arguments. * * @typedef {function(ol.ImageTile, string)} - * @todo stability experimental + * @todo api */ ol.TileLoadFunctionType; diff --git a/src/ol/tileurlfunction.js b/src/ol/tileurlfunction.js index 9cd028d1ef..23c0bf311c 100644 --- a/src/ol/tileurlfunction.js +++ b/src/ol/tileurlfunction.js @@ -14,7 +14,7 @@ goog.require('ol.TileCoord'); * * @typedef {function(ol.TileCoord, number, * ol.proj.Projection): (string|undefined)} - * @todo stability experimental + * @todo api */ ol.TileUrlFunctionType; diff --git a/src/ol/transformfunction.js b/src/ol/transformfunction.js index 3bf13896ec..e37975ed93 100644 --- a/src/ol/transformfunction.js +++ b/src/ol/transformfunction.js @@ -8,6 +8,6 @@ goog.provide('ol.TransformFunction'); * returns the output array. * * @typedef {function(Array., Array.=, number=): Array.} - * @todo stability experimental + * @todo api */ ol.TransformFunction; diff --git a/src/ol/view2d.exports b/src/ol/view2d.exports deleted file mode 100644 index e665804784..0000000000 --- a/src/ol/view2d.exports +++ /dev/null @@ -1,11 +0,0 @@ -@exportSymbol ol.View2D -@exportProperty ol.View2D.prototype.calculateExtent -@exportProperty ol.View2D.prototype.constrainResolution -@exportProperty ol.View2D.prototype.constrainRotation -@exportProperty ol.View2D.prototype.fitExtent -@exportProperty ol.View2D.prototype.fitGeometry -@exportProperty ol.View2D.prototype.centerOn -@exportProperty ol.View2D.prototype.getView2D -@exportProperty ol.View2D.prototype.getZoom -@exportProperty ol.View2D.prototype.rotate -@exportProperty ol.View2D.prototype.setZoom diff --git a/src/ol/view2d.js b/src/ol/view2d.js index 72f67bd150..0a20d803c7 100644 --- a/src/ol/view2d.js +++ b/src/ol/view2d.js @@ -23,7 +23,6 @@ goog.require('ol.proj.Units'); /** * @enum {string} - * @todo stability experimental */ ol.View2DProperty = { CENTER: 'center', @@ -86,11 +85,11 @@ ol.View2DProperty = { * @implements {ol.IView3D} * @extends {ol.View} * @param {olx.View2DOptions=} opt_options View2D options. - * @todo stability experimental * @todo observable center {ol.Coordinate} the center of the view * @todo observable projection {ol.proj.Projection} the projection of the view * @todo observable resolution {number} the resolution of the view * @todo observable rotation {number} the rotation of the view + * @todo api */ ol.View2D = function(opt_options) { goog.base(this); @@ -196,7 +195,7 @@ ol.View2D.prototype.constrainCenter = function(center) { * @param {number=} opt_delta Delta. Default is `0`. * @param {number=} opt_direction Direction. Default is `0`. * @return {number|undefined} Constrained resolution. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.constrainResolution = function( resolution, opt_delta, opt_direction) { @@ -211,7 +210,7 @@ ol.View2D.prototype.constrainResolution = function( * @param {number|undefined} rotation Rotation. * @param {number=} opt_delta Delta. Default is `0`. * @return {number|undefined} Constrained rotation. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.constrainRotation = function(rotation, opt_delta) { var delta = opt_delta || 0; @@ -221,6 +220,7 @@ ol.View2D.prototype.constrainRotation = function(rotation, opt_delta) { /** * @inheritDoc + * @todo api */ ol.View2D.prototype.getCenter = function() { return /** @type {ol.Coordinate|undefined} */ ( @@ -237,7 +237,7 @@ goog.exportProperty( * resolution and the current center. * @param {ol.Size} size Box pixel size. * @return {ol.Extent} Extent. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.calculateExtent = function(size) { goog.asserts.assert(this.isDef()); @@ -253,6 +253,7 @@ ol.View2D.prototype.calculateExtent = function(size) { /** * @inheritDoc + * @todo api */ ol.View2D.prototype.getProjection = function() { return /** @type {ol.proj.Projection|undefined} */ ( @@ -266,6 +267,7 @@ goog.exportProperty( /** * @inheritDoc + * @todo api */ ol.View2D.prototype.getResolution = function() { return /** @type {number|undefined} */ ( @@ -316,6 +318,7 @@ ol.View2D.prototype.getResolutionForValueFunction = function(opt_power) { /** * @inheritDoc + * @todo api */ ol.View2D.prototype.getRotation = function() { return /** @type {number|undefined} */ (this.get(ol.View2DProperty.ROTATION)); @@ -353,6 +356,7 @@ ol.View2D.prototype.getValueForResolutionFunction = function(opt_power) { /** * @inheritDoc + * @todo api */ ol.View2D.prototype.getView2D = function() { return this; @@ -388,7 +392,7 @@ ol.View2D.prototype.getView3D = function() { * Get the current zoom level. Return undefined if the current * resolution is undefined or not a "constrained resolution". * @return {number|undefined} Zoom. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.getZoom = function() { var zoom; @@ -414,7 +418,7 @@ ol.View2D.prototype.getZoom = function() { * Fit the given extent based on the given map size. * @param {ol.Extent} extent Extent. * @param {ol.Size} size Box pixel size. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.fitExtent = function(extent, size) { if (!ol.extent.isEmpty(extent)) { @@ -436,7 +440,7 @@ ol.View2D.prototype.fitExtent = function(extent, size) { * @param {ol.geom.SimpleGeometry} geometry Geometry. * @param {ol.Size} size Box pixel size. * @param {olx.View2D.fitGeometryOptions=} opt_options Options. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.fitGeometry = function(geometry, size, opt_options) { var options = goog.isDef(opt_options) ? opt_options : {}; @@ -503,7 +507,7 @@ ol.View2D.prototype.fitGeometry = function(geometry, size, opt_options) { * @param {ol.Coordinate} coordinate Coordinate. * @param {ol.Size} size Box pixel size. * @param {ol.Pixel} position Position on the view to center on. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.centerOn = function(coordinate, size, position) { // calculate rotated position @@ -538,6 +542,7 @@ ol.View2D.prototype.isDef = function() { * Rotate the view around a given coordinate. * @param {number} rotation New rotation value for the view. * @param {ol.Coordinate=} opt_anchor The rotation center. + * @todo api */ ol.View2D.prototype.rotate = function(rotation, opt_anchor) { if (goog.isDef(opt_anchor)) { @@ -551,7 +556,7 @@ ol.View2D.prototype.rotate = function(rotation, opt_anchor) { /** * Set the center of the current view. * @param {ol.Coordinate|undefined} center Center. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.setCenter = function(center) { this.set(ol.View2DProperty.CENTER, center); @@ -566,7 +571,7 @@ goog.exportProperty( * Set the projection of this view. * Warning! This code is not yet implemented. Function should not be used. * @param {ol.proj.Projection|undefined} projection Projection. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.setProjection = function(projection) { this.set(ol.View2DProperty.PROJECTION, projection); @@ -580,7 +585,7 @@ goog.exportProperty( /** * Set the resolution for this view. * @param {number|undefined} resolution Resolution. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.setResolution = function(resolution) { this.set(ol.View2DProperty.RESOLUTION, resolution); @@ -594,7 +599,7 @@ goog.exportProperty( /** * Set the rotation for this view. * @param {number|undefined} rotation Rotation. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.setRotation = function(rotation) { this.set(ol.View2DProperty.ROTATION, rotation); @@ -608,7 +613,7 @@ goog.exportProperty( /** * Zoom to a specific zoom level. * @param {number} zoom Zoom level. - * @todo stability experimental + * @todo api */ ol.View2D.prototype.setZoom = function(zoom) { var resolution = this.constrainResolution(this.maxResolution_, zoom, 0); diff --git a/src/ol/webgl/context.exports b/src/ol/webgl/context.exports deleted file mode 100644 index 60a3eea651..0000000000 --- a/src/ol/webgl/context.exports +++ /dev/null @@ -1,3 +0,0 @@ -@exportSymbol ol.webgl.Context -@exportProperty ol.webgl.Context.prototype.getGL -@exportProperty ol.webgl.Context.prototype.useProgram diff --git a/src/ol/webgl/context.js b/src/ol/webgl/context.js index bca86a5dc2..78b98534af 100644 --- a/src/ol/webgl/context.js +++ b/src/ol/webgl/context.js @@ -23,6 +23,7 @@ ol.webgl.BufferCacheEntry; * @extends {goog.events.EventTarget} * @param {HTMLCanvasElement} canvas Canvas. * @param {WebGLRenderingContext} gl GL. + * @todo api */ ol.webgl.Context = function(canvas, gl) { @@ -159,6 +160,7 @@ ol.webgl.Context.prototype.getCanvas = function() { /** * @return {WebGLRenderingContext} GL. + * @todo api */ ol.webgl.Context.prototype.getGL = function() { return this.gl_; @@ -246,6 +248,7 @@ ol.webgl.Context.prototype.handleWebGLContextRestored = function() { /** * @param {WebGLProgram} program Program. * @return {boolean} Changed. + * @todo api */ ol.webgl.Context.prototype.useProgram = function(program) { if (program == this.currentProgram_) { diff --git a/src/oli.jsdoc b/src/oli.jsdoc new file mode 100644 index 0000000000..bc7e58e4f1 --- /dev/null +++ b/src/oli.jsdoc @@ -0,0 +1,3 @@ +/** + * @namespace oli + */ diff --git a/tasks/build.js b/tasks/build.js new file mode 100644 index 0000000000..e778bac0c5 --- /dev/null +++ b/tasks/build.js @@ -0,0 +1,217 @@ +/** + * This task builds OpenLayers with the Closure Compiler. + */ +var fs = require('fs'); +var path = require('path'); + +var async = require('async'); +var closure = require('closure-util'); +var fse = require('fs-extra'); +var nomnom = require('nomnom'); +var temp = require('temp').track(); + +var generateExports = require('./generate-exports'); + +var log = closure.log; +var root = path.join(__dirname, '..'); + + +/** + * Assert that a provided config object is valid. + * @param {Object} config Build configuration object. + * @param {function(Error)} callback Called with an error if config is invalid. + */ +function assertValidConfig(config, callback) { + process.nextTick(function() { + if (!Array.isArray(config.exports)) { + callback(new Error('Config missing "exports" array')); + return; + } + if (typeof config.compile !== 'object') { + callback(new Error('Config missing "compile" object')); + return; + } + if (config.jvm && !Array.isArray(config.jvm)) { + callback(new Error('Config "jvm" must be an array')); + return; + } + if (config.src && !Array.isArray(config.src)) { + callback(new Error('Config "src" must be an array')); + return; + } + callback(null); + }); +} + + +/** + * Read the build configuration file. + * @param {string} configPath Path to config file. + * @param {function(Error, Object)} callback Callback. + */ +function readConfig(configPath, callback) { + fs.readFile(configPath, function(err, data) { + if (err) { + if (err.code === 'ENOENT') { + err = new Error('Unable to find config file: ' + configPath); + } + callback(err); + return; + } + var config; + try { + config = JSON.parse(String(data)); + } catch (err2) { + callback(new Error('Trouble parsing config as JSON: ' + err2.message)); + return; + } + callback(null, config); + }); +} + + +/** + * Write the exports code to a temporary file. + * @param {string} exports Exports code. + * @param {function(Error, string)} callback Called with the path to the temp + * file (or any error). + */ +function writeExports(exports, callback) { + temp.open({prefix: 'exports', suffix: '.js'}, function(err, info) { + if (err) { + callback(err); + return; + } + log.verbose('build', 'Writing exports: ' + info.path); + fs.writeFile(info.path, exports, function(err) { + if (err) { + callback(err); + return; + } + fs.close(info.fd, function(err) { + if (err) { + callback(err); + return; + } + callback(null, info.path); + }); + }); + }); +} + + +/** + * Get the list of sources sorted in dependency order. + * @param {Array.} src List of paths or patterns to source files. By + * default, all .js files in the src directory are included. + * @param {string} exports Exports code (with goog.exportSymbol calls). + * @param {function(Error, Array.)} callback Called with a list of paths + * or any error. + */ +function getDependencies(src, exports, callback) { + writeExports(exports, function(err, exportsPath) { + if (err) { + callback(err); + return; + } + log.info('ol', 'Parsing dependencies'); + src = src || ['src/**/*.js']; + closure.getDependencies({lib: src}, function(err, paths) { + if (err) { + callback(err); + return; + } + paths.push(exportsPath); + callback(null, paths); + }); + }); +} + + +/** + * Run the compiler. + * @param {Object} config Build configuration object. + * @param {Array.} paths List of paths to source files. + * @param {function(Error, string)} callback Called with the compiled output or + * any error. + */ +function build(config, paths, callback) { + log.info('ol', 'Compiling ' + paths.length + ' sources'); + var options = config.compile; + options.js = paths.concat(options.js || []); + if (config.jvm) { + closure.compile(options, config.jvm, callback); + } else { + closure.compile(options, callback); + } +} + + +/** + * Generate a build of the library. + * @param {Object} config Build configuration object. Must have an "exports" + * array and a "compile" object with options for the compiler. + * @param {function(Error, string)} callback Called with the compiled source + * or any error. + */ +function main(config, callback) { + async.waterfall([ + assertValidConfig.bind(null, config), + generateExports.bind(null, config.exports), + getDependencies.bind(null, config.src), + build.bind(null, config) + ], callback); +} + + +/** + * If running this module directly, read the config file and call the main + * function. + */ +if (require.main === module) { + var options = nomnom.options({ + config: { + position: 0, + required: true, + help: 'Path to JSON config file' + }, + output: { + position: 1, + required: true, + help: 'Output file path' + }, + loglevel: { + abbr: 'l', + choices: ['silly', 'verbose', 'info', 'warn', 'error'], + default: 'info', + help: 'Log level', + metavar: 'LEVEL' + } + }).parse(); + + /** + * Set the log level. + * @type {string} + */ + log.level = options.loglevel; + + // read the config, run the main function, and write the output file + async.waterfall([ + readConfig.bind(null, options.config), + main, + fse.outputFile.bind(fse, options.output) + ], function(err) { + if (err) { + log.error(err.message); + process.exit(1); + } else { + process.exit(0); + } + }); +} + + +/** + * Export main function. + */ +module.exports = main; diff --git a/tasks/generate-exports.js b/tasks/generate-exports.js new file mode 100644 index 0000000000..ab5c4d4b21 --- /dev/null +++ b/tasks/generate-exports.js @@ -0,0 +1,232 @@ +var fs = require('fs'); +var path = require('path'); + +var async = require('async'); +var fse = require('fs-extra'); +var nomnom = require('nomnom'); + +var generateSymbols = require('./generate-symbols'); + +var build = path.join(__dirname, '..', 'build'); + + +/** + * Get a list of patterns from the config file. If configPath is provided + * it is assumed to be a JSON file with an 'exports' member that is a list + * of symbol names or patterns. + * + * @param {string} configPath Path to config file. + * @param {function(Error, Array.)} callback Called with the list of + * patterns. + */ +function getPatterns(configPath, callback) { + if (configPath) { + fs.readFile(configPath, function(err, data) { + if (err) { + callback(err); + return; + } + var obj; + try { + obj = JSON.parse(String(data)); + } catch (err) { + callback(new Error('Trouble parsing file as JSON: ' + options.config)); + return; + } + var patterns = obj.exports; + if (patterns && !Array.isArray(patterns)) { + callback(new Error('Expected an exports array, got: ' + patterns)); + return; + } + callback(null, patterns); + }); + } else { + process.nextTick(function() { + callback(null, ['*']); + }); + } +} + + +/** + * Read the symbols file. + * @param {Array.} patterns List of patterns to pass along. + * @param {funciton(Error, Array., Array.)} callback Called + * with the patterns and symbols (or any error). + */ +function getSymbols(patterns, callback) { + generateSymbols(function(err) { + if (err) { + callback(new Error('Trouble generating symbols: ' + err.message)); + return; + } + var symbols = require('../build/symbols.json').symbols; + callback(null, patterns, symbols); + }); +} + + +/** + * Generate a list of symbol names given a list of patterns. Patterns may + * include a * wildcard at the end of the string, in which case all symbol names + * that start with the preceeding string will be matched (e.g 'foo.Bar#*' will + * match all symbol names that start with 'foo.Bar#'). + * + * @param {Array.} patterns A list of symbol names to match. Wildcards + * at the end of a string will match multiple names. + * @param {Array.} symbols List of symbols. + * @param {function(Error, Array.)} callback Called with the filtered + * list of symbols (or any error). + */ +function filterSymbols(patterns, symbols, callback) { + var matches = []; + + var lookup = {}; + symbols.forEach(function(symbol) { + lookup[symbol.name] = symbol; + }); + + patterns.forEach(function(name) { + var match = false; + var pattern = (name.substr(-1) === '*'); + if (pattern) { + name = name.substr(0, name.length - 1); + symbols.forEach(function(symbol) { + if (symbol.name.indexOf(name) === 0) { + matches.push(symbol); + match = true; + } + }); + } else { + var symbol = lookup[name]; + if (symbol) { + matches.push(symbol); + match = true; + } + } + if (!match) { + var message = 'No matching symbol found: ' + name + (pattern ? '*' : ''); + callback(new Error(message)); + } + }); + + callback(null, matches); +} + + +/** + * Generate goog code to export a named symbol. + * @param {string} name Symbol name. + * @return {string} Export code. + */ +function formatSymbolExport(name) { + return 'goog.exportSymbol(\n' + + ' \'' + name + '\',\n' + + ' ' + name + ');\n'; +} + + +/** + * Generate goog code to export a property. + * @param {string} name Property long name (e.g. foo.Bar#baz). + * @return {string} Export code. + */ +function formatPropertyExport(name) { + var parts = name.split('#'); + var prototype = parts[0] + '.prototype'; + var property = parts[1]; + return 'goog.exportProperty(\n' + + ' ' + prototype + ',\n' + + ' \'' + property + '\',\n' + + ' ' + prototype + '.' + property + ');\n'; +} + + +/** + * Generate export code given a list symbol names. + * @param {Array.} symbols List of symbols. + * @return {string} Export code. + */ +function generateExports(symbols) { + var blocks = []; + var requires = {}; + symbols.forEach(function(symbol) { + symbol.provides.forEach(function(provide) { + requires[provide] = true; + }); + var name = symbol.name; + if (name.indexOf('#') > 0) { + blocks.push(formatPropertyExport(name)); + } else { + blocks.push(formatSymbolExport(name)); + } + }); + blocks.unshift('\n'); + Object.keys(requires).sort().reverse().forEach(function(name) { + blocks.unshift('goog.require(\'' + name + '\');'); + }); + return blocks.join('\n'); +} + + +/** + * Generate the exports code. + * + * @param {Array.} patterns List of symbol names or patterns. + * @param {function(Error, string)} callback Called with the exports code or any + * error generating it. + */ +function main(patterns, callback) { + async.waterfall([ + getSymbols.bind(null, patterns), + filterSymbols, + function(symbols, done) { + var code, err; + try { + code = generateExports(symbols); + } catch (e) { + err = e; + } + done(err, code); + } + ], callback); +} + + +/** + * If running this module directly, read the config file, call the main + * function, and write the output file. + */ +if (require.main === module) { + var options = nomnom.options({ + output: { + position: 0, + required: true, + help: 'Output file path' + }, + config: { + abbr: 'c', + help: 'Path to JSON config file', + metavar: 'CONFIG' + } + }).parse(); + + async.waterfall([ + getPatterns.bind(null, options.config), + main, + fse.outputFile.bind(fse, options.output) + ], function(err) { + if (err) { + console.error(err.message); + process.exit(1); + } else { + process.exit(0); + } + }); +} + + +/** + * Export main function. + */ +module.exports = main; diff --git a/tasks/generate-symbols.js b/tasks/generate-symbols.js new file mode 100644 index 0000000000..d2882490b4 --- /dev/null +++ b/tasks/generate-symbols.js @@ -0,0 +1,287 @@ +var fs = require('fs'); +var path = require('path'); +var spawn = require('child_process').spawn; + +var async = require('async'); +var fse = require('fs-extra'); +var walk = require('walk').walk; + +var sourceDir = path.join(__dirname, '..', 'src', 'ol'); +var destPath = path.join(__dirname, '..', 'build', 'symbols.json'); +var jsdoc = path.join(__dirname, '..', 'node_modules', '.bin', 'jsdoc'); +var jsdocConfig = path.join( + __dirname, '..', 'buildcfg', 'jsdoc', 'symbols', 'conf.json'); + + +/** + * Read symbols from dest file. + * @param {function(Error, Array, Date)} callback Callback called with any + * error, the symbols array, and the mtime of the symbols file. + */ +function readSymbols(callback) { + fs.stat(destPath, function(err, stats) { + if (err) { + if (err.code === 'ENOENT') { + callback(null, [], new Date(0)); + } else { + callback(err); + } + } else { + fs.readFile(destPath, function(err, data) { + if (err) { + callback(err); + } else { + callback(null, JSON.parse(String(data)).symbols, stats.mtime); + } + }); + } + }); +} + + +function makeUnique(array) { + var values = {}; + array.forEach(function(value) { + values[value] = true; + }); + return Object.keys(values); +} + + +/** + * Generate a list of .js paths in the source directory that are newer than + * the symbols file. + * @param {Array} symbols Array of symbol metadata. + * @param {Date} date Modification time of symbols file. + * @param {function(Error, Array, Array.)} callback Callback called with + * any error, the symbols array, and the array of newer source paths. + */ +function getNewer(symbols, date, callback) { + var allPaths = []; + var newerPaths = []; + + var walker = walk(sourceDir); + walker.on('file', function(root, stats, next) { + var sourcePath = path.join(root, stats.name); + if (/\.js$/.test(sourcePath)) { + allPaths.push(sourcePath); + if (stats.mtime > date) { + newerPaths.push(sourcePath); + } + } + next(); + }); + walker.on('errors', function() { + callback(new Error('Trouble walking ' + sourceDir)); + }); + walker.on('end', function() { + // prune symbols if file no longer exists or has been modified + var lookup = {}; + symbols.forEach(function(symbol) { + lookup[symbol.name] = symbol; + }); + + /** + * Gather paths for all parent symbols. + * @param {Object} symbol Symbol to check. + * @param {Array.} paths Current paths. + */ + function gatherParentPaths(symbol, paths) { + if (symbol.extends) { + symbol.extends.forEach(function(name) { + if (name in lookup) { + var parent = lookup[name]; + paths.push(parent.path); + gatherParentPaths(parent, paths); + } + }); + } + } + + var dirtyPaths = []; + + symbols = symbols.filter(function(symbol) { + var dirty = allPaths.indexOf(symbol.path) < 0; + if (!dirty) { + // confirm that symbol and all parent paths are not newer + var paths = [symbol.path]; + gatherParentPaths(symbol, paths); + dirty = paths.some(function(p) { + return newerPaths.indexOf(p) >= 0; + }); + if (dirty) { + dirtyPaths.push(symbol.path); + } + } + return !dirty; + }); + + callback(null, symbols, makeUnique(newerPaths.concat(dirtyPaths))); + }); +} + + +/** + * Spawn JSDoc. + * @param {Array} symbols Array of symbol metadata. + * @param {Array.} newerSources Paths to newer source files. + * @param {function(Error, Array, string)} callback Callback called with any + * error, existing symbols, and the JSDoc output. + */ +function spawnJSDoc(symbols, newerSources, callback) { + if (newerSources.length === 0) { + callback(null, symbols, JSON.stringify({symbols: []})); + return; + } + + var output = ''; + var errors = ''; + var child = spawn(jsdoc, ['-c', jsdocConfig].concat(newerSources)); + + child.stdout.on('data', function(data) { + output += String(data); + }); + + child.stderr.on('data', function(data) { + errors += String(data); + }); + + child.on('exit', function(code) { + if (code) { + callback(new Error(errors || 'JSDoc failed with no output')); + } else { + callback(null, symbols, output); + } + }); +} + + +/** + * Given the path to a source file, get the list of provides. + * @param {string} srcPath Path to source file. + * @param {function(Error, Array.)} callback Called with a list of + * provides or any error. + */ +var getProvides = async.memoize(function(srcPath, callback) { + fs.readFile(srcPath, function(err, data) { + if (err) { + callback(err); + return; + } + var provides = []; + var matcher = /goog\.provide\('(.*)'\)/; + String(data).split('\n').forEach(function(line) { + var match = line.match(matcher); + if (match) { + provides.push(match[1]); + } + }); + callback(null, provides); + }); +}); + + +/** + * Add provides to a symbol. + * @param {Object} symbol Symbol object. + * @param {function(Error, Object)} callback Called with the augmented symbol or + * any error. + */ +function addProvides(symbol, callback) { + getProvides(symbol.path, function(err, provides) { + if (err) { + callback(err); + return; + } + symbol.provides = provides; + callback(null, symbol); + }); +} + + +/** + * Parse JSDoc output and add provides data to each symbol. + * @param {Array} symbols Existing symbols. + * @param {string} output Output from JSDoc. + * @param {function(Error, Array)} callback Concatenated symbols. + */ +function addAllProvides(symbols, output, callback) { + if (!output) { + callback(new Error('Expected JSON output')); + return; + } + + var data; + try { + data = JSON.parse(String(output)); + } catch (err) { + callback(new Error('Failed to parse output as JSON: ' + output)); + return; + } + + if (!data || !Array.isArray(data.symbols)) { + callback(new Error('Expected symbols array: ' + output)); + return; + } + + async.map(data.symbols, addProvides, function(err, newSymbols) { + callback(err, symbols, newSymbols); + }); +} + + +/** + * Write symbol metadata to the symbols file. + * @param {Array} symbols Existing symbols. + * @param {Array} newSymbols New symbols. + * @param {function(Error)} callback Callback. + */ +function writeSymbols(symbols, newSymbols, callback) { + + symbols = symbols.concat(newSymbols).sort(function(a, b) { + return a.name < b.name ? -1 : 1; + }); + + var str = JSON.stringify({symbols: symbols}, null, ' '); + fse.outputFile(destPath, str, callback); +} + + +/** + * Determine which source files have been changed, run JSDoc against those, + * write out exported symbols, and clean up the build dir. + * + * @param {function(Error)} callback Called when the symbols file has been + * written (or if an error occurs). + */ +function main(callback) { + async.waterfall([ + readSymbols, + getNewer, + spawnJSDoc, + addAllProvides, + writeSymbols + ], callback); +} + + +/** + * If running this module directly, read the config file and call the main + * function. + */ +if (require.main === module) { + main(function(err) { + if (err) { + console.error(err.message); + process.exit(1); + } else { + process.exit(0); + } + }); +} + + +/** + * Export main function. + */ +module.exports = main; diff --git a/tasks/readme.md b/tasks/readme.md new file mode 100644 index 0000000000..5710e143c9 --- /dev/null +++ b/tasks/readme.md @@ -0,0 +1,83 @@ +# Tasks + +This directory contains utility scripts for working with the library. + + +## `build.js` + +Builds the library based on a configuration file. See the `--help` option for more detail. + + node tasks/build.js --help + +### Build configuration files + +Build configuration files are JSON files that are used to determine what should be exported from the library and what options should be passed to the compiler. + +**Required configuration properties** + + * **exports** - `Array.` An array of symbol names or patterns to be exported (names that are used in your application). For example, including `"ol.Map"` will export the map constructor. Method names are prefixed with `#`. So `"ol.Map#getView"` will export the map's `getView` method. You can use a `*` at the end to match multiple names. The pattern `"ol.Map#*"` will export all map methods. + + * **compile** - `Object` An object whose properties are [Closure Compiler options](https://github.com/openlayers/closure-util/blob/master/compiler-options.txt). Property names match the option names without the `--` prefix (e.g. `"compilation_level": "ADVANCED_OPTIMIZATIONS"` would set the `--compilation_level` option). Where an option can be specified multiple times, use an array for the value (e.g. `"externs": ["one.js", "two.js"]`). Where an option is used as a flag, use a boolean value (e.g. `"use_types_for_optimization": true`). + +**Optional configuration properties** + + * **src** - `Array.` Optional array of [path patterns](https://github.com/isaacs/minimatch/blob/master/README.md) for source files. This defaults to `["src/**/*.js"]` which will match all `.js` files in the `src` directory. To include a different set of source files, provide an array of path patterns. Note that these patterns are `/` delimited even on Windows. + + * **jvm** - `Array.` Optional array of [command line options](https://code.google.com/p/closure-compiler/wiki/FAQ#What_are_the_recommended_Java_VM_command-line_options?) for the compiler. By default, the Compiler is run with `['-server', '-XX:+TieredCompilation']`. + +The build task generates a list of source files sorted in dependency order and passes these to the compiler. This takes the place of the `--js` options that you would use when calling the compiler directly. If you want to add additional source files, typically you would use the `src` array described above. This works with sources that have `goog.require` and/or `goog.provide` calls (which are used to sort dependencies). If you want to force the inclusion of files that don't use `goog.require` or `goog.provide`, you can use the `js` property of the `compile` object. Paths in the `js` array will be passed to the compiler **after** all other source files. + +Paths in your config file should be relative to the current working directory (when you call `node tasks/build.js`). Note that this means paths are not necessarily relative to the config file itself. + +Below is a complete `build.json` configuration file that would generate a build including every symbol in the library (much more than you'd ever need). + +```json +{ + "exports": ["*"], + "compile": { + "externs": [ + "externs/bingmaps.js", + "externs/geojson.js", + "externs/oli.js", + "externs/olx.js", + "externs/proj4js.js", + "externs/tilejson.js", + "externs/topojson.js", + "externs/vbarray.js" + ], + "define": [ + "goog.dom.ASSUME_STANDARDS_MODE=true", + "goog.DEBUG=false" + ], + "compilation_level": "ADVANCED_OPTIMIZATIONS", + "output_wrapper": "(function(){%output%})();", + "use_types_for_optimization": true + } +} +``` + +To generate a build named `ol.min.js` with the `build.json`, you would run this: + + node tasks/build.js build.json ol.min.js + + +## `generate-exports.js` + +Called internally to generate a `build/exports.js` file optionally with a limited set of exports. + + +## `generate-symbols.js` + +Called internally to parse the library for API annotations and write out a `build/symbols.json` file. + + +## `parse-examples.js` + +Called after install to generate an example index. After new examples are added, run `node tasks/parse-examples.js` to regenerate the example index. + + +## `serve.js` + +Run a debug server that provides all library sources unminified. Provides a static server for examples and tests. See the `--help` option for more detail. + + node tasks/serve.js --help diff --git a/tasks/serve.js b/tasks/serve.js index 61ed865dbf..23118a5959 100644 --- a/tasks/serve.js +++ b/tasks/serve.js @@ -8,8 +8,30 @@ var path = require('path'); var url = require('url'); var closure = require('closure-util'); +var nomnom = require('nomnom'); + var log = closure.log; +var options = nomnom.options({ + port: { + abbr: 'p', + default: 3000, + help: 'Port for incoming connections', + metavar: 'PORT' + }, + loglevel: { + abbr: 'l', + choices: ['silly', 'verbose', 'info', 'warn', 'error'], + default: 'info', + help: 'Log level', + metavar: 'LEVEL' + } +}).parse(); + + +/** @type {string} */ +log.level = options.loglevel; + log.info('ol', 'Parsing dependencies ...'); var manager = new closure.Manager({ closure: true, // use the bundled Closure Library @@ -40,8 +62,9 @@ manager.on('ready', function() { return main; } }); - server.listen(3000, function() { - log.info('ol', 'Listening on http://localhost:3000/ (Ctrl+C to stop)'); + server.listen(options.port, function() { + log.info('ol', 'Listening on http://localhost:' + + options.port + '/ (Ctrl+C to stop)'); }); server.on('error', function(err) { log.error('ol', 'Server failed to start: ' + err.message);