From 720052de1278eebfddd019f47e3064442fdc3696 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 16:54:33 +0200 Subject: [PATCH 01/11] New landing page --- apidoc/index.md | 61 ++++++++++++++++-------- apidoc/template/static/styles/jaguar.css | 9 ++++ 2 files changed, 50 insertions(+), 20 deletions(-) diff --git a/apidoc/index.md b/apidoc/index.md index d4ead4ed78..f0a9bec988 100644 --- a/apidoc/index.md +++ b/apidoc/index.md @@ -1,20 +1,41 @@ -Finding your way around ------------------------ -See the class list to the right and especially take a look at {@link ol.Map} and {@link ol.layer.Layer} because those are the central objects. - -In general every use of OpenLayers starts by initializing a map, then adding the required layers. Controls and interactions can be added to change the behavior of the map. - -Projections ------------ -A {@link ol.proj.Projection} defines which point on earth is represented by a pair of coordinates. -Coordinates within OpenLayers can be used in various projections where some common projections are always supported, -others can be used via [Proj4js](http://trac.osgeo.org/proj4js/). - -Maps and Layers ---------------- -A map in OpenLayers is essentially a staple of layers that is viewed from the top. Layers are responsible for retrieving data and displaying it. - -Contributing ------------- -See [CONTRIBUTING.md](https://github.com/openlayers/ol3/blob/master/CONTRIBUTING.md) for instructions -on building and testing OpenLayers. The file does also describe how to commit your changes to OpenLayers. + + + + + + + + + + + + + + + + +
MapViewLayers

A [map](ol.Map.html) is made of [layers](ol.layer.html), a [view](ol.View.html) to visualize them, [interactions](ol.interaction.html) to modify map content and [controls](ol.control.html) with UI components.

+[Overview](ol.Map.html)
+[Creation](ol.Map.html#Map)
+[Events](ol.MapBrowserEvent.html)

The view manages the visual parameters of the map view, like resolution or rotation.

+[ol.View2D](ol.View2D.html) with center, projection, resolution and rotation

Layers are lightweight containers that get their data from [sources](ol.source.html).

+[ol.layer.Tile](ol.layer.Tile.html)
+[ol.layer.Image](ol.layer.Image)
+[ol.layer.Vector](ol.layer.Vector)
ControlsInteractionsSources and formats
[Map default controls](ol.control.html#defaults)
+[All controls](ol.control.html) +
+[Map default interactions](ol.interaction.html#defaults)
+Interactions for [vector features](ol.Feature.html) +
  • [ol.interaction.Select](ol.interaction.Select.html)
  • +
  • [ol.interaction.Draw](ol.interaction.Draw.html)
  • +
  • [ol.interaction.Modify](ol.interaction.Modify.html)
+[All interactions](ol.interaction.html)
[Tile sources](ol.source.Tile.html) for [ol.layer.Tile](ol.layer.Tile.html) +
[Image sources](ol.source.Image.html) for [ol.layer.Image](ol.layer.Image) +
[Vector sources](ol.source.Vector.html) for [ol.layer.Vector](ol.layer.Vector) +
[Formats](ol.format.Feature.html) for reading/writing vector data +
[ol.format.WMSCapabilities](ol.format.WMSCapabilities.html)
Projections2-way bindingsOther components

All coordinates and extents need to be provided in map projection (default: [EPSG:3857](ol.proj.EPSG3857.html)). To transform, use [ol.proj.transform()](ol.proj.html#transform).

+[ol.proj](ol.proj.html)

[Objects](ol.Object.html) can be kept in sync using the [bindTo()](ol.Object.html#bindTo) method.

+

A [DOM Input](ol.dom.Input.html) class is available to bind Object properties to HTML Input elements.

[ol.DeviceOrientation](ol.DeviceOrientation.html)
+[ol.Geolocation](ol.Geolocation.html)
+[ol.Overlay](ol.Overlay.html)
+[ol.FeatureOverlay](ol.FeatureOverlay.html)
diff --git a/apidoc/template/static/styles/jaguar.css b/apidoc/template/static/styles/jaguar.css index c105655f41..ea3de11e39 100644 --- a/apidoc/template/static/styles/jaguar.css +++ b/apidoc/template/static/styles/jaguar.css @@ -388,3 +388,12 @@ footer { background-color: #468847 !important; color: #dff0d8; } +.main .readme table p { + margin-top: 0; +} +.main .readme table p, .main .readme table td { + font-size: 14px; +} +.main .readme table ul li { + margin-bottom: 0; +} From fc88db53f69ffe55c2363c58812e6a9c83c3962b Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 16:57:47 +0200 Subject: [PATCH 02/11] Make types look the same everywhere --- apidoc/template/static/styles/jaguar.css | 33 +----------------------- apidoc/template/tmpl/members.tmpl | 2 +- 2 files changed, 2 insertions(+), 33 deletions(-) diff --git a/apidoc/template/static/styles/jaguar.css b/apidoc/template/static/styles/jaguar.css index ea3de11e39..33362bb382 100644 --- a/apidoc/template/static/styles/jaguar.css +++ b/apidoc/template/static/styles/jaguar.css @@ -160,17 +160,6 @@ li { .main dd, .main .props { font-size: 13px; } -.main h4.name span.type-signature { - display: inline-block; - border-radius: 3px; - background-color: gray; - color: #fff; - font-size: 0.7em; - padding: 2px 4px; -} -.main h4.name span.type-signature.type a { - color: #2f61b1; -} .main h4.name span.type { margin-left: 10px; } @@ -180,7 +169,7 @@ li { color: #c1c1c1; margin-left: 7px; } -.main h4.name span.returnType { +.main h4.name span.returnType, .main h4.name span.type { margin-left: 3px; background-color: transparent!important; color: gray!important; @@ -194,26 +183,6 @@ li { font-size: 0.8em; padding: 2px 4px; } -.main span.number { - background-color: #ccc !important; - color: #2fa2b1 !important; -} -.main span.string { - background-color: #ccc !important; - color: #2fa2b1 !important; -} -.main span.object { - background-color: #ccc !important; - color: #2fa2b1 !important; -} -.main span.array { - background-color: #ccc !important; - color: #2fa2b1 !important; -} -.main span.boolean { - background-color: #ccc !important; - color: #2fa2b1 !important; -} .main .subsection-title { font-size: 15px; margin-top: 30px; diff --git a/apidoc/template/tmpl/members.tmpl b/apidoc/template/tmpl/members.tmpl index 4116c40bfc..32bee642b1 100644 --- a/apidoc/template/tmpl/members.tmpl +++ b/apidoc/template/tmpl/members.tmpl @@ -5,7 +5,7 @@ var typeSignature = ''; if (data.type && data.type.names) { data.type.names.forEach(function (name) { - typeSignature += '' + self.linkto(name, self.htmlsafe(name)) + ' '; + typeSignature += '{' + self.linkto(name, self.htmlsafe(name)) + '} '; }); } ?> From b2554cab41d29c62beaf88e74e1d1be72e958518 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 16:58:13 +0200 Subject: [PATCH 03/11] Mark optional and repeatable arguments --- apidoc/template/static/styles/jaguar.css | 2 +- apidoc/template/tmpl/params.tmpl | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/apidoc/template/static/styles/jaguar.css b/apidoc/template/static/styles/jaguar.css index 33362bb382..48cff0a1b7 100644 --- a/apidoc/template/static/styles/jaguar.css +++ b/apidoc/template/static/styles/jaguar.css @@ -294,7 +294,7 @@ li { .main table .description p { margin: 0; } -.main table .optional { +.main table .optional, .main table .repeatable { float: left; border-radius: 3px; background-color: #ddd!important; diff --git a/apidoc/template/tmpl/params.tmpl b/apidoc/template/tmpl/params.tmpl index 756b30f256..59a04199e5 100644 --- a/apidoc/template/tmpl/params.tmpl +++ b/apidoc/template/tmpl/params.tmpl @@ -24,9 +24,15 @@ var colspan = 2; params.forEach(function(param) { if (!param) { return; } + if (param.type && param.type.names && param.type.names.indexOf('undefined') !== -1) { + param.optional = true; + } + if (param.name.indexOf('var_') == 0) { + params.hasAttributes = true; + param.variable = true; + } if (param.optional || param.nullable) { - ++colspan; params.hasAttributes = true; } @@ -50,10 +56,6 @@ Type - - Argument - - Default @@ -81,18 +83,6 @@ - - - - <optional>
- - - - <nullable>
- - - - From 754ef24b0c66d77bbd2a9778fb319088971e7d28 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 17:04:58 +0200 Subject: [PATCH 04/11] List default controls and interactions --- src/ol/control/controldefaults.js | 6 ++++++ src/ol/interaction/interactiondefaults.js | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/ol/control/controldefaults.js b/src/ol/control/controldefaults.js index d75dd5c114..9e66830fef 100644 --- a/src/ol/control/controldefaults.js +++ b/src/ol/control/controldefaults.js @@ -8,6 +8,12 @@ goog.require('ol.control.Zoom'); /** + * Set of default controls. Unless configured otherwise, this returns a + * collection containing an instance of each of the following controls: + * * {@link ol.control.Zoom} + * * {@link ol.control.Rotate} + * * {@link ol.control.Attribution} + * * {@link ol.control.Logo} * @param {olx.control.DefaultsOptions=} opt_options Defaults options. * @return {ol.Collection} Controls. * @todo api diff --git a/src/ol/interaction/interactiondefaults.js b/src/ol/interaction/interactiondefaults.js index 089237ee47..e98cf374ee 100644 --- a/src/ol/interaction/interactiondefaults.js +++ b/src/ol/interaction/interactiondefaults.js @@ -21,7 +21,16 @@ goog.require('ol.interaction.PinchZoom'); * different order for interactions, you will need to create your own * {@link ol.interaction.Interaction} instances and insert them into a * {@link ol.Collection} in the order you want before creating your - * {@link ol.Map} instance. + * {@link ol.Map} instance. The default set of interactions, in sequence, is: + * * {@link ol.interaction.DragRotate} + * * {@link ol.interaction.DoubleClickZoom} + * * {@link ol.interaction.DragPan} + * * {@link ol.interaction.PinchRotate} + * * {@link ol.interaction.PinchZoom} + * * {@link ol.interaction.KeyboardPan} + * * {@link ol.interaction.KeyboardZoom} + * * {@link ol.interaction.MouseWheelZoom} + * * {@link ol.interaction.DragZoom} * @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. From 97bae045db5981790f600d95d9c8459940d0476a Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 17:05:40 +0200 Subject: [PATCH 05/11] Fix documentation typos --- externs/olx.js | 8 ++++---- src/ol/interaction/dragboxinteraction.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index 3cf5845f20..fe010184e3 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -683,7 +683,7 @@ olx.control.ControlOptions.prototype.target; * logo: (boolean|undefined), * logoOptions: (olx.control.LogoOptions|undefined), * zoom: (boolean|undefined), - * rotateOptions: (olx.control.RotateOptions|undefined)}} + * rotateOptions: (olx.control.RotateOptions|undefined), * zoomOptions: (olx.control.ZoomOptions|undefined)}} * @todo api */ @@ -890,7 +890,7 @@ olx.control.ScaleLineOptions.prototype.units; * tipLabel: (string|undefined), * target: (Element|undefined), * autoHide: (boolean|undefined)}} - * @todo stability experimental + * @todo api */ olx.control.RotateOptions; @@ -3909,8 +3909,8 @@ olx.source.TileWMSOptions.prototype.projection; /** - * The type of the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only - * needed if `hidpi` is `true`. Default is `undefined`. + * The type of the remote WMS server. Currently only used when `hidpi` is + * `true`. Default is `undefined`. * @type {ol.source.wms.ServerType|string|undefined} */ olx.source.TileWMSOptions.prototype.serverType; diff --git a/src/ol/interaction/dragboxinteraction.js b/src/ol/interaction/dragboxinteraction.js index a8209ba54e..cd02c51aa9 100644 --- a/src/ol/interaction/dragboxinteraction.js +++ b/src/ol/interaction/dragboxinteraction.js @@ -35,7 +35,7 @@ ol.DragBoxEventType = { BOXSTART: 'boxstart', /** * Triggered upon drag box end. - * @event ol.DragBoxEvent#boxstart + * @event ol.DragBoxEvent#boxend * @todo api */ BOXEND: 'boxend' From 0d10314d4f20bd1fb439a77ec5d0721a5b32668e Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 17:06:19 +0200 Subject: [PATCH 06/11] Make sure that ol.source.wms.ServerType is documented --- src/ol/source/wmssource.js | 4 ++++ src/ol/source/wmssource.jsdoc | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 src/ol/source/wmssource.jsdoc diff --git a/src/ol/source/wmssource.js b/src/ol/source/wmssource.js index def6b908ba..620be00285 100644 --- a/src/ol/source/wmssource.js +++ b/src/ol/source/wmssource.js @@ -3,7 +3,11 @@ goog.provide('ol.source.wms.ServerType'); /** + * Available server types: `'carmentaserver'`, `'geoserver'`, `'mapserver'`, + * `'qgis'`. These are servers that have vendor parameters beyond the WMS + * specification that OpenLayers can make use of. * @enum {string} + * @todo api */ ol.source.wms.ServerType = { CARMENTA_SERVER: 'carmentaserver', diff --git a/src/ol/source/wmssource.jsdoc b/src/ol/source/wmssource.jsdoc new file mode 100644 index 0000000000..ad8776496a --- /dev/null +++ b/src/ol/source/wmssource.jsdoc @@ -0,0 +1,3 @@ +/** + * @namespace ol.source.wms + */ From a75d944311e8949d73f396c5c2902c30d19467b2 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 20:25:26 +0200 Subject: [PATCH 07/11] Allow custom events and do not collect events from methods --- apidoc/plugins/events.js | 8 ++------ apidoc/template/tmpl/method.tmpl | 23 ++++++++++++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/apidoc/plugins/events.js b/apidoc/plugins/events.js index 741ea88965..c28ea2035b 100644 --- a/apidoc/plugins/events.js +++ b/apidoc/plugins/events.js @@ -29,15 +29,11 @@ exports.handlers = { event = doclet.fires[j].replace('event:', ''); if (events[event]) { fires.push.apply(fires, events[event]); + } else { + fires.push(doclet.fires[j]); } } doclet.fires = fires; - } else { - eventClass = classes[doclet.longname.split('#')[0]]; - if (!eventClass.fires) { - eventClass.fires = []; - } - eventClass.fires.push.apply(eventClass.fires, doclet.fires); } } } diff --git a/apidoc/template/tmpl/method.tmpl b/apidoc/template/tmpl/method.tmpl index c8ff2ee5e3..fab22c754c 100644 --- a/apidoc/template/tmpl/method.tmpl +++ b/apidoc/template/tmpl/method.tmpl @@ -57,18 +57,27 @@ var self = this;
Fires:
    ]*>/g, ''); + } ?> -
  • - - + + () - - - - ]*>/g, '') ?> + - + +
From b2805c58de8fcc5c232dd96128c96095406645a6 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 20:28:09 +0200 Subject: [PATCH 08/11] Better document which events are fired The map does not fire ol.render.Event#render. Change events are now only listed for classes that fire them, and a description about when they are fired is added. --- src/ol/deviceorientation.js | 1 + src/ol/feature.js | 1 + src/ol/geolocation.js | 1 + src/ol/geom/geometry.js | 1 + src/ol/layer/layer.js | 1 + src/ol/layer/layergroup.js | 2 ++ src/ol/map.js | 3 ++- src/ol/observable.js | 3 +-- src/ol/source/source.js | 1 + 9 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ol/deviceorientation.js b/src/ol/deviceorientation.js index 584dec3f03..8102590bbb 100644 --- a/src/ol/deviceorientation.js +++ b/src/ol/deviceorientation.js @@ -68,6 +68,7 @@ ol.DeviceOrientationProperty = { * * @constructor * @extends {ol.Object} + * @fires change Triggered when the device orientation changes. * @param {olx.DeviceOrientationOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/feature.js b/src/ol/feature.js index 10d5f87b9d..0b741b5809 100644 --- a/src/ol/feature.js +++ b/src/ol/feature.js @@ -18,6 +18,7 @@ goog.require('ol.style.Style'); /** * @constructor * @extends {ol.Object} + * @fires change Triggered when the geometry or style of the feature changes. * @param {ol.geom.Geometry|Object.=} opt_geometryOrValues * Values or geometry. * @todo api diff --git a/src/ol/geolocation.js b/src/ol/geolocation.js index 6211736d22..5e0387ab3b 100644 --- a/src/ol/geolocation.js +++ b/src/ol/geolocation.js @@ -51,6 +51,7 @@ ol.GeolocationProperty = { * * @constructor * @extends {ol.Object} + * @fires change Triggered when the position changes. * @param {olx.GeolocationOptions=} opt_options Options. * @todo api */ diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index 832001b068..a3390f2ac3 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -46,6 +46,7 @@ ol.geom.GeometryLayout = { /** * @constructor * @extends {ol.Observable} + * @fires change Triggered when the geometry changes. * @todo api */ ol.geom.Geometry = function() { diff --git a/src/ol/layer/layer.js b/src/ol/layer/layer.js index 8555b6e15c..135500e01f 100644 --- a/src/ol/layer/layer.js +++ b/src/ol/layer/layer.js @@ -13,6 +13,7 @@ goog.require('ol.source.Source'); * @constructor * @extends {ol.layer.Base} * @fires ol.render.Event + * @fires change Triggered when the state of the source changes. * @param {olx.layer.LayerOptions} options Layer options. * @todo api */ diff --git a/src/ol/layer/layergroup.js b/src/ol/layer/layergroup.js index ccbc3edcf6..3be4cfab5c 100644 --- a/src/ol/layer/layergroup.js +++ b/src/ol/layer/layergroup.js @@ -27,6 +27,8 @@ ol.layer.GroupProperty = { /** * @constructor * @extends {ol.layer.Base} + * @fires change Triggered when the state of the source of any of the layers of + * this group changes * @param {olx.layer.GroupOptions=} opt_options Layer options. * @todo api */ diff --git a/src/ol/map.js b/src/ol/map.js index 68c1674dfa..e6356b3c2e 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -158,7 +158,8 @@ ol.MapProperty = { * @param {olx.MapOptions} options Map options. * @fires ol.MapBrowserEvent * @fires ol.MapEvent - * @fires ol.render.Event + * @fires ol.render.Event#postcompose + * @fires ol.render.Event#precompose * @todo api */ ol.Map = function(options) { diff --git a/src/ol/observable.js b/src/ol/observable.js index 379a372058..c921697314 100644 --- a/src/ol/observable.js +++ b/src/ol/observable.js @@ -31,8 +31,7 @@ goog.inherits(ol.Observable, goog.events.EventTarget); /** - * Dispatches a `change` event. Register a listener for this event to get - * notified of changes. + * Dispatches a `change` event. * @fires change * @todo api */ diff --git a/src/ol/source/source.js b/src/ol/source/source.js index 919918eda4..e9435a2207 100644 --- a/src/ol/source/source.js +++ b/src/ol/source/source.js @@ -35,6 +35,7 @@ ol.source.SourceOptions; /** * @constructor * @extends {ol.Observable} + * @fires change Triggered when the state of the source changes. * @param {ol.source.SourceOptions} options Source options. */ ol.source.Source = function(options) { From d163f60e340423d46dc3b185da08d2de280be765 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 20:29:16 +0200 Subject: [PATCH 09/11] Make sure that opt_layout is listed as optional --- simple.json | 25 +++++++++++++++++++++++++ src/ol/geom/circle.js | 2 +- src/ol/geom/linearring.js | 2 +- src/ol/geom/linestring.js | 2 +- src/ol/geom/multilinestring.js | 2 +- src/ol/geom/multipoint.js | 2 +- src/ol/geom/multipolygon.js | 2 +- src/ol/geom/point.js | 2 +- src/ol/geom/polygon.js | 2 +- 9 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 simple.json diff --git a/simple.json b/simple.json new file mode 100644 index 0000000000..127f930dc7 --- /dev/null +++ b/simple.json @@ -0,0 +1,25 @@ +{ + "exports": [], + "src": ["src/**/*.js", "examples/simple.js"], + "compile": { + "js": ["externs/olx.js"], + "externs": [ + "externs/example.js", + "externs/bingmaps.js", + "externs/geojson.js", + "externs/oli.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, + "manage_closure_dependencies": true + } +} diff --git a/src/ol/geom/circle.js b/src/ol/geom/circle.js index a8762facf1..4b9d3bf2b5 100644 --- a/src/ol/geom/circle.js +++ b/src/ol/geom/circle.js @@ -13,7 +13,7 @@ goog.require('ol.geom.flat.deflate'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawPoint} center Center. * @param {number=} opt_radius Radius. - * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @todo api */ ol.geom.Circle = function(center, opt_radius, opt_layout) { diff --git a/src/ol/geom/linearring.js b/src/ol/geom/linearring.js index c2cd1b8dfa..a1f4d3e2d9 100644 --- a/src/ol/geom/linearring.js +++ b/src/ol/geom/linearring.js @@ -15,7 +15,7 @@ goog.require('ol.geom.flat.simplify'); * @constructor * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawLinearRing} coordinates Coordinates. - * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @todo api */ ol.geom.LinearRing = function(coordinates, opt_layout) { diff --git a/src/ol/geom/linestring.js b/src/ol/geom/linestring.js index 0dcd57df7d..7c96561570 100644 --- a/src/ol/geom/linestring.js +++ b/src/ol/geom/linestring.js @@ -19,7 +19,7 @@ goog.require('ol.geom.flat.simplify'); * @constructor * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawLineString} coordinates Coordinates. - * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @todo api */ ol.geom.LineString = function(coordinates, opt_layout) { diff --git a/src/ol/geom/multilinestring.js b/src/ol/geom/multilinestring.js index 842d41d1a1..c690928fe4 100644 --- a/src/ol/geom/multilinestring.js +++ b/src/ol/geom/multilinestring.js @@ -19,7 +19,7 @@ goog.require('ol.geom.flat.simplify'); * @constructor * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawMultiLineString} coordinates Coordinates. - * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @todo api */ ol.geom.MultiLineString = function(coordinates, opt_layout) { diff --git a/src/ol/geom/multipoint.js b/src/ol/geom/multipoint.js index badab06dd9..7a86809f56 100644 --- a/src/ol/geom/multipoint.js +++ b/src/ol/geom/multipoint.js @@ -17,7 +17,7 @@ goog.require('ol.math'); * @constructor * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawMultiPoint} coordinates Coordinates. - * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @todo api */ ol.geom.MultiPoint = function(coordinates, opt_layout) { diff --git a/src/ol/geom/multipolygon.js b/src/ol/geom/multipolygon.js index 4379765c03..c2cabee478 100644 --- a/src/ol/geom/multipolygon.js +++ b/src/ol/geom/multipolygon.js @@ -24,7 +24,7 @@ goog.require('ol.geom.flat.simplify'); * @constructor * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawMultiPolygon} coordinates Coordinates. - * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @todo api */ ol.geom.MultiPolygon = function(coordinates, opt_layout) { diff --git a/src/ol/geom/point.js b/src/ol/geom/point.js index 90c2d40f84..07347dbb6f 100644 --- a/src/ol/geom/point.js +++ b/src/ol/geom/point.js @@ -13,7 +13,7 @@ goog.require('ol.math'); * @constructor * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawPoint} coordinates Coordinates. - * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @todo api */ ol.geom.Point = function(coordinates, opt_layout) { diff --git a/src/ol/geom/polygon.js b/src/ol/geom/polygon.js index b7a484410a..be40bcc277 100644 --- a/src/ol/geom/polygon.js +++ b/src/ol/geom/polygon.js @@ -23,7 +23,7 @@ goog.require('ol.geom.flat.simplify'); * @constructor * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawPolygon} coordinates Coordinates. - * @param {ol.geom.GeometryLayout|string=} opt_layout Layout. + * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @todo api */ ol.geom.Polygon = function(coordinates, opt_layout) { From b348a4f8f981d38fef9d6793607d7b6852b7cba4 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 20:29:46 +0200 Subject: [PATCH 10/11] Add some margin between the 'static' tag and the name --- apidoc/template/static/styles/jaguar.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apidoc/template/static/styles/jaguar.css b/apidoc/template/static/styles/jaguar.css index 48cff0a1b7..b18da2e782 100644 --- a/apidoc/template/static/styles/jaguar.css +++ b/apidoc/template/static/styles/jaguar.css @@ -183,6 +183,9 @@ li { font-size: 0.8em; padding: 2px 4px; } +span.type-signature.static { + margin-right: 3px; +} .main .subsection-title { font-size: 15px; margin-top: 30px; From 687abda9fbb3252960301ce6c6888e241c8ce62f Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 15 May 2014 20:56:09 +0200 Subject: [PATCH 11/11] Need to be more specific about the coordinate format now. --- examples/geolocation-orientation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/geolocation-orientation.js b/examples/geolocation-orientation.js index f1ef9fb80a..093c4e08a8 100644 --- a/examples/geolocation-orientation.js +++ b/examples/geolocation-orientation.js @@ -36,7 +36,8 @@ map.addOverlay(marker); // LineString to store the different geolocation positions. This LineString // is time aware. // The Z dimension is actually used to store the rotation (heading). -var positions = new ol.geom.LineString([], 'XYZM'); +var positions = new ol.geom.LineString([], + /** @type {ol.geom.GeometryLayout} */ ('XYZM')); // Geolocation Control var geolocation = new ol.Geolocation(/** @type {olx.GeolocationOptions} */ ({