From ae5581487577a37f5aa50ca07fd99d1cf7b616d3 Mon Sep 17 00:00:00 2001
From: Tim Schaub
Date: Mon, 7 May 2018 15:33:14 -0600
Subject: [PATCH 1/7] Use module paths in example docs
---
examples/arcgis-tiled.html | 2 +-
examples/bing-maps.html | 2 +-
examples/box-selection.html | 2 +-
examples/cluster.html | 2 +-
examples/custom-interactions.html | 4 ++--
examples/d3.js | 2 +-
examples/drag-and-drop-image-vector.html | 2 +-
examples/draw-and-modify-features.html | 4 ++--
examples/draw-features.html | 2 +-
examples/draw-freehand.html | 6 +++---
examples/draw-shapes.html | 4 ++--
examples/earthquake-clusters.html | 2 +-
examples/earthquake-custom-symbol.html | 2 +-
examples/getfeatureinfo-layers.html | 2 +-
examples/heatmap-earthquakes.html | 2 +-
examples/here-maps.html | 2 +-
examples/icon-color.html | 2 +-
examples/image-vector-layer.html | 2 +-
examples/kml-timezones.html | 2 +-
examples/kml.html | 2 +-
examples/mousewheel-zoom.html | 4 ++--
examples/navigation-controls.html | 6 +++---
examples/osm-vector-tiles.html | 2 +-
examples/pinch-zoom.html | 2 +-
examples/popup.html | 2 +-
examples/raster.html | 2 +-
examples/region-growing.html | 2 +-
examples/sea-level.html | 2 +-
examples/shaded-relief.html | 2 +-
examples/topojson.html | 2 +-
examples/wms-custom-proj.html | 2 +-
examples/xyz-esri-4326-512.html | 2 +-
examples/xyz-esri.html | 2 +-
examples/zoomslider.js | 2 +-
34 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/examples/arcgis-tiled.html b/examples/arcgis-tiled.html
index 72ec115b97..576abf6b4d 100644
--- a/examples/arcgis-tiled.html
+++ b/examples/arcgis-tiled.html
@@ -6,7 +6,7 @@ docs: >
This example shows how to use an ArcGIS REST MapService as tiles.
This source type supports Map and Image Services. For cached ArcGIS
services, better performance is available by using
- ol.source.XYZ instead.
+ ol/source/XYZ instead.
tags: arcgis, tile, tilelayer"
---
diff --git a/examples/bing-maps.html b/examples/bing-maps.html
index 93db3cc0c4..ac66ba1fe9 100644
--- a/examples/bing-maps.html
+++ b/examples/bing-maps.html
@@ -3,7 +3,7 @@ layout: example.html
title: Bing Maps
shortdesc: Example of a Bing Maps layer.
docs: >
- When the Bing Maps tile service doesn't have tiles for a given resolution and region it returns "placeholder" tiles indicating that. Zoom the map beyond level 19 to see the "placeholder" tiles. If you want OpenLayers to display stretched tiles in place of "placeholder" tiles beyond zoom level 19 then set maxZoom to 19 in the options passed to ol.source.BingMaps.
+ When the Bing Maps tile service doesn't have tiles for a given resolution and region it returns "placeholder" tiles indicating that. Zoom the map beyond level 19 to see the "placeholder" tiles. If you want OpenLayers to display stretched tiles in place of "placeholder" tiles beyond zoom level 19 then set maxZoom to 19 in the options passed to ol/source/BingMaps.
tags: "bing, bing-maps"
cloak:
- key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
diff --git a/examples/box-selection.html b/examples/box-selection.html
index 28e8d121c3..2660efa27c 100644
--- a/examples/box-selection.html
+++ b/examples/box-selection.html
@@ -4,7 +4,7 @@ title: Box Selection
shortdesc: Using a DragBox interaction to select features.
docs: >
This example shows how to use a DragBox interaction to select features. Selected features are added
- to the feature overlay of a select interaction (ol.interaction.Select) for highlighting.
+ to the feature overlay of a select interaction (ol/interaction/Select) for highlighting.
Use Ctrl+Drag (Command+Drag on Mac) to draw boxes.
tags: "DragBox, feature, selection, box"
---
diff --git a/examples/cluster.html b/examples/cluster.html
index 813f63b8c6..65c39a2236 100644
--- a/examples/cluster.html
+++ b/examples/cluster.html
@@ -1,7 +1,7 @@
---
layout: example.html
title: Clustered Features
-shortdesc: Example of using ol.source.Cluster.
+shortdesc: Example of using ol/source/Cluster.
docs: >
This example shows how to do clustering on point features.
tags: "cluster, vector"
diff --git a/examples/custom-interactions.html b/examples/custom-interactions.html
index d73a85aaa8..908520101b 100644
--- a/examples/custom-interactions.html
+++ b/examples/custom-interactions.html
@@ -3,8 +3,8 @@ layout: example.html
title: Custom Interactions
shortdesc: Example of a custom interaction.
docs: >
- This example demonstrates creating a custom interaction by subclassing `ol.interaction.Pointer`.
- Note that the built in interaction `ol.interaction.Translate` might be a better option for moving features.
+ This example demonstrates creating a custom interaction by subclassing `ol/interaction/Pointer`.
+ Note that the built in interaction `ol/interaction/Translate` might be a better option for moving features.
tags: "drag, feature, vector, editing, custom, interaction"
---
diff --git a/examples/d3.js b/examples/d3.js
index 778add595b..d26aaffb13 100644
--- a/examples/d3.js
+++ b/examples/d3.js
@@ -24,7 +24,7 @@ const map = new Map({
/**
- * Load the topojson data and create an ol.layer.Image for that data.
+ * Load the topojson data and create an ol/layer/Image for that data.
*/
d3.json('data/topojson/us.json', function(error, us) {
const features = topojson.feature(us, us.objects.counties);
diff --git a/examples/drag-and-drop-image-vector.html b/examples/drag-and-drop-image-vector.html
index 717f83b647..81d4457810 100644
--- a/examples/drag-and-drop-image-vector.html
+++ b/examples/drag-and-drop-image-vector.html
@@ -3,7 +3,7 @@ layout: example.html
title: Drag-and-Drop Image Vector
shortdesc: Example of using the drag-and-drop interaction with image vector rendering.
docs: >
- Example of using the drag-and-drop interaction with an `ol.layer.Vector` with `renderMode: 'image'``. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. Each file is rendered to an image on the client.
+ Example of using the drag-and-drop interaction with an `ol/layer/Vector` with `renderMode: 'image'``. Drag and drop GPX, GeoJSON, IGC, KML, or TopoJSON files on to the map. Each file is rendered to an image on the client.
tags: "drag-and-drop-image-vector, gpx, geojson, igc, kml, topojson, vector, image"
cloak:
- key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
diff --git a/examples/draw-and-modify-features.html b/examples/draw-and-modify-features.html
index 551a9d18a2..bf3ff2e7a4 100644
--- a/examples/draw-and-modify-features.html
+++ b/examples/draw-and-modify-features.html
@@ -1,9 +1,9 @@
---
layout: example.html
title: Draw and Modify Features
-shortdesc: Example of using the ol.interaction.Draw interaction together with the ol.interaction.Modify interaction.
+shortdesc: Example of using the ol/interaction/Draw interaction together with the ol/interaction/Modify interaction.
docs: >
- Example of using the ol.interaction.Draw interaction together with the ol.interaction.Modify interaction.
+ Example of using the ol/interaction/Draw interaction together with the ol/interaction/Modify interaction.
tags: "draw, edit, modify, vector, featureoverlay"
---
diff --git a/examples/draw-features.html b/examples/draw-features.html
index 613a82a911..79481fbb9d 100644
--- a/examples/draw-features.html
+++ b/examples/draw-features.html
@@ -1,7 +1,7 @@
---
layout: example.html
title: Draw Features
-shortdesc: Example of using the ol.interaction.Draw interaction.
+shortdesc: Example of using the ol/interaction/Draw interaction.
docs: >
Example of using the Draw interaction. Select a geometry type from the
dropdown above to start drawing. To finish drawing, click the last
diff --git a/examples/draw-freehand.html b/examples/draw-freehand.html
index 76f830b287..8f6767a8a8 100644
--- a/examples/draw-freehand.html
+++ b/examples/draw-freehand.html
@@ -1,13 +1,13 @@
---
layout: example.html
title: Freehand Drawing
-shortdesc: Example using the ol.interaction.Draw interaction in freehand mode.
+shortdesc: Example using the ol/interaction/Draw interaction in freehand mode.
docs: >
- This example demonstrates the `ol.interaction.Draw` in freehand mode. During
+ This example demonstrates the `ol/interaction/Draw` in freehand mode. During
freehand drawing, points are added while dragging. Set `freehand: true` to
enable freehand mode. Note that freehand mode can be conditionally enabled
by using the `freehandCondition` option. For example to toggle freehand mode
- with the `Shift` key, use `freehandCondition: ol.events.condition.shiftKeyOnly`.
+ with the `Shift` key, use `freehandCondition: shiftKeyOnly`.
tags: "draw, edit, freehand, vector"
---
diff --git a/examples/draw-shapes.html b/examples/draw-shapes.html
index 19501e090c..0ceead0499 100644
--- a/examples/draw-shapes.html
+++ b/examples/draw-shapes.html
@@ -1,10 +1,10 @@
---
layout: example.html
title: Draw Shapes
-shortdesc: Using the ol.interaction.Draw to create regular shapes
+shortdesc: Using the ol/interaction/Draw to create regular shapes
docs: >
This demonstrates the use of the `geometryFunction` option for the
- `ol.interaction.Draw`. Select a shape type from the dropdown above to start
+ `ol/interaction/Draw`. Select a shape type from the dropdown above to start
drawing. To activate freehand drawing, hold the `Shift` key. Square drawing is
achieved by using `type: 'Circle'` type with a `geometryFunction` that creates
a 4-sided regular polygon instead of a circle. Box drawing uses `type: 'Circle'`
diff --git a/examples/earthquake-clusters.html b/examples/earthquake-clusters.html
index 667b829683..773711a2b3 100644
--- a/examples/earthquake-clusters.html
+++ b/examples/earthquake-clusters.html
@@ -6,7 +6,7 @@ docs: >
This example parses a KML file and renders the features as clusters on a vector layer. The styling in this example is quite involved. Single earthquake locations
(rendered as stars) have a size relative to their magnitude. Clusters have an opacity relative to the number of features in the cluster, and a size that represents
the extent of the features that make up the cluster. When clicking or hovering on a cluster, the individual features that make up the cluster will be shown.
- To achieve this, we make heavy use of style functions and ol.style.Style#geometry.
+ To achieve this, we make heavy use of style functions.
tags: "KML, vector, style, geometry, cluster"
---
diff --git a/examples/earthquake-custom-symbol.html b/examples/earthquake-custom-symbol.html
index d3f1a0dcd9..729d8eb3e7 100644
--- a/examples/earthquake-custom-symbol.html
+++ b/examples/earthquake-custom-symbol.html
@@ -1,7 +1,7 @@
---
layout: example.html
title: Earthquakes with custom symbols
-shortdesc: Demonstrates the use of `ol.render.toCanvas` to create custom icon symbols.
+shortdesc: Demonstrates the use of `toCanvas` to create custom icon symbols.
docs: >
This example parses a KML file and renders the features as a vector layer. The layer is given a style that renders earthquake locations with a custom lightning symbol and a size relative to their magnitude.
tags: "KML, vector, style, canvas, symbol"
diff --git a/examples/getfeatureinfo-layers.html b/examples/getfeatureinfo-layers.html
index 8c48c294ae..3173a15329 100644
--- a/examples/getfeatureinfo-layers.html
+++ b/examples/getfeatureinfo-layers.html
@@ -6,7 +6,7 @@ shortdesc: >
request
docs: >
Demonstrates the use of the `layers` option in the
- `ol.format.WMSGetFeatureInfo` format object, which allows features returned
+ `ol/format/WMSGetFeatureInfo` format object, which allows features returned
by a single WMS GetFeatureInfo request that asks for more than one layer
to be read by layer name.
---
diff --git a/examples/heatmap-earthquakes.html b/examples/heatmap-earthquakes.html
index d670888d12..612b1206fc 100644
--- a/examples/heatmap-earthquakes.html
+++ b/examples/heatmap-earthquakes.html
@@ -3,7 +3,7 @@ layout: example.html
title: Earthquakes Heatmap
shortdesc: Demonstrates the use of a heatmap layer.
docs: >
- This example parses a KML file and renders the features as a ol.layer.Heatmap layer.
+ This example parses a KML file and renders the features as a ol/layer/Heatmap layer.
tags: "heatmap, kml, vector, style"
---
diff --git a/examples/here-maps.html b/examples/here-maps.html
index 3349a5f365..61df8fa4d2 100644
--- a/examples/here-maps.html
+++ b/examples/here-maps.html
@@ -3,7 +3,7 @@ layout: example.html
title: HERE Map Tile API
shortdesc: Example of a map with map tiles from HERE.
docs: >
- HERE Map Tile API used with ol.source.XYZ.
+ HERE Map Tile API used with ol/source/XYZ.
Be sure to respect the HERE Service Terms when using their tile API.
tags: "here, here-maps, here-tile-api"
cloak:
diff --git a/examples/icon-color.html b/examples/icon-color.html
index 04a98626de..f102fb16a2 100644
--- a/examples/icon-color.html
+++ b/examples/icon-color.html
@@ -4,7 +4,7 @@ title: Icon Colors
shortdesc: Example assigning a custom color to an icon
docs: >
Example assigning a custom color to an icon. The features in this examples are all using the same image with the different colors coming from the javascript file.
- Note that icon files need to obey the same origin policy or send proper CORS headers for this to work. When relying on CORS headers, the `ol.style.Icon` must be configured with `crossOrigin: 'anonymous'`.
+ Note that icon files need to obey the same origin policy or send proper CORS headers for this to work. When relying on CORS headers, the `ol/style/Icon` must be configured with `crossOrigin: 'anonymous'`.
tags: "vector, style, icon, marker"
resources:
---
diff --git a/examples/image-vector-layer.html b/examples/image-vector-layer.html
index ecd3444b74..99613624d3 100644
--- a/examples/image-vector-layer.html
+++ b/examples/image-vector-layer.html
@@ -3,7 +3,7 @@ layout: example.html
title: Image Vector Layer
shortdesc: Example of an image vector layer.
docs: >
- This example uses ol.layer.Vector with `renderMode: 'image'`. This mode results in faster rendering during interaction and animations, at the cost of less accurate rendering.
+ This example uses ol/layer/Vector with `renderMode: 'image'`. This mode results in faster rendering during interaction and animations, at the cost of less accurate rendering.
tags: "vector, image"
---
diff --git a/examples/kml-timezones.html b/examples/kml-timezones.html
index abd5410367..67b8943ae3 100644
--- a/examples/kml-timezones.html
+++ b/examples/kml-timezones.html
@@ -3,7 +3,7 @@ layout: example.html
title: Timezones in KML
shortdesc: Demonstrates rendering timezones from KML.
docs: >
- This example parses a KML file and renders the features as a vector layer. The layer is given a ol.style.Style that fills timezones
+ This example parses a KML file and renders the features as a vector layer. The layer is given a ol/style/Style that fills timezones
yellow with an opacity calculated based on the current offset to local noon.
tags: "KML, vector, style"
resources:
diff --git a/examples/kml.html b/examples/kml.html
index afc93cf25f..74cb28ecb3 100644
--- a/examples/kml.html
+++ b/examples/kml.html
@@ -3,7 +3,7 @@ layout: example.html
title: KML
shortdesc: Rendering KML with a vector source.
docs: >
- This example uses the ol.format.KML to parse KML for rendering with a vector source.
+ This example uses the ol/format/KML to parse KML for rendering with a vector source.
tags: "KML"
cloak:
- key: As1HiMj1PvLPlqc_gtM7AqZfBL8ZL3VrjaS3zIb22Uvb9WKhuJObROC-qUpa81U5
diff --git a/examples/mousewheel-zoom.html b/examples/mousewheel-zoom.html
index 1e20bba4da..6ddee867f7 100644
--- a/examples/mousewheel-zoom.html
+++ b/examples/mousewheel-zoom.html
@@ -3,12 +3,12 @@ layout: example.html
title: Mousewheel/Trackpad Zoom
shortdesc: Shows advanced wheel/trackpad zoom options.
docs: >
- This example uses a custom `ol.interaction.MouseWheelZoom` configuration:
+ This example uses a custom `ol/interaction/MouseWheelZoom` configuration:
* By default, wheel/trackpad zoom is always active, which can be unexpected
on pages with a lot of scrollable content and an embedded map. To perform
wheel/trackpad zoom actions only when the map has the focus, set
- `condition: ol.events.condition.focus` as constructor option. This requires
+ `condition: focus` as constructor option. This requires
a map div with a `tabindex` attribute set.
* By default, the interaction can leave the map at fractional zoom levels. If
instead you want to constrain wheel/trackpad zooming to integer zoom
diff --git a/examples/navigation-controls.html b/examples/navigation-controls.html
index 0906e425f7..b7be536dba 100644
--- a/examples/navigation-controls.html
+++ b/examples/navigation-controls.html
@@ -3,11 +3,11 @@ layout: example.html
title: Navigation Controls
shortdesc: Shows how to add navigation controls.
docs: >
- This example shows how to use the ol.control.ZoomToExtent control.
+ This example shows how to use the ol/control/ZoomToExtent control.
The following navigation controls are added to the map:
- ol.control.Zoom (added by default)
- ol.control.ZoomToExtent
+ ol/control/Zoom (added by default)
+ ol/control/ZoomToExtent
tags: "control, navigation, extent"
---
diff --git a/examples/osm-vector-tiles.html b/examples/osm-vector-tiles.html
index c026fe0e5c..6012be721b 100644
--- a/examples/osm-vector-tiles.html
+++ b/examples/osm-vector-tiles.html
@@ -3,7 +3,7 @@ layout: example.html
title: OSM Vector Tiles
shortdesc: Using OpenStreetMap vector tiles.
docs: >
- A simple vector tiles map with Mapzen vector tiles. This example uses the TopoJSON format's `layerName` option to determine the layer ("water", "roads", "buildings") for styling. **Note**: [`ol.format.MVT`](../apidoc/ol.format.MVT.html) is an even more efficient format for vector tiles.
+ A simple vector tiles map with Mapzen vector tiles. This example uses the TopoJSON format's `layerName` option to determine the layer ("water", "roads", "buildings") for styling. **Note**: [`ol/format/MVT`] is an even more efficient format for vector tiles.
tags: "vector, tiles, osm, mapzen"
cloak:
- key: vector-tiles-5eJz6JX
diff --git a/examples/pinch-zoom.html b/examples/pinch-zoom.html
index ca434a64fd..ab61eef6fc 100644
--- a/examples/pinch-zoom.html
+++ b/examples/pinch-zoom.html
@@ -3,7 +3,7 @@ layout: example.html
title: Pinch Zoom
shortdesc: Restrict pinch zooming to integer zoom levels.
docs: >
- By default, the `ol.interaction.PinchZoom` can leave the map at fractional zoom levels.
+ By default, the `ol/interaction/PinchZoom` can leave the map at fractional zoom levels.
If instead you want to constrain pinch zooming to integer zoom levels, set
constrainResolution: true when constructing the interaction.
tags: "pinch, zoom, interaction"
diff --git a/examples/popup.html b/examples/popup.html
index ed9fc2f751..eaa0924f63 100644
--- a/examples/popup.html
+++ b/examples/popup.html
@@ -4,7 +4,7 @@ title: Popup
shortdesc: Uses an overlay to create a popup.
docs: >
- Click on the map to get a popup. The popup is composed of a few basic elements: a container, a close button, and a place for the content. To anchor the popup to the map, an ol.Overlay is created with the popup container. A listener is registered for the map's click event to display the popup, and another listener is set as the click handler for the close button to hide the popup.
+ Click on the map to get a popup. The popup is composed of a few basic elements: a container, a close button, and a place for the content. To anchor the popup to the map, an ol/Overlay is created with the popup container. A listener is registered for the map's click event to display the popup, and another listener is set as the click handler for the close button to hide the popup.
tags: "overlay, popup"
---
diff --git a/examples/raster.html b/examples/raster.html
index 564841b47a..27783106d9 100644
--- a/examples/raster.html
+++ b/examples/raster.html
@@ -4,7 +4,7 @@ title: Raster Source
shortdesc: Demonstrates pixelwise operations with a raster source.
docs: >
- This example uses a ol.source.Raster to generate data
+ This example uses a ol/source/Raster to generate data
based on another source. The raster source accepts any number of
input sources (tile or image based) and runs a pipeline of
operations on the input pixels. The return from the final
diff --git a/examples/region-growing.html b/examples/region-growing.html
index edc14faaf0..f84faf786c 100644
--- a/examples/region-growing.html
+++ b/examples/region-growing.html
@@ -5,7 +5,7 @@ shortdesc: Grow a region from a seed pixel
docs: >
Click a region on the map. The computed region will be red.
- This example uses a ol.source.Raster to generate data
+ This example uses a ol/source/Raster to generate data
based on another source. The raster source accepts any number of
input sources (tile or image based) and runs a pipeline of
operations on the input data. The return from the final
diff --git a/examples/sea-level.html b/examples/sea-level.html
index c8b5f57282..401370981e 100644
--- a/examples/sea-level.html
+++ b/examples/sea-level.html
@@ -4,7 +4,7 @@ title: Sea Level
shortdesc: Render sea level at different elevations
docs: >
- This example uses a ol.source.Raster with
+ This example uses a ol/source/Raster with
Mapbox Terrain-RGB tiles
to "flood" areas below the elevation shown on the sea level slider.
diff --git a/examples/shaded-relief.html b/examples/shaded-relief.html
index 1d8c0b46da..116040ccb8 100644
--- a/examples/shaded-relief.html
+++ b/examples/shaded-relief.html
@@ -4,7 +4,7 @@ title: Shaded Relief
shortdesc: Calculate shaded relief from elevation data
docs: >
- This example uses a ol.source.Raster to generate data
+ This example uses a ol/source/Raster to generate data
based on another source. The raster source accepts any number of
input sources (tile or image based) and runs a pipeline of
operations on the input data. The return from the final
diff --git a/examples/topojson.html b/examples/topojson.html
index 1d9038bb59..c679c7a5f1 100644
--- a/examples/topojson.html
+++ b/examples/topojson.html
@@ -3,7 +3,7 @@ layout: example.html
title: TopoJSON
shortdesc: Demonstrates rendering of features from a TopoJSON topology.
docs: >
- This example uses a vector layer with `ol.format.TopoJSON` for rendering features from [TopoJSON](https://github.com/mbostock/topojson/wiki).
+ This example uses a vector layer with `ol/format/TopoJSON` for rendering features from [TopoJSON](https://github.com/mbostock/topojson/wiki).
tags: "topojson, vector, style"
---
diff --git a/examples/wms-custom-proj.html b/examples/wms-custom-proj.html
index a799d9bebd..889b3ca0b9 100644
--- a/examples/wms-custom-proj.html
+++ b/examples/wms-custom-proj.html
@@ -3,7 +3,7 @@ layout: example.html
title: Custom Tiled WMS
shortdesc: Example of using custom coordinate transform functions.
docs: >
- With `ol.proj.addCoordinateTransforms()`, custom coordinate transform functions can be added to configured projections.
+ With `addCoordinateTransforms()`, custom coordinate transform functions can be added to configured projections.
tags: "wms, tile, tilelayer, projection"
---
diff --git a/examples/xyz-esri-4326-512.html b/examples/xyz-esri-4326-512.html
index 88df1436dd..94225e4c71 100644
--- a/examples/xyz-esri-4326-512.html
+++ b/examples/xyz-esri-4326-512.html
@@ -3,7 +3,7 @@ layout: example.html
title: ArcGIS REST with 512x512 Tiles
shortdesc: Example of a XYZ source in EPSG:4326 using Esri 512x512 tiles.
docs: >
- ArcGIS REST tile services with custom tile sizes (here: 512x512 pixels) and projection (here: EPSG:4326) are supported by `ol.source.XYZ`. A custom tile url function is used to handle zoom level offsets.
+ ArcGIS REST tile services with custom tile sizes (here: 512x512 pixels) and projection (here: EPSG:4326) are supported by `ol/source/XYZ`. A custom tile url function is used to handle zoom level offsets.
tags: "xyz, esri, tilesize, custom projection"
---
diff --git a/examples/xyz-esri.html b/examples/xyz-esri.html
index 902496a7c0..702f92996e 100644
--- a/examples/xyz-esri.html
+++ b/examples/xyz-esri.html
@@ -3,7 +3,7 @@ layout: example.html
title: XYZ Esri
shortdesc: Example of a XYZ source using Esri tiles.
docs: >
- ArcGIS REST tile services are supported by `ol.source.XYZ`.
+ ArcGIS REST tile services are supported by `ol/source/XYZ`.
tags: "xyz, esri, arcgis rest"
---
diff --git a/examples/zoomslider.js b/examples/zoomslider.js
index 3505ba58a0..33e53e599d 100644
--- a/examples/zoomslider.js
+++ b/examples/zoomslider.js
@@ -9,7 +9,7 @@ import OSM from '../src/ol/source/OSM.js';
* Helper method for map-creation.
*
* @param {string} divId The id of the div for the map.
- * @return {ol.PluggableMap} The ol.Map instance.
+ * @return {ol.PluggableMap} The map instance.
*/
function createMap(divId) {
const source = new OSM();
From cfe88663aab01522b0cfda4d82921acc1e730682 Mon Sep 17 00:00:00 2001
From: Tim Schaub
Date: Mon, 7 May 2018 15:41:33 -0600
Subject: [PATCH 2/7] Update type annotations in examples
---
examples/blend-modes.js | 4 ++--
examples/canvas-gradient-pattern.js | 2 +-
examples/center.js | 2 +-
examples/custom-interactions.js | 4 ++--
examples/d3.js | 4 ++--
examples/export-pdf.js | 2 +-
examples/measure.js | 4 ++--
examples/xyz-retina.html | 2 +-
examples/zoomslider.js | 2 +-
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/examples/blend-modes.js b/examples/blend-modes.js
index c1fe4d0ff5..a5391ece72 100644
--- a/examples/blend-modes.js
+++ b/examples/blend-modes.js
@@ -114,7 +114,7 @@ const resetBlendModeFromSelect = function(evt) {
/**
* Bind the pre- and postcompose handlers to the passed layer.
*
- * @param {ol.layer.Vector} layer The layer to bind the handlers to.
+ * @param {module:ol/layer/Vector} layer The layer to bind the handlers to.
*/
const bindLayerListeners = function(layer) {
layer.on('precompose', setBlendModeFromSelect);
@@ -125,7 +125,7 @@ const bindLayerListeners = function(layer) {
/**
* Unind the pre- and postcompose handlers to the passed layers.
*
- * @param {ol.layer.Vector} layer The layer to unbind the handlers from.
+ * @param {module:ol/layer/Vector} layer The layer to unbind the handlers from.
*/
const unbindLayerListeners = function(layer) {
layer.un('precompose', setBlendModeFromSelect);
diff --git a/examples/canvas-gradient-pattern.js b/examples/canvas-gradient-pattern.js
index 33dc59f75a..3c8348f0dc 100644
--- a/examples/canvas-gradient-pattern.js
+++ b/examples/canvas-gradient-pattern.js
@@ -70,7 +70,7 @@ const style = new Style({
*
* @param {module:ol/Feature~Feature} feature The feature to style.
* @param {number} resolution Resolution.
- * @return {ol.style.Style} The style to use for the feature.
+ * @return {module:ol/style/Style} The style to use for the feature.
*/
const getStackedStyle = function(feature, resolution) {
const id = feature.getId();
diff --git a/examples/center.js b/examples/center.js
index 9988cf43ce..441693f212 100644
--- a/examples/center.js
+++ b/examples/center.js
@@ -87,6 +87,6 @@ const centerlausanne = document.getElementById('centerlausanne');
centerlausanne.addEventListener('click', function() {
const feature = source.getFeatures()[1];
const point = /** @type {module:ol/geom/Point~Point} */ (feature.getGeometry());
- const size = /** @type {ol.Size} */ (map.getSize());
+ const size = /** @type {module:ol/size~Size} */ (map.getSize());
view.centerOn(point.getCoordinates(), size, [570, 500]);
}, false);
diff --git a/examples/custom-interactions.js b/examples/custom-interactions.js
index 93df5dc2be..56a5c67177 100644
--- a/examples/custom-interactions.js
+++ b/examples/custom-interactions.js
@@ -17,7 +17,7 @@ const app = {};
/**
* @constructor
- * @extends {ol.interaction.Pointer}
+ * @extends {module:ol/interaction/Pointer}
*/
app.Drag = function() {
@@ -29,7 +29,7 @@ app.Drag = function() {
});
/**
- * @type {ol.Pixel}
+ * @type {module:ol~Pixel}
* @private
*/
this.coordinate_ = null;
diff --git a/examples/d3.js b/examples/d3.js
index d26aaffb13..3776d11f2f 100644
--- a/examples/d3.js
+++ b/examples/d3.js
@@ -31,10 +31,10 @@ d3.json('data/topojson/us.json', function(error, us) {
/**
* This function uses d3 to render the topojson features to a canvas.
- * @param {ol.Extent} extent Extent.
+ * @param {module:ol/extent~Extent} extent Extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
- * @param {ol.Size} size Size.
+ * @param {module:ol/size~Size} size Size.
* @param {module:ol/proj/Projection~Projection} projection Projection.
* @return {HTMLCanvasElement} A canvas element.
*/
diff --git a/examples/export-pdf.js b/examples/export-pdf.js
index 47fe27e56f..3e9993ea35 100644
--- a/examples/export-pdf.js
+++ b/examples/export-pdf.js
@@ -64,7 +64,7 @@ exportButton.addEventListener('click', function() {
const dim = dims[format];
const width = Math.round(dim[0] * resolution / 25.4);
const height = Math.round(dim[1] * resolution / 25.4);
- const size = /** @type {ol.Size} */ (map.getSize());
+ const size = /** @type {module:ol/size~Size} */ (map.getSize());
const extent = map.getView().calculateExtent(size);
const source = raster.getSource();
diff --git a/examples/measure.js b/examples/measure.js
index d7d6b37ea7..dd79dbaa66 100644
--- a/examples/measure.js
+++ b/examples/measure.js
@@ -52,7 +52,7 @@ let helpTooltipElement;
/**
* Overlay to show the help messages.
- * @type {ol.Overlay}
+ * @type {module:ol/Overlay}
*/
let helpTooltip;
@@ -66,7 +66,7 @@ let measureTooltipElement;
/**
* Overlay to show the measurement.
- * @type {ol.Overlay}
+ * @type {module:ol/Overlay}
*/
let measureTooltip;
diff --git a/examples/xyz-retina.html b/examples/xyz-retina.html
index 07fb7dcc5b..b0c613b0ba 100644
--- a/examples/xyz-retina.html
+++ b/examples/xyz-retina.html
@@ -3,7 +3,7 @@ layout: example.html
title: XYZ Retina Tiles
shortdesc: Example of Retina / HiDPI mercator tiles (512x512px) available as XYZ.
docs: >
- The ol.source.XYZ must contain `tilePixelRatio` parameter. The tiles were prepared from a GeoTIFF file with [MapTiler](http://www.maptiler.com/).
+ The XYZ source accepts a `tilePixelRatio` option. The tiles were prepared from a GeoTIFF file with [MapTiler](http://www.maptiler.com/).
tags: "retina, hidpi, xyz, maptiler, @2x, devicePixelRatio"
---
diff --git a/examples/zoomslider.js b/examples/zoomslider.js
index 33e53e599d..b020b2f444 100644
--- a/examples/zoomslider.js
+++ b/examples/zoomslider.js
@@ -9,7 +9,7 @@ import OSM from '../src/ol/source/OSM.js';
* Helper method for map-creation.
*
* @param {string} divId The id of the div for the map.
- * @return {ol.PluggableMap} The map instance.
+ * @return {module:ol/PluggableMap} The map instance.
*/
function createMap(divId) {
const source = new OSM();
From 8e7c88d9a5a0b3915ad170cdd9585f25f798049e Mon Sep 17 00:00:00 2001
From: Tim Schaub
Date: Mon, 7 May 2018 15:50:56 -0600
Subject: [PATCH 3/7] Updated type annotations
---
src/ol/format/Feature.js | 4 ++--
src/ol/format/GMLBase.js | 3 +--
src/ol/format/GeoJSON.js | 2 +-
src/ol/format/MVT.js | 2 +-
src/ol/format/WFS.js | 4 ++--
src/ol/layer/Group.js | 2 +-
src/ol/layer/Image.js | 2 +-
src/ol/layer/Layer.js | 8 ++++----
src/ol/layer/Tile.js | 4 ++--
src/ol/layer/Vector.js | 6 +++---
src/ol/layer/VectorTile.js | 6 +++---
src/ol/proj/Projection.js | 6 +++---
src/ol/render/Event.js | 2 +-
src/ol/render/canvas.js | 4 ++--
src/ol/render/canvas/Immediate.js | 4 ++--
src/ol/render/canvas/ReplayGroup.js | 2 +-
src/ol/render/webgl/CircleReplay.js | 2 +-
src/ol/render/webgl/Immediate.js | 2 +-
src/ol/render/webgl/LineStringReplay.js | 2 +-
src/ol/render/webgl/PolygonReplay.js | 2 +-
src/ol/render/webgl/ReplayGroup.js | 4 ++--
src/ol/render/webgl/TextureReplay.js | 2 +-
src/ol/renderer/webgl/VectorLayer.js | 4 ++--
src/ol/source/VectorTile.js | 2 +-
24 files changed, 40 insertions(+), 41 deletions(-)
diff --git a/src/ol/format/Feature.js b/src/ol/format/Feature.js
index e32f4b6431..542ad65cf4 100644
--- a/src/ol/format/Feature.js
+++ b/src/ol/format/Feature.js
@@ -14,7 +14,7 @@ import {get as getProjection, equivalent as equivalentProjection, transformExten
* can not be derived from the data and if no `defaultDataProjection` is set for a format,
* the features will not be reprojected.
* @property {module:ol/extent~Extent} extent Tile extent of the tile being read. This is only used and
- * required for {@link ol.format.MVT}.
+ * required for {@link module:ol/format/MVT}.
* @property {module:ol/proj~ProjectionLike} featureProjection Projection of the feature geometries
* created by the format reader. If not provided, features will be returned in the
* `dataProjection`.
@@ -230,7 +230,7 @@ export function transformWithOptions(geometry, write, opt_options) {
write ? featureProjection : dataProjection,
write ? dataProjection : featureProjection);
} else {
- // FIXME this is necessary because ol.format.GML treats extents
+ // FIXME this is necessary because GML treats extents
// as geometries
transformed = transformExtent(
geometry,
diff --git a/src/ol/format/GMLBase.js b/src/ol/format/GMLBase.js
index 8a719ebc8a..66def16ed6 100644
--- a/src/ol/format/GMLBase.js
+++ b/src/ol/format/GMLBase.js
@@ -67,8 +67,7 @@ export const GMLNS = 'http://www.opengis.net/gml';
* instantiated in apps.
* Feature base format for reading and writing data in the GML format.
* This class cannot be instantiated, it contains only base content that
- * is shared with versioned format classes ol.format.GML2 and
- * ol.format.GML3.
+ * is shared with versioned format classes GML2 and GML3.
*
* @constructor
* @abstract
diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js
index 7c6262243c..77a789350a 100644
--- a/src/ol/format/GeoJSON.js
+++ b/src/ol/format/GeoJSON.js
@@ -328,7 +328,7 @@ function writePolygonGeometry(geometry, opt_options) {
/**
* Read a feature from a GeoJSON Feature source. Only works for Feature or
- * geometry types. Use {@link ol.format.GeoJSON#readFeatures} to read
+ * geometry types. Use {@link module:ol/format/GeoJSON#readFeatures} to read
* FeatureCollection source. If feature at source has an id, it will be used
* as Feature id by calling {@link module:ol/Feature#setId} internally.
*
diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js
index 04f2450e8e..f7766cb38d 100644
--- a/src/ol/format/MVT.js
+++ b/src/ol/format/MVT.js
@@ -25,7 +25,7 @@ import RenderFeature from '../render/Feature.js';
/**
* @typedef {Object} Options
* @property {function((module:ol/geom/Geometry|Object.)=)|function(module:ol/geom/GeometryType,Array.,(Array.|Array.>),Object.,number)} [featureClass]
- * Class for features returned by {@link ol.format.MVT#readFeatures}. Set to
+ * Class for features returned by {@link module:ol/format/MVT#readFeatures}. Set to
* {@link module:ol/Feature~Feature} to get full editing and geometry support at the cost of
* decreased rendering performance. The default is {@link module:ol/render/Feature~RenderFeature},
* which is optimized for rendering and hit detection.
diff --git a/src/ol/format/WFS.js b/src/ol/format/WFS.js
index d9e18e2922..ae45fcd966 100644
--- a/src/ol/format/WFS.js
+++ b/src/ol/format/WFS.js
@@ -21,7 +21,7 @@ import {createElementNS, isDocument, isNode, makeArrayPusher, makeChildAppender,
* @typedef {Object} Options
* @property {Object.|string} [featureNS] The namespace URI used for features.
* @property {Array.|string} [featureType] The feature type to parse. Only used for read operations.
- * @property {module:ol/format/GMLBase} [gmlFormat] The GML format to use to parse the response. Default is `ol.format.GML3`.
+ * @property {module:ol/format/GMLBase} [gmlFormat] The GML format to use to parse the response. Default is `ol/format/GML3`.
* @property {string} [schemaLocation] Optional schemaLocation to use for serialization, this will override the default.
*/
@@ -45,7 +45,7 @@ import {createElementNS, isDocument, isNode, makeArrayPusher, makeChildAppender,
* Web Feature Services have repurposed `maxfeatures` instead.
* @property {module:ol/extent~Extent} [bbox] Extent to use for the BBOX filter.
* @property {module:ol/format/filter/Filter} [filter] Filter condition. See
- * {@link ol.format.filter} for more information.
+ * {@link module:ol/format/Filter} for more information.
* @property {string} [resultType] Indicates what response should be returned,
* E.g. `hits` only includes the `numberOfFeatures` attribute in the response and no features.
*/
diff --git a/src/ol/layer/Group.js b/src/ol/layer/Group.js
index 9b6959d172..392c0652b8 100644
--- a/src/ol/layer/Group.js
+++ b/src/ol/layer/Group.js
@@ -82,7 +82,7 @@ const LayerGroup = function(opt_options) {
layers = new Collection(layers.slice(), {unique: true});
} else {
assert(layers instanceof Collection,
- 43); // Expected `layers` to be an array or an `ol.Collection`
+ 43); // Expected `layers` to be an array or a `Collection`
layers = layers;
}
} else {
diff --git a/src/ol/layer/Image.js b/src/ol/layer/Image.js
index b0be3d8263..96ba7a87df 100644
--- a/src/ol/layer/Image.js
+++ b/src/ol/layer/Image.js
@@ -21,7 +21,7 @@ import Layer from '../layer/Layer.js';
* @property {module:ol/PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
- * use {@link ol.Map#addLayer}.
+ * use {@link module:ol/Map#addLayer}.
* @property {module:ol/source/Image} [source] Source for this layer.
*/
diff --git a/src/ol/layer/Layer.js b/src/ol/layer/Layer.js
index 09c6e73f9b..22dba72354 100644
--- a/src/ol/layer/Layer.js
+++ b/src/ol/layer/Layer.js
@@ -25,7 +25,7 @@ import SourceState from '../source/State.js';
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {module:ol/source/Source} [source] Source for this layer. If not provided to the constructor,
- * the source can be set by calling {@link ol.layer.Layer#setSource layer.setSource(source)} after
+ * the source can be set by calling {@link module:ol/layer/Layer#setSource layer.setSource(source)} after
* construction.
*/
@@ -52,7 +52,7 @@ import SourceState from '../source/State.js';
* Layers group together those properties that pertain to how the data is to be
* displayed, irrespective of the source of that data.
*
- * Layers are usually added to a map with {@link ol.Map#addLayer}. Components
+ * Layers are usually added to a map with {@link module:ol/Map#addLayer}. Components
* like {@link module:ol/interaction/Select~Select} use unmanaged layers
* internally. These unmanaged layers are associated with the map using
* {@link module:ol/layer/Layer~Layer#setMap} instead.
@@ -191,12 +191,12 @@ Layer.prototype.handleSourcePropertyChange_ = function() {
/**
* Sets the layer to be rendered on top of other layers on a map. The map will
* not manage this layer in its layers collection, and the callback in
- * {@link ol.Map#forEachLayerAtPixel} will receive `null` as layer. This
+ * {@link module:ol/Map#forEachLayerAtPixel} will receive `null` as layer. This
* is useful for temporary layers. To remove an unmanaged layer from the map,
* use `#setMap(null)`.
*
* To add the layer to a map and have it managed by the map, use
- * {@link ol.Map#addLayer} instead.
+ * {@link module:ol/Map#addLayer} instead.
* @param {module:ol/PluggableMap} map Map.
* @api
*/
diff --git a/src/ol/layer/Tile.js b/src/ol/layer/Tile.js
index 38b3835bb5..df68e39cfa 100644
--- a/src/ol/layer/Tile.js
+++ b/src/ol/layer/Tile.js
@@ -26,7 +26,7 @@ import {assign} from '../obj.js';
* @property {module:ol/PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
- * use {@link ol.Map#addLayer}.
+ * use {@link module:ol/Map#addLayer}.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
*/
@@ -82,7 +82,7 @@ TileLayer.prototype.getPreload = function() {
/**
- * Return the associated {@link ol.source.Tile tilesource} of the layer.
+ * Return the associated {@link module:ol/source/Tile tilesource} of the layer.
* @function
* @return {module:ol/source/Tile} Source.
* @api
diff --git a/src/ol/layer/Vector.js b/src/ol/layer/Vector.js
index e10b2fdc22..db89459871 100644
--- a/src/ol/layer/Vector.js
+++ b/src/ol/layer/Vector.js
@@ -36,12 +36,12 @@ import {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style.
* @property {module:ol/PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
- * use {@link ol.Map#addLayer}.
+ * use {@link module:ol/Map#addLayer}.
* @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all
* image and text styles, and the priority is defined by the z-index of the style. Lower z-index
* means higher priority.
* @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [style] Layer style. See
- * {@link ol.style} for default style which will be used if this is not defined.
+ * {@link module:ol/style} for default style which will be used if this is not defined.
* @property {number} [maxTilesLoading=16] Maximum number tiles to load simultaneously.
* @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be
* recreated during animations. This means that no vectors will be shown clipped, but the setting
@@ -262,7 +262,7 @@ VectorLayer.prototype.setRenderOrder = function(renderOrder) {
* an array of styles. If it is `undefined` the default style is used. If
* it is `null` the layer has no style (a `null` style), so only features
* that have their own styles will be rendered in the layer. See
- * {@link ol.style} for information on the default style.
+ * {@link module:ol/style} for information on the default style.
* @param {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction|null|undefined}
* style Layer style.
* @api
diff --git a/src/ol/layer/VectorTile.js b/src/ol/layer/VectorTile.js
index 0adf5100c6..2f9afc660a 100644
--- a/src/ol/layer/VectorTile.js
+++ b/src/ol/layer/VectorTile.js
@@ -64,13 +64,13 @@ export const RenderType = {
* @property {module:ol/PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
- * use {@link ol.Map#addLayer}.
+ * use {@link module:ol/Map#addLayer}.
* @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all
* image and text styles, and the priority is defined by the z-index of the style. Lower z-index
* means higher priority. When set to `true`, a `renderMode` of `'image'` will be overridden with
* `'hybrid'`.
* @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [style] Layer style. See
- * {@link ol.style} for default style which will be used if this is not defined.
+ * {@link module:ol/style} for default style which will be used if this is not defined.
* @property {number} [maxTilesLoading=16] Maximum number tiles to load simultaneously.
* @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be
* recreated during animations. This means that no vectors will be shown clipped, but the setting
@@ -83,7 +83,7 @@ export const RenderType = {
* @property {module:ol/render~OrderFunction} [renderOrder] Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created.
* @property {(module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction)} [style] Layer style. See
- * {@link ol.style} for default style which will be used if this is not defined.
+ * {@link module:ol/style} for default style which will be used if this is not defined.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
*/
diff --git a/src/ol/proj/Projection.js b/src/ol/proj/Projection.js
index 00e3b0f4d7..e5cef6182d 100644
--- a/src/ol/proj/Projection.js
+++ b/src/ol/proj/Projection.js
@@ -20,14 +20,14 @@ import {METERS_PER_UNIT} from '../proj/Units.js';
* Function to determine resolution at a point. The function is called with a
* `{number}` view resolution and an `{module:ol/coordinate~Coordinate}` as arguments, and returns
* the `{number}` resolution at the passed coordinate. If this is `undefined`,
- * the default {@link ol.proj#getPointResolution} function will be used.
+ * the default {@link module:ol/proj#getPointResolution} function will be used.
*/
/**
* @classdesc
* Projection definition class. One of these is created for each projection
- * supported in the application and stored in the {@link ol.proj} namespace.
+ * supported in the application and stored in the {@link module:ol/proj} namespace.
* You can use these in applications, but this is not required, as API params
* and options use {@link module:ol/proj~ProjectionLike} which means the simple string
* code will suffice.
@@ -264,7 +264,7 @@ Projection.prototype.setWorldExtent = function(worldExtent) {
/**
- * Set the getPointResolution function (see {@link ol.proj#getPointResolution}
+ * Set the getPointResolution function (see {@link module:ol/proj~getPointResolution}
* for this projection.
* @param {function(number, module:ol/coordinate~Coordinate):number} func Function
* @api
diff --git a/src/ol/render/Event.js b/src/ol/render/Event.js
index a8e1800b83..b87046535f 100644
--- a/src/ol/render/Event.js
+++ b/src/ol/render/Event.js
@@ -21,7 +21,7 @@ const RenderEvent = function(
Event.call(this, type);
/**
- * For canvas, this is an instance of {@link ol.render.canvas.Immediate}.
+ * For canvas, this is an instance of {@link module:ol/render/canvas/Immediate}.
* @type {module:ol/render/VectorContext|undefined}
* @api
*/
diff --git a/src/ol/render/canvas.js b/src/ol/render/canvas.js
index ddfe1105b3..e769547c6e 100644
--- a/src/ol/render/canvas.js
+++ b/src/ol/render/canvas.js
@@ -64,7 +64,7 @@ import {create as createTransform} from '../transform.js';
* rendered extent of the group in pixel space. `count` is the number of styles
* in the group, i.e. 2 when an image and a text are grouped, or 1 otherwise.
* In addition to these four elements, declutter instruction arrays (i.e. the
- * arguments to @{link ol.render.canvas.drawImage} are appended to the array.
+ * arguments to {@link module:ol/render/canvas~drawImage} are appended to the array.
* @typedef {Array.<*>} DeclutterGroup
*/
@@ -155,7 +155,7 @@ export const defaultLineWidth = 1;
/**
* The label cache for text rendering. To change the default cache size of 2048
- * entries, use {@link ol.structs.LRUCache#setSize}.
+ * entries, use {@link module:ol/structs/LRUCache#setSize}.
* @type {module:ol/structs/LRUCache.}
* @api
*/
diff --git a/src/ol/render/canvas/Immediate.js b/src/ol/render/canvas/Immediate.js
index 7d8b74ce89..7d16659e38 100644
--- a/src/ol/render/canvas/Immediate.js
+++ b/src/ol/render/canvas/Immediate.js
@@ -3,7 +3,7 @@
*/
// FIXME test, especially polygons with holes and multipolygons
// FIXME need to handle large thick features (where pixel size matters)
-// FIXME add offset and end to ol.geom.flat.transform.transform2D?
+// FIXME add offset and end to ol/geom/flat/transform~transform2D?
import {inherits} from '../../index.js';
import {equals} from '../../array.js';
@@ -448,7 +448,7 @@ CanvasImmediateRenderer.prototype.setStyle = function(style) {
/**
* Render a geometry into the canvas. Call
- * {@link ol.render.canvas.Immediate#setStyle} first to set the rendering style.
+ * {@link module:ol/render/canvas/Immediate#setStyle} first to set the rendering style.
*
* @param {module:ol/geom/Geometry|module:ol/render/Feature} geometry The geometry to render.
* @override
diff --git a/src/ol/render/canvas/ReplayGroup.js b/src/ol/render/canvas/ReplayGroup.js
index 629a26db96..f7421bd616 100644
--- a/src/ol/render/canvas/ReplayGroup.js
+++ b/src/ol/render/canvas/ReplayGroup.js
@@ -452,7 +452,7 @@ CanvasReplayGroup.prototype.isEmpty = function() {
* @param {number} viewRotation View rotation.
* @param {Object.} skippedFeaturesHash Ids of features to skip.
* @param {Array.=} opt_replayTypes Ordered replay types to replay.
- * Default is {@link ol.render.replay.ORDER}
+ * Default is {@link module:ol/render/replay~ORDER}
* @param {Object.=} opt_declutterReplays Declutter replays.
*/
CanvasReplayGroup.prototype.replay = function(context,
diff --git a/src/ol/render/webgl/CircleReplay.js b/src/ol/render/webgl/CircleReplay.js
index 105648a6f5..0f65f75c03 100644
--- a/src/ol/render/webgl/CircleReplay.js
+++ b/src/ol/render/webgl/CircleReplay.js
@@ -17,7 +17,7 @@ import WebGLBuffer from '../../webgl/Buffer.js';
/**
* @constructor
- * @extends {ol.render.webgl.Replay}
+ * @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
diff --git a/src/ol/render/webgl/Immediate.js b/src/ol/render/webgl/Immediate.js
index ed7db3472b..85bf4edda4 100644
--- a/src/ol/render/webgl/Immediate.js
+++ b/src/ol/render/webgl/Immediate.js
@@ -88,7 +88,7 @@ inherits(WebGLImmediateRenderer, VectorContext);
/**
- * @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
+ * @param {module:ol/render/webgl/ReplayGroup} replayGroup Replay group.
* @param {module:ol/geom/Geometry|module:ol/render/Feature} geometry Geometry.
* @private
*/
diff --git a/src/ol/render/webgl/LineStringReplay.js b/src/ol/render/webgl/LineStringReplay.js
index 6677ef8396..be16dc0daa 100644
--- a/src/ol/render/webgl/LineStringReplay.js
+++ b/src/ol/render/webgl/LineStringReplay.js
@@ -37,7 +37,7 @@ const Instruction = {
/**
* @constructor
- * @extends {ol.render.webgl.Replay}
+ * @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
diff --git a/src/ol/render/webgl/PolygonReplay.js b/src/ol/render/webgl/PolygonReplay.js
index e684c05fc5..75113080d4 100644
--- a/src/ol/render/webgl/PolygonReplay.js
+++ b/src/ol/render/webgl/PolygonReplay.js
@@ -38,7 +38,7 @@ import WebGLBuffer from '../../webgl/Buffer.js';
/**
* @constructor
- * @extends {ol.render.webgl.Replay}
+ * @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
diff --git a/src/ol/render/webgl/ReplayGroup.js b/src/ol/render/webgl/ReplayGroup.js
index c1818c182b..be511cd108 100644
--- a/src/ol/render/webgl/ReplayGroup.js
+++ b/src/ol/render/webgl/ReplayGroup.js
@@ -20,7 +20,7 @@ const HIT_DETECTION_SIZE = [1, 1];
/**
* @type {Object.}
*/
const BATCH_CONSTRUCTORS = {
@@ -64,7 +64,7 @@ const WebGLReplayGroup = function(tolerance, maxExtent, opt_renderBuffer) {
/**
* @private
* @type {!Object.>}
+ * Object.>}
*/
this.replaysByZIndex_ = {};
diff --git a/src/ol/render/webgl/TextureReplay.js b/src/ol/render/webgl/TextureReplay.js
index b1e39781e5..b77fee63f4 100644
--- a/src/ol/render/webgl/TextureReplay.js
+++ b/src/ol/render/webgl/TextureReplay.js
@@ -13,7 +13,7 @@ import {createTexture} from '../../webgl/Context.js';
/**
* @constructor
* @abstract
- * @extends {ol.render.webgl.Replay}
+ * @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
diff --git a/src/ol/renderer/webgl/VectorLayer.js b/src/ol/renderer/webgl/VectorLayer.js
index 0764e82f2d..bd654d6b29 100644
--- a/src/ol/renderer/webgl/VectorLayer.js
+++ b/src/ol/renderer/webgl/VectorLayer.js
@@ -53,7 +53,7 @@ const WebGLVectorLayerRenderer = function(mapRenderer, vectorLayer) {
/**
* @private
- * @type {ol.render.webgl.ReplayGroup}
+ * @type {module:ol/render/webgl/ReplayGroup}
*/
this.replayGroup_ = null;
@@ -307,7 +307,7 @@ WebGLVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerStat
* @param {number} pixelRatio Pixel ratio.
* @param {(module:ol/style/Style|Array.)} styles The style or array of
* styles.
- * @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
+ * @param {module:ol/render/webgl/ReplayGroup} replayGroup Replay group.
* @return {boolean} `true` if an image is loading.
*/
WebGLVectorLayerRenderer.prototype.renderFeature = function(feature, resolution, pixelRatio, styles, replayGroup) {
diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js
index 1534fbff0f..b953d8b40f 100644
--- a/src/ol/source/VectorTile.js
+++ b/src/ol/source/VectorTile.js
@@ -32,7 +32,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
* var data = // ... fetch data
* var format = tile.getFormat();
* tile.setFeatures(format.readFeatures(data, {
- * // uncomment the line below for ol.format.MVT only
+ * // uncomment the line below for ol/format/MVT only
* extent: tile.getExtent(),
* featureProjection: map.getView().getProjection()
* }));
From 34c1a6b9ba229ff91842709111274d1ed9c2fd9b Mon Sep 17 00:00:00 2001
From: Tim Schaub
Date: Mon, 7 May 2018 20:49:08 -0600
Subject: [PATCH 4/7] Replace type annotations
---
src/ol/format/MVT.js | 12 ++---
src/ol/format/readme.md | 60 ++++++++++++-------------
src/ol/render/webgl/CircleReplay.js | 2 +-
src/ol/render/webgl/ImageReplay.js | 2 +-
src/ol/render/webgl/Immediate.js | 18 ++++----
src/ol/render/webgl/LineStringReplay.js | 2 +-
src/ol/render/webgl/PolygonReplay.js | 2 +-
src/ol/render/webgl/Replay.js | 18 ++++----
src/ol/render/webgl/TextReplay.js | 2 +-
src/ol/render/webgl/TextureReplay.js | 2 +-
src/ol/renderer/webgl/Map.js | 2 +-
src/ol/source/Image.js | 8 ++--
src/ol/source/ImageArcGISRest.js | 4 +-
src/ol/source/ImageMapGuide.js | 2 +-
src/ol/source/ImageWMS.js | 2 +-
src/ol/source/Raster.js | 6 +--
src/ol/source/Vector.js | 2 +-
src/ol/source/VectorEventType.js | 8 ++--
src/ol/tilegrid.js | 2 +-
19 files changed, 78 insertions(+), 78 deletions(-)
diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js
index f7766cb38d..355102a6c6 100644
--- a/src/ol/format/MVT.js
+++ b/src/ol/format/MVT.js
@@ -103,7 +103,7 @@ inherits(MVT, FeatureFormat);
* Reader callback for parsing layers.
* @param {number} tag The tag.
* @param {Object} layers The layers object.
- * @param {ol.ext.PBF} pbf The PBF.
+ * @param {Object} pbf The PBF.
*/
function layersPBFReader(tag, layers, pbf) {
if (tag === 3) {
@@ -125,7 +125,7 @@ function layersPBFReader(tag, layers, pbf) {
* Reader callback for parsing layer.
* @param {number} tag The tag.
* @param {Object} layer The layer object.
- * @param {ol.ext.PBF} pbf The PBF.
+ * @param {Object} pbf The PBF.
*/
function layerPBFReader(tag, layer, pbf) {
if (tag === 15) {
@@ -159,7 +159,7 @@ function layerPBFReader(tag, layer, pbf) {
* Reader callback for parsing feature.
* @param {number} tag The tag.
* @param {Object} feature The feature object.
- * @param {ol.ext.PBF} pbf The PBF.
+ * @param {Object} pbf The PBF.
*/
function featurePBFReader(tag, feature, pbf) {
if (tag == 1) {
@@ -182,7 +182,7 @@ function featurePBFReader(tag, feature, pbf) {
/**
* Read a raw feature from the pbf offset stored at index `i` in the raw layer.
* @suppress {missingProperties}
- * @param {ol.ext.PBF} pbf PBF.
+ * @param {Object} pbf PBF.
* @param {Object} layer Raw layer.
* @param {number} i Index of the feature in the raw layer's `features` array.
* @return {Object} Raw feature.
@@ -205,7 +205,7 @@ function readRawFeature(pbf, layer, i) {
* Read the raw geometry from the pbf offset stored in a raw feature's geometry
* property.
* @suppress {missingProperties}
- * @param {ol.ext.PBF} pbf PBF.
+ * @param {Object} pbf PBF.
* @param {Object} feature Raw feature.
* @param {Array.} flatCoordinates Array to store flat coordinates in.
* @param {Array.} ends Array to store ends in.
@@ -294,7 +294,7 @@ function getGeometryType(type, numEnds) {
/**
* @private
- * @param {ol.ext.PBF} pbf PBF
+ * @param {Object} pbf PBF
* @param {Object} rawFeature Raw Mapbox feature.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/Feature|module:ol/render/Feature} Feature.
diff --git a/src/ol/format/readme.md b/src/ol/format/readme.md
index c8edd91d00..7bba8e2155 100644
--- a/src/ol/format/readme.md
+++ b/src/ol/format/readme.md
@@ -1,13 +1,13 @@
-# Implementing formats with ol.format.Feature
-`ol.format.Feature` defines a number of abstract methods including:
+# Implementing formats with ol/format/Feature
+`ol/format/Feature` defines a number of abstract methods including:
-* `readFeatures` returning an `Array.`
-* `readFeature` returning an `ol.Feature`
+* `readFeatures` returning an `Array.`
+* `readFeature` returning an `ol/Feature`
* `readGeometry` returning an `module:ol/geom/Geometry~Geometry`
Having different functions for multiple return types allows both the user to specify what type of data they want and for the compiler to properly type check the code. Depending on the format, it is entirely reasonable to leave one or more of these methods unimplemented, or provide sensible default implementations.
-For example, `ol.format.GPX` only supports reading multiple features. Therefore `readFeature` and `readGeometry` are unimplemented and will raise an exception if called.
+For example, `ol/format/GPX` only supports reading multiple features. Therefore `readFeature` and `readGeometry` are unimplemented and will raise an exception if called.
The IGC format contains only one feature per file, so `readFeature` returns that feature, `readFeatures` returns an array containing a single feature which is the feature in the file, and `readGeometry` is unimplemented.
@@ -18,10 +18,10 @@ If a file cannot be parsed, then the return value should be `null` for all three
# Implementing XML formats
-This is an introduction for people looking to contribute an XML format reader to OpenLayers. After having read this document, you should read the code of and make sure that you understand the simpler XML format readers like `ol.format.GPX` before embarking on writing your own format reader.
+This is an introduction for people looking to contribute an XML format reader to OpenLayers. After having read this document, you should read the code of and make sure that you understand the simpler XML format readers like `ol/format/GPX` before embarking on writing your own format reader.
The document ends with guidelines for implementing a new format.
-The `ol.xml` namespace contains a number of useful functions for parsing XML documents. All code in OpenLayers that reads data from XML documents should use it. It has several features:
+The `ol/xml` namespace contains a number of useful functions for parsing XML documents. All code in OpenLayers that reads data from XML documents should use it. It has several features:
* Browser support back to IE9
* Correct treatment of XML namespaces
@@ -30,34 +30,34 @@ The `ol.xml` namespace contains a number of useful functions for parsing XML doc
* Decoupling of the XML document structure from the output data structure
* Good compatibility with the Closure Compiler, including good type checking
-The `ol.format.XML` class includes a number of methods for reading arrays of features, single features, geometries, and projections from XML documents. `ol.format.XML` should only be used for formats containing features and geometries. If your format does not contain features or geometries (e.g. WMS GetCapabilities) then you should not use `ol.format.XML`.
+The `ol/format/XML` class includes a number of methods for reading arrays of features, single features, geometries, and projections from XML documents. `ol/format/XML` should only be used for formats containing features and geometries. If your format does not contain features or geometries (e.g. WMS GetCapabilities) then you should not use `ol/format/XML`.
-## `ol.format.XML`
+## `ol/format/XML`
-`ol.format.XML` is for formats that contain features and geometries. If your XML file contains something else then you should not inherit from `ol.format.XML` and can skip ahead to the `ol.xml` section.
+`ol/format/XML` is for formats that contain features and geometries. If your XML file contains something else then you should not inherit from `ol/format/XML` and can skip ahead to the `ol/xml` section.
-`ol.format.XML` is perhaps easiest to explain first, since it is higher level than `ol.xml`.
+`ol/format/XML` is perhaps easiest to explain first, since it is higher level than `ol/xml`.
-`ol.format.XML` defines a number of abstract type-checked methods with names including:
+`ol/format/XML` defines a number of abstract type-checked methods with names including:
read{Features,Feature,Geometry}From{Document,Node}
`Document`s are top-level XML document objects, `Node`s are children of the top-level XML document object. In modern browsers `Document` is a subclass of `Node`, and inherits all of `Node`'s methods. In IE, this is not the case: `Document` is not a subclass of `Node`, and `Document` only has some of `Node`'s functionality. The distinction between the two is therefore necessary.
-## `ol.xml`
+## `ol/xml`
-There are two key concepts to master to understand how `ol.xml` works:
+There are two key concepts to master to understand how `ol/xml` works:
-* How `ol.xml.parse` traverses the XML document (or node) and calls back to your code
-* How `ol.xml` decouples the structure of the XML document (which is always a tree) from the structure of the output data (which could be a single object, an array of objects, or anything else) using an object stack.
+* How `ol/xml~parse` traverses the XML document (or node) and calls back to your code
+* How `ol/xml` decouples the structure of the XML document (which is always a tree) from the structure of the output data (which could be a single object, an array of objects, or anything else) using an object stack.
It's handy to have the [`src/ol/xml.js` source code](https://github.com/openlayers/openlayers/blob/master/src/ol/xml.js) to hand while you read the following.
-## How `ol.xml.parse` traverses the XML document
+## How `ol/xml~parse` traverses the XML document
-`ol.xml.parse` is the core of the XML parser. Given a `Node`, it loops over all that `Node`'s child `Elements` (ignoring text, CDATA sections, comments, etc.). For each child element, it looks up to see if there is a function to call that matches the child element's namespace and local (unqualified) name. If there is a function to call, then that function is called with the child element.
+`ol/xml~parse` is the core of the XML parser. Given a `Node`, it loops over all that `Node`'s child `Elements` (ignoring text, CDATA sections, comments, etc.). For each child element, it looks up to see if there is a function to call that matches the child element's namespace and local (unqualified) name. If there is a function to call, then that function is called with the child element.
-The `parserNS` argument to `ol.xml.parse` is an `Object` whose keys are XML namespaces and whose values are `Objects` whose keys are local element names and whose values are functions. A simple example might look like this:
+The `parserNS` argument to `parse` is an `Object` whose keys are XML namespaces and whose values are `Objects` whose keys are local element names and whose values are functions. A simple example might look like this:
```js
var parserNS = {
@@ -74,11 +74,11 @@ var parserNS = {
};
```
-Many XML formats use different namespaces for different versions, but the code for handling the elements in different versions is the same. `ol.xml.makeParserNS` is an helper function that creates the above structure given a single array of namespaces and a single object mapping element names onto functions.
+Many XML formats use different namespaces for different versions, but the code for handling the elements in different versions is the same. `ol/xml~makeParserNS` is an helper function that creates the above structure given a single array of namespaces and a single object mapping element names onto functions.
## How the object stack works
-`ol.xml.parse` also takes an argument called `objectStack` which is an `Array` of arbitrary values. This stack is key to the decoupling of the XML tree structure from the structure of the parsed output.
+`ol/xml~parse` also takes an argument called `objectStack` which is an `Array` of arbitrary values. This stack is key to the decoupling of the XML tree structure from the structure of the parsed output.
Generally speaking, each callback function will modify the object at the top of the object stack. This is perhaps best demonstrated with a couple of examples.
@@ -93,9 +93,9 @@ First consider the case of constructing a feature. Consider the following (imag
```
-When we parse find the `` tag, we construct a new `ol.Feature` and push it on to the object stack. We will then call a `ol.xml.parse` to parse the child elements of the `Feature` tag. When we find the `` element, we'll set the id of the object that is on top of the object stack (the `ol.Feature`). When find the `` element we set the geometry of the object on the top of the object stack (still the `ol.Feature`). Finally, at the end of the `` tag, our fully-configured `ol.Feature` is on the top of the stack, so we pop it off the top of the stack and return it.
+When we parse find the `` tag, we construct a new `ol/Feature` and push it on to the object stack. We will then call a `ol/xml~parse` to parse the child elements of the `Feature` tag. When we find the `` element, we'll set the id of the object that is on top of the object stack (the `ol/Feature`). When find the `` element we set the geometry of the object on the top of the object stack (still the `ol/Feature`). Finally, at the end of the `` tag, our fully-configured `ol/Feature` is on the top of the stack, so we pop it off the top of the stack and return it.
-This pattern is so common that there is a function, `ol.xml.pushParseAndPop` that implements it.
+This pattern is so common that there is a function, `ol/xml~pushParseAndPop` that implements it.
Now consider the case of parsing multiple features:
@@ -112,23 +112,23 @@ Now consider the case of parsing multiple features:
```
-In this case, we want to extract an `Array` of `ol.Feature`s. Here's how it works. When we encounter the `` tag we push an empty `Array` on to the stack. On each `` tag, we invoke our feature parser above, which will return a populated `ol.Feature`. We append this `ol.Feature` to the object on the top of the object stack (our `Array` of `ol.Feature`s). At the final closing `` tag we pop the object off the top of the stack - now an `Array` containing two features - and return it.
+In this case, we want to extract an `Array` of `ol/Feature`s. Here's how it works. When we encounter the `` tag we push an empty `Array` on to the stack. On each `` tag, we invoke our feature parser above, which will return a populated `ol/Feature`. We append this `ol/Feature` to the object on the top of the object stack (our `Array` of `ol/Feature`s). At the final closing `` tag we pop the object off the top of the stack - now an `Array` containing two features - and return it.
### Common operations
In the above there are many common operations, like setting the property of the object on the top of the stack, or reading an object and appending that to an array on the top of the stack. There are many helper functions here, for example:
-* `ol.xml.makeObjectPropertySetter` reads a value from the child element and sets a property on the object on the top of the stack.
-* `ol.xml.makeArrayPusher` reads a value from the child element and appends it to the array on the top of the stack.
-* `ol.xml.makeReplacer` reads a value from the child element and *replaces* whatever is on top of the stack with it.
+* `ol/xml~makeObjectPropertySetter` reads a value from the child element and sets a property on the object on the top of the stack.
+* `ol/xml~makeArrayPusher` reads a value from the child element and appends it to the array on the top of the stack.
+* `ol/xml~makeReplacer` reads a value from the child element and *replaces* whatever is on top of the stack with it.
### Putting it all together
-With the above, you should be able to read through the [source code to `ol.format.GPX`](https://github.com/openlayers/openlayers/blob/master/src/ol/format/gpxformat.js) and get a feel for how it works. Start from the bottom of the file and work upwards. It's also useful to have [an example GPX file](http://www.topografix.com/fells_loop.gpx) and [the GPX specification](http://www.topografix.com/GPX/1/1/) to hand.
+With the above, you should be able to read through the [source code to `ol/format/GPX`](https://github.com/openlayers/openlayers/blob/master/src/ol/format/gpxformat.js) and get a feel for how it works. Start from the bottom of the file and work upwards. It's also useful to have [an example GPX file](http://www.topografix.com/fells_loop.gpx) and [the GPX specification](http://www.topografix.com/GPX/1/1/) to hand.
### Handling errors
-If, when reading a value from a child element, you find an invalid value, you should return `undefined`. The helper functions above (like `ol.xml.makeObjectPropertySetter`) will then skip this value. If the structure is incomplete or incorrect (e.g. a child element is missing a mandatory tag) then you should also return `undefined` from your reader, which will in turn cause the value to be skipped.
-An `ol.format.Format` should read as many features as it can, skipping features with any errors.
+If, when reading a value from a child element, you find an invalid value, you should return `undefined`. The helper functions above (like `ol/xml~makeObjectPropertySetter`) will then skip this value. If the structure is incomplete or incorrect (e.g. a child element is missing a mandatory tag) then you should also return `undefined` from your reader, which will in turn cause the value to be skipped.
+An `ol/format/Format` should read as many features as it can, skipping features with any errors.
diff --git a/src/ol/render/webgl/CircleReplay.js b/src/ol/render/webgl/CircleReplay.js
index 0f65f75c03..e9a708b153 100644
--- a/src/ol/render/webgl/CircleReplay.js
+++ b/src/ol/render/webgl/CircleReplay.js
@@ -27,7 +27,7 @@ const WebGLCircleReplay = function(tolerance, maxExtent) {
/**
* @private
- * @type {ol.render.webgl.circlereplay.defaultshader.Locations}
+ * @type {module:ol/render/webgl/circlereplay/defaultshader/Locations}
*/
this.defaultLocations_ = null;
diff --git a/src/ol/render/webgl/ImageReplay.js b/src/ol/render/webgl/ImageReplay.js
index 59e34a5c03..91e26a94ea 100644
--- a/src/ol/render/webgl/ImageReplay.js
+++ b/src/ol/render/webgl/ImageReplay.js
@@ -7,7 +7,7 @@ import WebGLBuffer from '../../webgl/Buffer.js';
/**
* @constructor
- * @extends {ol.render.webgl.TextureReplay}
+ * @extends {module:ol/render/webgl/TextureReplay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
diff --git a/src/ol/render/webgl/Immediate.js b/src/ol/render/webgl/Immediate.js
index 85bf4edda4..24cf41c001 100644
--- a/src/ol/render/webgl/Immediate.js
+++ b/src/ol/render/webgl/Immediate.js
@@ -94,7 +94,7 @@ inherits(WebGLImmediateRenderer, VectorContext);
*/
WebGLImmediateRenderer.prototype.drawText_ = function(replayGroup, geometry) {
const context = this.context_;
- const replay = /** @type {ol.render.webgl.TextReplay} */ (
+ const replay = /** @type {module:ol/render/webgl/TextReplay} */ (
replayGroup.getReplay(0, ReplayType.TEXT));
replay.setTextStyle(this.textStyle_);
replay.drawText(geometry, null);
@@ -128,7 +128,7 @@ WebGLImmediateRenderer.prototype.setStyle = function(style) {
/**
* Render a geometry into the canvas. Call
- * {@link ol.render.webgl.Immediate#setStyle} first to set the rendering style.
+ * {@link ol/render/webgl/Immediate#setStyle} first to set the rendering style.
*
* @param {module:ol/geom/Geometry|module:ol/render/Feature} geometry The geometry to render.
* @override
@@ -199,7 +199,7 @@ WebGLImmediateRenderer.prototype.drawGeometryCollection = function(geometry, dat
WebGLImmediateRenderer.prototype.drawPoint = function(geometry, data) {
const context = this.context_;
const replayGroup = new WebGLReplayGroup(1, this.extent_);
- const replay = /** @type {ol.render.webgl.ImageReplay} */ (
+ const replay = /** @type {module:ol/render/webgl/ImageReplay} */ (
replayGroup.getReplay(0, ReplayType.IMAGE));
replay.setImageStyle(this.imageStyle_);
replay.drawPoint(geometry, data);
@@ -226,7 +226,7 @@ WebGLImmediateRenderer.prototype.drawPoint = function(geometry, data) {
WebGLImmediateRenderer.prototype.drawMultiPoint = function(geometry, data) {
const context = this.context_;
const replayGroup = new WebGLReplayGroup(1, this.extent_);
- const replay = /** @type {ol.render.webgl.ImageReplay} */ (
+ const replay = /** @type {module:ol/render/webgl/ImageReplay} */ (
replayGroup.getReplay(0, ReplayType.IMAGE));
replay.setImageStyle(this.imageStyle_);
replay.drawMultiPoint(geometry, data);
@@ -252,7 +252,7 @@ WebGLImmediateRenderer.prototype.drawMultiPoint = function(geometry, data) {
WebGLImmediateRenderer.prototype.drawLineString = function(geometry, data) {
const context = this.context_;
const replayGroup = new WebGLReplayGroup(1, this.extent_);
- const replay = /** @type {ol.render.webgl.LineStringReplay} */ (
+ const replay = /** @type {module:ol/render/webgl/LineStringReplay} */ (
replayGroup.getReplay(0, ReplayType.LINE_STRING));
replay.setFillStrokeStyle(null, this.strokeStyle_);
replay.drawLineString(geometry, data);
@@ -278,7 +278,7 @@ WebGLImmediateRenderer.prototype.drawLineString = function(geometry, data) {
WebGLImmediateRenderer.prototype.drawMultiLineString = function(geometry, data) {
const context = this.context_;
const replayGroup = new WebGLReplayGroup(1, this.extent_);
- const replay = /** @type {ol.render.webgl.LineStringReplay} */ (
+ const replay = /** @type {module:ol/render/webgl/LineStringReplay} */ (
replayGroup.getReplay(0, ReplayType.LINE_STRING));
replay.setFillStrokeStyle(null, this.strokeStyle_);
replay.drawMultiLineString(geometry, data);
@@ -304,7 +304,7 @@ WebGLImmediateRenderer.prototype.drawMultiLineString = function(geometry, data)
WebGLImmediateRenderer.prototype.drawPolygon = function(geometry, data) {
const context = this.context_;
const replayGroup = new WebGLReplayGroup(1, this.extent_);
- const replay = /** @type {ol.render.webgl.PolygonReplay} */ (
+ const replay = /** @type {module:ol/render/webgl/PolygonReplay} */ (
replayGroup.getReplay(0, ReplayType.POLYGON));
replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
replay.drawPolygon(geometry, data);
@@ -330,7 +330,7 @@ WebGLImmediateRenderer.prototype.drawPolygon = function(geometry, data) {
WebGLImmediateRenderer.prototype.drawMultiPolygon = function(geometry, data) {
const context = this.context_;
const replayGroup = new WebGLReplayGroup(1, this.extent_);
- const replay = /** @type {ol.render.webgl.PolygonReplay} */ (
+ const replay = /** @type {module:ol/render/webgl/PolygonReplay} */ (
replayGroup.getReplay(0, ReplayType.POLYGON));
replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
replay.drawMultiPolygon(geometry, data);
@@ -356,7 +356,7 @@ WebGLImmediateRenderer.prototype.drawMultiPolygon = function(geometry, data) {
WebGLImmediateRenderer.prototype.drawCircle = function(geometry, data) {
const context = this.context_;
const replayGroup = new WebGLReplayGroup(1, this.extent_);
- const replay = /** @type {ol.render.webgl.CircleReplay} */ (
+ const replay = /** @type {module:ol/render/webgl/CircleReplay} */ (
replayGroup.getReplay(0, ReplayType.CIRCLE));
replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
replay.drawCircle(geometry, data);
diff --git a/src/ol/render/webgl/LineStringReplay.js b/src/ol/render/webgl/LineStringReplay.js
index be16dc0daa..139af5d95b 100644
--- a/src/ol/render/webgl/LineStringReplay.js
+++ b/src/ol/render/webgl/LineStringReplay.js
@@ -47,7 +47,7 @@ const WebGLLineStringReplay = function(tolerance, maxExtent) {
/**
* @private
- * @type {ol.render.webgl.linestringreplay.defaultshader.Locations}
+ * @type {module:ol/render/webgl/linestringreplay/defaultshader/Locations}
*/
this.defaultLocations_ = null;
diff --git a/src/ol/render/webgl/PolygonReplay.js b/src/ol/render/webgl/PolygonReplay.js
index 75113080d4..25db69a264 100644
--- a/src/ol/render/webgl/PolygonReplay.js
+++ b/src/ol/render/webgl/PolygonReplay.js
@@ -51,7 +51,7 @@ const WebGLPolygonReplay = function(tolerance, maxExtent) {
/**
* @private
- * @type {ol.render.webgl.polygonreplay.defaultshader.Locations}
+ * @type {module:ol/render/webgl/polygonreplay/defaultshader/Locations}
*/
this.defaultLocations_ = null;
diff --git a/src/ol/render/webgl/Replay.js b/src/ol/render/webgl/Replay.js
index fbe95b3912..4a55652a31 100644
--- a/src/ol/render/webgl/Replay.js
+++ b/src/ol/render/webgl/Replay.js
@@ -114,7 +114,7 @@ const WebGLReplay = function(tolerance, maxExtent) {
/**
* Optional parameter for PolygonReplay instances.
* @protected
- * @type {ol.render.webgl.LineStringReplay|undefined}
+ * @type {module:ol/render/webgl/LineStringReplay|undefined}
*/
this.lineStringReplay = undefined;
@@ -145,10 +145,10 @@ WebGLReplay.prototype.finish = function(context) {};
* @param {module:ol/webgl/Context} context Context.
* @param {module:ol/size~Size} size Size.
* @param {number} pixelRatio Pixel ratio.
- * @return {ol.render.webgl.circlereplay.defaultshader.Locations|
- ol.render.webgl.linestringreplay.defaultshader.Locations|
- ol.render.webgl.polygonreplay.defaultshader.Locations|
- ol.render.webgl.texturereplay.defaultshader.Locations} Locations.
+ * @return {module:ol/render/webgl/circlereplay/defaultshader/Locations|
+ ol/render/webgl/linestringreplay/defaultshader/Locations|
+ ol/render/webgl/polygonreplay/defaultshader/Locations|
+ ol/render/webgl/texturereplay/defaultshader/Locations} Locations.
*/
WebGLReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {};
@@ -157,10 +157,10 @@ WebGLReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {};
* @abstract
* @protected
* @param {WebGLRenderingContext} gl gl.
- * @param {ol.render.webgl.circlereplay.defaultshader.Locations|
- ol.render.webgl.linestringreplay.defaultshader.Locations|
- ol.render.webgl.polygonreplay.defaultshader.Locations|
- ol.render.webgl.texturereplay.defaultshader.Locations} locations Locations.
+ * @param {module:ol/render/webgl/circlereplay/defaultshader/Locations|
+ ol/render/webgl/linestringreplay/defaultshader/Locations|
+ ol/render/webgl/polygonreplay/defaultshader/Locations|
+ ol/render/webgl/texturereplay/defaultshader/Locations} locations Locations.
*/
WebGLReplay.prototype.shutDownProgram = function(gl, locations) {};
diff --git a/src/ol/render/webgl/TextReplay.js b/src/ol/render/webgl/TextReplay.js
index 79f2148de6..ce9bff1378 100644
--- a/src/ol/render/webgl/TextReplay.js
+++ b/src/ol/render/webgl/TextReplay.js
@@ -24,7 +24,7 @@ import WebGLBuffer from '../../webgl/Buffer.js';
/**
* @constructor
- * @extends {ol.render.webgl.TextureReplay}
+ * @extends {module:ol/render/webgl/TextureReplay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
diff --git a/src/ol/render/webgl/TextureReplay.js b/src/ol/render/webgl/TextureReplay.js
index b77fee63f4..3f2b0009eb 100644
--- a/src/ol/render/webgl/TextureReplay.js
+++ b/src/ol/render/webgl/TextureReplay.js
@@ -65,7 +65,7 @@ const WebGLTextureReplay = function(tolerance, maxExtent) {
/**
* @protected
- * @type {ol.render.webgl.texturereplay.defaultshader.Locations}
+ * @type {module:ol/render/webgl/texturereplay/defaultshader/Locations}
*/
this.defaultLocations = null;
diff --git a/src/ol/renderer/webgl/Map.js b/src/ol/renderer/webgl/Map.js
index 365b86294c..f6abd1fc17 100644
--- a/src/ol/renderer/webgl/Map.js
+++ b/src/ol/renderer/webgl/Map.js
@@ -183,7 +183,7 @@ inherits(WebGLMapRenderer, MapRenderer);
/**
- * @param {ol.Tile} tile Tile.
+ * @param {module:ol/Tile} tile Tile.
* @param {module:ol/size~Size} tileSize Tile size.
* @param {number} tileGutter Tile gutter.
* @param {number} magFilter Mag filter.
diff --git a/src/ol/source/Image.js b/src/ol/source/Image.js
index 5e1a29bbc8..0fc58c7df1 100644
--- a/src/ol/source/Image.js
+++ b/src/ol/source/Image.js
@@ -19,21 +19,21 @@ const ImageSourceEventType = {
/**
* Triggered when an image starts loading.
- * @event ol.source.Image.Event#imageloadstart
+ * @event ol/source/Image~ImageSourceEvent#imageloadstart
* @api
*/
IMAGELOADSTART: 'imageloadstart',
/**
* Triggered when an image finishes loading.
- * @event ol.source.Image.Event#imageloadend
+ * @event ol/source/Image~ImageSourceEvent#imageloadend
* @api
*/
IMAGELOADEND: 'imageloadend',
/**
* Triggered if image loading results in an error.
- * @event ol.source.Image.Event#imageloaderror
+ * @event ol/source/Image~ImageSourceEvent#imageloaderror
* @api
*/
IMAGELOADERROR: 'imageloaderror'
@@ -107,7 +107,7 @@ const ImageSource = function(options) {
/**
* @private
- * @type {ol.reproj.Image}
+ * @type {module:ol/reproj/Image}
*/
this.reprojectedImage_ = null;
diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js
index c29b59a714..1eb15060e4 100644
--- a/src/ol/source/ImageArcGISRest.js
+++ b/src/ol/source/ImageArcGISRest.js
@@ -19,7 +19,7 @@ import {appendParams} from '../uri.js';
* you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
* access pixel data with the Canvas renderer. See
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.
- * @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting the image from
+ * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from
* the remote server.
* @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given
* a URL.
@@ -49,7 +49,7 @@ import {appendParams} from '../uri.js';
* {@link module:ol/source/TileArcGISRest} data source.
*
* @constructor
- * @fires ol.source.Image.Event
+ * @fires ol/source/Image~ImageSourceEvent
* @extends {module:ol/source/Image}
* @param {module:ol/source/ImageArcGISRest~Options=} opt_options Image ArcGIS Rest Options.
* @api
diff --git a/src/ol/source/ImageMapGuide.js b/src/ol/source/ImageMapGuide.js
index 98ff23ec2a..804703dcee 100644
--- a/src/ol/source/ImageMapGuide.js
+++ b/src/ol/source/ImageMapGuide.js
@@ -33,7 +33,7 @@ import {appendParams} from '../uri.js';
* Source for images from Mapguide servers
*
* @constructor
- * @fires ol.source.Image.Event
+ * @fires ol/source/Image~ImageSourceEvent
* @extends {module:ol/source/Image}
* @param {module:ol/source/ImageMapGuide~Options=} options ImageMapGuide options.
* @api
diff --git a/src/ol/source/ImageWMS.js b/src/ol/source/ImageWMS.js
index 820a41e798..78631efba7 100644
--- a/src/ol/source/ImageWMS.js
+++ b/src/ol/source/ImageWMS.js
@@ -48,7 +48,7 @@ import {appendParams} from '../uri.js';
* Source for WMS servers providing single, untiled images.
*
* @constructor
- * @fires ol.source.Image.Event
+ * @fires ol/source/Image~ImageSourceEvent
* @extends {module:ol/source/Image}
* @param {module:ol/source/ImageWMS~Options=} [opt_options] ImageWMS options.
* @api
diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js
index 580d873150..067cd0ed7c 100644
--- a/src/ol/source/Raster.js
+++ b/src/ol/source/Raster.js
@@ -46,14 +46,14 @@ import {create as createTransform} from '../transform.js';
const RasterEventType = {
/**
* Triggered before operations are run.
- * @event ol.source.Raster.Event#beforeoperations
+ * @event ol/source/Raster~RasterSourceEvent#beforeoperations
* @api
*/
BEFOREOPERATIONS: 'beforeoperations',
/**
* Triggered after operations are run.
- * @event ol.source.Raster.Event#afteroperations
+ * @event ol/source/Raster~RasterSourceEvent#afteroperations
* @api
*/
AFTEROPERATIONS: 'afteroperations'
@@ -138,7 +138,7 @@ inherits(RasterSourceEvent, Event);
*
* @constructor
* @extends {module:ol/source/Image}
- * @fires ol.source.Raster.Event
+ * @fires ol/source/Raster~RasterSourceEvent
* @param {module:ol/source/Raster~Options=} options Options.
* @api
*/
diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js
index b98e07e00a..bf626fe0a2 100644
--- a/src/ol/source/Vector.js
+++ b/src/ol/source/Vector.js
@@ -151,7 +151,7 @@ inherits(VectorSourceEvent, Event);
*
* @constructor
* @extends {module:ol/source/Source}
- * @fires ol.source.Vector.Event
+ * @fires ol/source/Vector~VectorSourceEvent
* @param {module:ol/source/Vector~Options=} opt_options Vector source options.
* @api
*/
diff --git a/src/ol/source/VectorEventType.js b/src/ol/source/VectorEventType.js
index a622ce884c..f9cd8d21b1 100644
--- a/src/ol/source/VectorEventType.js
+++ b/src/ol/source/VectorEventType.js
@@ -8,21 +8,21 @@
export default {
/**
* Triggered when a feature is added to the source.
- * @event ol.source.Vector.Event#addfeature
+ * @event ol/source/Vector~VectorSourceEvent#addfeature
* @api
*/
ADDFEATURE: 'addfeature',
/**
* Triggered when a feature is updated.
- * @event ol.source.Vector.Event#changefeature
+ * @event ol/source/Vector~VectorSourceEvent#changefeature
* @api
*/
CHANGEFEATURE: 'changefeature',
/**
* Triggered when the clear method is called on the source.
- * @event ol.source.Vector.Event#clear
+ * @event ol/source/Vector~VectorSourceEvent#clear
* @api
*/
CLEAR: 'clear',
@@ -30,7 +30,7 @@ export default {
/**
* Triggered when a feature is removed from the source.
* See {@link ol.source.Vector#clear source.clear()} for exceptions.
- * @event ol.source.Vector.Event#removefeature
+ * @event ol/source/Vector~VectorSourceEvent#removefeature
* @api
*/
REMOVEFEATURE: 'removefeature'
diff --git a/src/ol/tilegrid.js b/src/ol/tilegrid.js
index c2f1b3aa0c..48f60ec2b4 100644
--- a/src/ol/tilegrid.js
+++ b/src/ol/tilegrid.js
@@ -75,7 +75,7 @@ export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {
* @property {module:ol/extent~Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the
* top-left corner of the extent. The zero level of the grid is defined by the resolution at which one tile fits in the
* provided extent. If not provided, the extent of the EPSG:3857 projection is used.
- * @property {number} [maxZoom] Maximum zoom. The default is `ol.DEFAULT_MAX_ZOOM`. This determines the number of levels
+ * @property {number} [maxZoom] Maximum zoom. The default is `ol~DEFAULT_MAX_ZOOM`. This determines the number of levels
* in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.
* @property {number} [minZoom=0] Minimum zoom.
* @property {number|module:ol/size~Size} [tileSize=[256, 256]] Tile size in pixels.
From 5b65336328ef331cebbbfd9c651043694cf745fc Mon Sep 17 00:00:00 2001
From: Tim Schaub
Date: Mon, 7 May 2018 21:00:03 -0600
Subject: [PATCH 5/7] Remove remaining ol.foo notation from the source
---
src/ol/View.js | 2 +-
src/ol/source/ImageArcGISRest.js | 2 +-
src/ol/source/ImageMapGuide.js | 6 +++---
src/ol/source/ImageStatic.js | 2 +-
src/ol/source/ImageWMS.js | 4 ++--
src/ol/source/Raster.js | 6 +++---
src/ol/source/TileArcGISRest.js | 4 ++--
src/ol/source/TileDebug.js | 2 +-
src/ol/source/TileImage.js | 2 +-
src/ol/source/TileUTFGrid.js | 4 ++--
src/ol/source/TileWMS.js | 2 +-
src/ol/source/Vector.js | 20 ++++++++++++--------
src/ol/source/VectorEventType.js | 2 +-
src/ol/source/VectorTile.js | 4 ++--
src/ol/source/XYZ.js | 2 +-
15 files changed, 34 insertions(+), 30 deletions(-)
diff --git a/src/ol/View.js b/src/ol/View.js
index 2af5ac324a..8ae88fbd55 100644
--- a/src/ol/View.js
+++ b/src/ol/View.js
@@ -148,7 +148,7 @@ import Units from './proj/Units.js';
* during a rotation or resolution animation.
* @property {number} [duration=1000] The duration of the animation in milliseconds.
* @property {function(number):number} [easing] The easing function used
- * during the animation (defaults to {@link ol.easing.inAndOut}).
+ * during the animation (defaults to {@link module:ol/easing~inAndOut}).
* The function will be called for each frame with a number representing a
* fraction of the animation's duration. The function should return a number
* between 0 and 1 representing the progress toward the destination state.
diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js
index 1eb15060e4..20f52f46ea 100644
--- a/src/ol/source/ImageArcGISRest.js
+++ b/src/ol/source/ImageArcGISRest.js
@@ -21,7 +21,7 @@ import {appendParams} from '../uri.js';
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.
* @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from
* the remote server.
- * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given
+ * @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given
* a URL.
* @property {Object.} params ArcGIS Rest parameters. This field is optional. Service
* defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is
diff --git a/src/ol/source/ImageMapGuide.js b/src/ol/source/ImageMapGuide.js
index 804703dcee..15dc931200 100644
--- a/src/ol/source/ImageMapGuide.js
+++ b/src/ol/source/ImageMapGuide.js
@@ -15,7 +15,7 @@ import {appendParams} from '../uri.js';
* @property {string} [url] The mapagent url.
* @property {number} [displayDpi=96] The display resolution.
* @property {number} [metersPerUnit=1] The meters-per-unit value.
- * @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting
+ * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting
* the image from the remote server.
* @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`.
* @property {module:ol/proj~ProjectionLike} projection Projection.
@@ -23,7 +23,7 @@ import {appendParams} from '../uri.js';
* twice the width and height of the map viewport, and so on. Must be `1` or higher.
* @property {Array.} [resolutions] Resolutions.
* If specified, requests will be made for these resolutions only.
- * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL.
+ * @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.
* @property {Object} [params] Additional parameters.
*/
@@ -232,7 +232,7 @@ ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, project
'OPERATION': this.useOverlay_ ? 'GETDYNAMICMAPOVERLAYIMAGE' : 'GETMAPIMAGE',
'VERSION': '2.0.0',
'LOCALE': 'en',
- 'CLIENTAGENT': 'ol.source.ImageMapGuide source',
+ 'CLIENTAGENT': 'ol/source/ImageMapGuide source',
'CLIP': '1',
'SETDISPLAYDPI': this.displayDpi_,
'SETDISPLAYWIDTH': Math.round(size[0]),
diff --git a/src/ol/source/ImageStatic.js b/src/ol/source/ImageStatic.js
index cc8cdd553a..9286efef26 100644
--- a/src/ol/source/ImageStatic.js
+++ b/src/ol/source/ImageStatic.js
@@ -20,7 +20,7 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.js';
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.
* @property {module:ol/extent~Extent} [imageExtent] Extent of the image in map coordinates.
* This is the [left, bottom, right, top] map coordinates of your image.
- * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL.
+ * @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.
* @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {module:ol/size~Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this
* only needs to be set if auto-detection fails for some reason.
diff --git a/src/ol/source/ImageWMS.js b/src/ol/source/ImageWMS.js
index 78631efba7..05bda634a7 100644
--- a/src/ol/source/ImageWMS.js
+++ b/src/ol/source/ImageWMS.js
@@ -24,11 +24,11 @@ import {appendParams} from '../uri.js';
* you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to
* access pixel data with the Canvas renderer. See
* {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.
- * @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting
+ * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting
* the image from the remote server.
* @property {module:ol/source/WMSServerType|string} [serverType] The type of
* the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.
- * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given a URL.
+ * @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.
* @property {Object.} params WMS request parameters.
* At least a `LAYERS` param is required. `STYLES` is
* `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`
diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js
index 067cd0ed7c..18252094bf 100644
--- a/src/ol/source/Raster.js
+++ b/src/ol/source/Raster.js
@@ -72,7 +72,7 @@ const RasterOperationType = {
/**
* @classdesc
- * Events emitted by {@link ol.source.Raster} instances are instances of this
+ * Events emitted by {@link module:ol/source/Raster} instances are instances of this
* type.
*
* @constructor
@@ -152,7 +152,7 @@ const RasterSource = function(options) {
/**
* @private
- * @type {ol.source.RasterOperationType}
+ * @type {module:ol/source/RasterOperationType}
*/
this.operationType_ = options.operationType !== undefined ?
options.operationType : RasterOperationType.PIXEL;
@@ -328,7 +328,7 @@ RasterSource.prototype.getImage = function(extent, resolution, pixelRatio, proje
const frameState = this.updateFrameState_(extent, resolution, projection);
this.requestedFrameState_ = frameState;
- // check if we can't reuse the existing ol.ImageCanvas
+ // check if we can't reuse the existing ol/ImageCanvas
if (this.renderedImageCanvas_) {
const renderedResolution = this.renderedImageCanvas_.getResolution();
const renderedExtent = this.renderedImageCanvas_.getExtent();
diff --git a/src/ol/source/TileArcGISRest.js b/src/ol/source/TileArcGISRest.js
index 1f109faeb7..8e1c78a042 100644
--- a/src/ol/source/TileArcGISRest.js
+++ b/src/ol/source/TileArcGISRest.js
@@ -26,12 +26,12 @@ import {appendParams} from '../uri.js';
* override the default service layer visibility. See
* {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/}
* for further reference.
- * @property {ol.tilegrid.TileGrid} [tileGrid] Tile grid. Base this on the resolutions,
+ * @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid. Base this on the resolutions,
* tilesize and extent supported by the server.
* If this is not defined, a default grid will be used: if there is a projection
* extent, the grid will be based on that; if not, a grid based on a global
* extent with origin at 0,0 will be used.
- * @property {ol.ProjectionLike} projection Projection.
+ * @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
* Higher values can increase reprojection performance, but decrease precision.
* @property {module:ol/Tile~LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.
diff --git a/src/ol/source/TileDebug.js b/src/ol/source/TileDebug.js
index 701d9ce9cf..0fc40f2c9d 100644
--- a/src/ol/source/TileDebug.js
+++ b/src/ol/source/TileDebug.js
@@ -116,7 +116,7 @@ inherits(TileDebug, TileSource);
TileDebug.prototype.getTile = function(z, x, y) {
const tileCoordKey = getKeyZXY(z, x, y);
if (this.tileCache.containsKey(tileCoordKey)) {
- return /** @type {!ol.source.LabeledTile} */ (this.tileCache.get(tileCoordKey));
+ return /** @type {!module:ol/source/LabeledTile} */ (this.tileCache.get(tileCoordKey));
} else {
const tileSize = toSize(this.tileGrid.getTileSize(z));
const tileCoord = [z, x, y];
diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js
index 7f86a95792..fe817ab87d 100644
--- a/src/ol/source/TileImage.js
+++ b/src/ol/source/TileImage.js
@@ -40,7 +40,7 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
* service advertizes 256px by 256px tiles but actually sends 512px
* by 512px images (for retina/hidpi devices) then `tilePixelRatio`
* should be set to `2`.
- * @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
+ * @property {module:ol/Tile~UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
* A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be
* used instead of defining each one separately in the `urls` option.
diff --git a/src/ol/source/TileUTFGrid.js b/src/ol/source/TileUTFGrid.js
index 3e750435ae..566204c2c4 100644
--- a/src/ol/source/TileUTFGrid.js
+++ b/src/ol/source/TileUTFGrid.js
@@ -384,7 +384,7 @@ UTFGrid.prototype.forDataAtCoordinateAndResolution = function(
if (this.tileGrid) {
const tileCoord = this.tileGrid.getTileCoordForCoordAndResolution(
coordinate, resolution);
- const tile = /** @type {!ol.source.CustomTile} */(this.getTile(
+ const tile = /** @type {!module:ol/source/CustomTile} */(this.getTile(
tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));
tile.forDataAtCoordinate(coordinate, callback, null, opt_request);
} else {
@@ -408,7 +408,7 @@ UTFGrid.prototype.handleTileJSONError = function() {
/**
- * TODO: very similar to ol.source.TileJSON#handleTileJSONResponse
+ * TODO: very similar to ol/source/TileJSON#handleTileJSONResponse
* @protected
* @param {TileJSON} tileJSON Tile JSON.
*/
diff --git a/src/ol/source/TileWMS.js b/src/ol/source/TileWMS.js
index b6f2495480..2637773df4 100644
--- a/src/ol/source/TileWMS.js
+++ b/src/ol/source/TileWMS.js
@@ -38,7 +38,7 @@ import {appendParams} from '../uri.js';
* "artifacts at tile edges" issues by properly configuring the WMS service. For
* example, MapServer has a `tile_map_edge_buffer` configuration parameter for
* this. See http://mapserver.org/output/tile_mode.html.
- * @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting
+ * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting
* the image from the remote server.
* @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {boolean} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js
index bf626fe0a2..3e6718783f 100644
--- a/src/ol/source/Vector.js
+++ b/src/ol/source/Vector.js
@@ -24,7 +24,7 @@ import RBush from '../structs/RBush.js';
/**
* A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and
* returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this
- * is one of the standard {@link ol.loadingstrategy} strategies.
+ * is one of the standard {@link module:ol/loadingstrategy} strategies.
*
* @typedef {function(module:ol/extent~Extent, number): Array.} LoadingStrategy
* @api
@@ -73,8 +73,12 @@ inherits(VectorSourceEvent, Event);
* Example:
*
* ```js
- * var vectorSource = new VectorSource({
- * format: new ol.format.GeoJSON(),
+ * import {Vector} from 'ol/source';
+ * import {GeoJSON} from 'ol/format';
+ * import {bbox} from 'ol/loadingstrategy';
+ *
+ * var vectorSource = new Vector({
+ * format: new GeoJSON(),
* loader: function(extent, resolution, projection) {
* var proj = projection.getCode();
* var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
@@ -97,7 +101,7 @@ inherits(VectorSourceEvent, Event);
* }
* xhr.send();
* },
- * strategy: ol.loadingstrategy.bbox
+ * strategy: bbox
* });
* ```
* @property {boolean} [overlaps=true] This source may have overlapping geometries.
@@ -105,12 +109,12 @@ inherits(VectorSourceEvent, Event);
* boundaries or TopoJSON sources) allows the renderer to optimise fill and
* stroke operations.
* @property {module:ol/source/Vector~LoadingStrategy} [strategy] The loading strategy to use.
- * By default an {@link ol.loadingstrategy.all}
+ * By default an {@link module:ol/loadingstrategy~all}
* strategy is used, a one-off strategy which loads all features at once.
* @property {string|module:ol/featureloader~FeatureUrlfunction} [url]
* Setting this option instructs the source to load features using an XHR loader
- * (see {@link ol.featureloader.xhr}). Use a `string` and an
- * {@link ol.loadingstrategy.all} for a one-off download of all features from
+ * (see {@link module:ol/featureloader~xhr}). Use a `string` and an
+ * {@link module:ol/loadingstrategy~all} for a one-off download of all features from
* the given URL. Use a {@link module:ol/featureloader~FeatureUrlfunction} to generate the url with
* other loading strategies.
* Requires `format` to be set as well.
@@ -233,7 +237,7 @@ const VectorSource = function(opt_options) {
this.idIndex_ = {};
/**
- * A lookup of features without id (keyed by ol.getUid(feature)).
+ * A lookup of features without id (keyed by getUid(feature)).
* @private
* @type {!Object.}
*/
diff --git a/src/ol/source/VectorEventType.js b/src/ol/source/VectorEventType.js
index f9cd8d21b1..85cc1256b8 100644
--- a/src/ol/source/VectorEventType.js
+++ b/src/ol/source/VectorEventType.js
@@ -29,7 +29,7 @@ export default {
/**
* Triggered when a feature is removed from the source.
- * See {@link ol.source.Vector#clear source.clear()} for exceptions.
+ * See {@link module:ol/source/Vector#clear source.clear()} for exceptions.
* @event ol/source/Vector~VectorSourceEvent#removefeature
* @api
*/
diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js
index b953d8b40f..b6fd6e6b23 100644
--- a/src/ol/source/VectorTile.js
+++ b/src/ol/source/VectorTile.js
@@ -22,7 +22,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
* @property {module:ol/proj~ProjectionLike} projection Projection.
* @property {module:ol/source/State~State} [state] Source state.
* @property {module:ol/VectorTile~TileClass} [tileClass] Class used to instantiate image tiles.
- * Default is {@link ol.VectorTile}.
+ * Default is {@link module:ol/VectorTile}.
* @property {module:ol/tilegrid/TileGrid} [tileGrid] Tile grid.
* @property {module:ol/Tile~LoadFunction} [tileLoadFunction]
* Optional function to load a tile given a URL. Could look like this:
@@ -38,7 +38,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
* }));
* };
* });
- * @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
+ * @property {module:ol/Tile~UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.
* A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be
* used instead of defining each one separately in the `urls` option.
diff --git a/src/ol/source/XYZ.js b/src/ol/source/XYZ.js
index 730f03f130..6638ea53ff 100644
--- a/src/ol/source/XYZ.js
+++ b/src/ol/source/XYZ.js
@@ -31,7 +31,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
* by 512px images (for retina/hidpi devices) then `tilePixelRatio`
* should be set to `2`.
* @property {number|module:ol/size~Size} [tileSize=[256, 256]] The tile size used by the tile service.
- * @property {ol.TileUrlFunctionType} [tileUrlFunction] Optional function to get
+ * @property {module:ol/Tile~UrlFunction} [tileUrlFunction] Optional function to get
* tile URL given a tile coordinate and the projection.
* Required if url or urls are not provided.
* @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,
From 5a9fad218b928903cb87382a503afc76fd2fc9d3 Mon Sep 17 00:00:00 2001
From: Tim Schaub
Date: Mon, 7 May 2018 21:13:14 -0600
Subject: [PATCH 6/7] Remove *.jsdoc files
---
src/ol.jsdoc | 4 --
src/ol/control/index.jsdoc | 3 --
src/ol/format/filter/index.jsdoc | 29 -----------
src/ol/format/index.jsdoc | 3 --
src/ol/geom/geom.jsdoc | 3 --
src/ol/layer/layer.jsdoc | 3 --
src/ol/proj.js | 52 ++++++++++++++++++++
src/ol/proj/index.jsdoc | 53 --------------------
src/ol/render/canvas/index.jsdoc | 3 --
src/ol/render/webgl/index.jsdoc | 3 --
src/ol/renderer/index.jsdoc | 3 --
src/ol/style/Style.js | 84 ++++++++++++++++++++++++++++++++
src/ol/style/index.jsdoc | 81 ------------------------------
src/ol/tilegrid.js | 2 +-
src/ol/tilegrid/common.js | 4 ++
src/ol/tilegrid/index.jsdoc | 3 --
16 files changed, 141 insertions(+), 192 deletions(-)
delete mode 100644 src/ol.jsdoc
delete mode 100644 src/ol/control/index.jsdoc
delete mode 100644 src/ol/format/filter/index.jsdoc
delete mode 100644 src/ol/format/index.jsdoc
delete mode 100644 src/ol/geom/geom.jsdoc
delete mode 100644 src/ol/layer/layer.jsdoc
delete mode 100644 src/ol/proj/index.jsdoc
delete mode 100644 src/ol/render/canvas/index.jsdoc
delete mode 100644 src/ol/render/webgl/index.jsdoc
delete mode 100644 src/ol/renderer/index.jsdoc
delete mode 100644 src/ol/style/index.jsdoc
delete mode 100644 src/ol/tilegrid/index.jsdoc
diff --git a/src/ol.jsdoc b/src/ol.jsdoc
deleted file mode 100644
index 2c1bf53836..0000000000
--- a/src/ol.jsdoc
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * @namespace ol
- */
-
diff --git a/src/ol/control/index.jsdoc b/src/ol/control/index.jsdoc
deleted file mode 100644
index bd09e4c9b2..0000000000
--- a/src/ol/control/index.jsdoc
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * @namespace ol.control
- */
diff --git a/src/ol/format/filter/index.jsdoc b/src/ol/format/filter/index.jsdoc
deleted file mode 100644
index dcd136cd62..0000000000
--- a/src/ol/format/filter/index.jsdoc
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * This namespace contains convenience functions to create filters for
- * {@link ol.format.WFS#writeGetFeature}.
- *
- * For example to generate a `GetFeature` request with a `PropertyIsEqualTo` filter:
- *
- * var request = new ol.format.WFS().writeGetFeature({
- * srsName: 'urn:ogc:def:crs:EPSG::4326',
- * featureNS: 'http://www.openplans.org/topp',
- * featurePrefix: 'topp',
- * featureTypes: ['states'],
- * filter: ol.format.filter.equalTo('name', 'New York')
- * });
- *
- * Or to combine a `BBOX` filter with a `PropertyIsLike` filter:
- *
- * var f = ol.format.filter;
- * var request = new ol.format.WFS().writeGetFeature({
- * srsName: 'urn:ogc:def:crs:EPSG::4326',
- * featureNS: 'http://www.openplans.org/topp',
- * featurePrefix: 'topp',
- * featureTypes: ['states'],
- * filter: f.and(
- * f.bbox('the_geom', [1, 2, 3, 4], 'urn:ogc:def:crs:EPSG::4326'),
- * f.like('name', 'New*')
- * )
- * });
- * @namespace ol.format.filter
- */
diff --git a/src/ol/format/index.jsdoc b/src/ol/format/index.jsdoc
deleted file mode 100644
index d70dd02b50..0000000000
--- a/src/ol/format/index.jsdoc
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * @namespace ol.format
- */
diff --git a/src/ol/geom/geom.jsdoc b/src/ol/geom/geom.jsdoc
deleted file mode 100644
index 1a947e51f3..0000000000
--- a/src/ol/geom/geom.jsdoc
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * @namespace ol.geom
- */
diff --git a/src/ol/layer/layer.jsdoc b/src/ol/layer/layer.jsdoc
deleted file mode 100644
index 29e9851de5..0000000000
--- a/src/ol/layer/layer.jsdoc
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * @namespace ol.layer
- */
diff --git a/src/ol/proj.js b/src/ol/proj.js
index c910b8e93b..e2633575b0 100644
--- a/src/ol/proj.js
+++ b/src/ol/proj.js
@@ -1,6 +1,58 @@
/**
* @module ol/proj
*/
+
+/**
+ * The ol/proj module stores:
+ * * a list of {@link module:ol/proj/Projection}
+ * objects, one for each projection supported by the application
+ * * a list of transform functions needed to convert coordinates in one projection
+ * into another.
+ *
+ * The static functions are the methods used to maintain these.
+ * Each transform function can handle not only simple coordinate pairs, but also
+ * large arrays of coordinates such as vector geometries.
+ *
+ * When loaded, the library adds projection objects for EPSG:4326 (WGS84
+ * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used
+ * for example by Bing Maps or OpenStreetMap), together with the relevant
+ * transform functions.
+ *
+ * Additional transforms may be added by using the {@link http://proj4js.org/}
+ * library (version 2.2 or later). You can use the full build supplied by
+ * Proj4js, or create a custom build to support those projections you need; see
+ * the Proj4js website for how to do this. You also need the Proj4js definitions
+ * for the required projections. These definitions can be obtained from
+ * {@link https://epsg.io/}, and are a JS function, so can be loaded in a script
+ * tag (as in the examples) or pasted into your application.
+ *
+ * After all required projection definitions are added to proj4's registry (by
+ * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`
+ * package. Existing transforms are not changed by this function. See
+ * examples/wms-image-custom-proj for an example of this.
+ *
+ * Additional projection definitions can be registered with `proj4.defs()` any
+ * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't
+ * know in advance what projections are needed, you can initially load minimal
+ * support and then load whichever are requested.
+ *
+ * Note that Proj4js does not support projection extents. If you want to add
+ * one for creating default tile grids, you can add it after the Projection
+ * object has been created with `setExtent`, for example,
+ * `get('EPSG:1234').setExtent(extent)`.
+ *
+ * In addition to Proj4js support, any transform functions can be added with
+ * {@link module:ol/proj~addCoordinateTransforms}. To use this, you must first create
+ * a {@link module:ol/proj/Projection} object for the new projection and add it with
+ * {@link module:ol/proj~addProjection}. You can then add the forward and inverse
+ * functions with {@link module:ol/proj~addCoordinateTransforms}. See
+ * examples/wms-custom-proj for an example of this.
+ *
+ * Note that if no transforms are needed and you only need to define the
+ * projection, just add a {@link module:ol/proj/Projection} with
+ * {@link module:ol/proj~addProjection}. See examples/wms-no-proj for an example of
+ * this.
+ */
import {getDistance} from './sphere.js';
import {applyTransform} from './extent.js';
import {modulo} from './math.js';
diff --git a/src/ol/proj/index.jsdoc b/src/ol/proj/index.jsdoc
deleted file mode 100644
index cd1a26ca72..0000000000
--- a/src/ol/proj/index.jsdoc
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * The ol.proj namespace stores:
- * * a list of {@link ol.proj.Projection}
- * objects, one for each projection supported by the application
- * * a list of transform functions needed to convert coordinates in one projection
- * into another.
- *
- * The static functions are the methods used to maintain these.
- * Each transform function can handle not only simple coordinate pairs, but also
- * large arrays of coordinates such as vector geometries.
- *
- * When loaded, the library adds projection objects for EPSG:4326 (WGS84
- * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used
- * for example by Bing Maps or OpenStreetMap), together with the relevant
- * transform functions.
- *
- * Additional transforms may be added by using the {@link http://proj4js.org/}
- * library (version 2.2 or later). You can use the full build supplied by
- * Proj4js, or create a custom build to support those projections you need; see
- * the Proj4js website for how to do this. You also need the Proj4js definitions
- * for the required projections. These definitions can be obtained from
- * {@link https://epsg.io/}, and are a JS function, so can be loaded in a script
- * tag (as in the examples) or pasted into your application.
- *
- * After all required projection definitions are added to proj4's registry (by
- * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`
- * package. Existing transforms are not changed by this function. See
- * examples/wms-image-custom-proj for an example of this.
- *
- * Additional projection definitions can be registered with `proj4.defs()` any
- * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't
- * know in advance what projections are needed, you can initially load minimal
- * support and then load whichever are requested.
- *
- * Note that Proj4js does not support projection extents. If you want to add
- * one for creating default tile grids, you can add it after the Projection
- * object has been created with `setExtent`, for example,
- * `ol.proj.get('EPSG:1234').setExtent(extent)`.
- *
- * In addition to Proj4js support, any transform functions can be added with
- * {@link ol.proj.addCoordinateTransforms}. To use this, you must first create
- * a {@link ol.proj.Projection} object for the new projection and add it with
- * {@link ol.proj.addProjection}. You can then add the forward and inverse
- * functions with {@link ol.proj.addCoordinateTransforms}. See
- * examples/wms-custom-proj for an example of this.
- *
- * Note that if no transforms are needed and you only need to define the
- * projection, just add a {@link ol.proj.Projection} with
- * {@link ol.proj.addProjection}. See examples/wms-no-proj for an example of
- * this.
- *
- * @namespace ol.proj
- */
diff --git a/src/ol/render/canvas/index.jsdoc b/src/ol/render/canvas/index.jsdoc
deleted file mode 100644
index cea6b9f9f7..0000000000
--- a/src/ol/render/canvas/index.jsdoc
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * @namespace ol.render.canvas
- */
diff --git a/src/ol/render/webgl/index.jsdoc b/src/ol/render/webgl/index.jsdoc
deleted file mode 100644
index 2ac3cda5ae..0000000000
--- a/src/ol/render/webgl/index.jsdoc
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * @namespace ol.render.webgl
- */
diff --git a/src/ol/renderer/index.jsdoc b/src/ol/renderer/index.jsdoc
deleted file mode 100644
index d46e59c1d8..0000000000
--- a/src/ol/renderer/index.jsdoc
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * @namespace ol.renderer
- */
diff --git a/src/ol/style/Style.js b/src/ol/style/Style.js
index fe1e3557f0..05d7150d11 100644
--- a/src/ol/style/Style.js
+++ b/src/ol/style/Style.js
@@ -1,6 +1,90 @@
/**
* @module ol/style/Style
*/
+
+/**
+ * Feature styles.
+ *
+ * If no style is defined, the following default style is used:
+ * ```js
+ * import {Fill, Stroke, Cirle, Style} from 'ol/style';
+ *
+ * var fill = new Fill({
+ * color: 'rgba(255,255,255,0.4)'
+ * });
+ * var stroke = new Stroke({
+ * color: '#3399CC',
+ * width: 1.25
+ * });
+ * var styles = [
+ * new Style({
+ * image: new Circle({
+ * fill: fill,
+ * stroke: stroke,
+ * radius: 5
+ * }),
+ * fill: fill,
+ * stroke: stroke
+ * })
+ * ];
+ * ```
+ *
+ * A separate editing style has the following defaults:
+ * ```js
+ * import {Fill, Stroke, Cirle, Style} from 'ol/style';
+ * import GeometryType from 'ol/geom/GeometryType';
+ *
+ * var white = [255, 255, 255, 1];
+ * var blue = [0, 153, 255, 1];
+ * var width = 3;
+ * styles[GeometryType.POLYGON] = [
+ * new Style({
+ * fill: new Fill({
+ * color: [255, 255, 255, 0.5]
+ * })
+ * })
+ * ];
+ * styles[GeometryType.MULTI_POLYGON] =
+ * styles[GeometryType.POLYGON];
+ * styles[GeometryType.LINE_STRING] = [
+ * new Style({
+ * stroke: new Stroke({
+ * color: white,
+ * width: width + 2
+ * })
+ * }),
+ * new Style({
+ * stroke: new Stroke({
+ * color: blue,
+ * width: width
+ * })
+ * })
+ * ];
+ * styles[GeometryType.MULTI_LINE_STRING] =
+ * styles[GeometryType.LINE_STRING];
+ * styles[GeometryType.POINT] = [
+ * new Style({
+ * image: new Circle({
+ * radius: width * 2,
+ * fill: new Fill({
+ * color: blue
+ * }),
+ * stroke: new Stroke({
+ * color: white,
+ * width: width / 2
+ * })
+ * }),
+ * zIndex: Infinity
+ * })
+ * ];
+ * styles[GeometryType.MULTI_POINT] =
+ * styles[GeometryType.POINT];
+ * styles[GEOMETRY_COLLECTION] =
+ * styles[GeometryType.POLYGON].concat(
+ * styles[GeometryType.POINT]
+ * );
+ * ```
+ */
import {assert} from '../asserts.js';
import GeometryType from '../geom/GeometryType.js';
import CircleStyle from '../style/Circle.js';
diff --git a/src/ol/style/index.jsdoc b/src/ol/style/index.jsdoc
deleted file mode 100644
index 39f6db8644..0000000000
--- a/src/ol/style/index.jsdoc
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Feature styles.
- *
- * If no style is defined, the following default style is used:
- * ```js
- * var fill = new ol.style.Fill({
- * color: 'rgba(255,255,255,0.4)'
- * });
- * var stroke = new ol.style.Stroke({
- * color: '#3399CC',
- * width: 1.25
- * });
- * var styles = [
- * new ol.style.Style({
- * image: new ol.style.Circle({
- * fill: fill,
- * stroke: stroke,
- * radius: 5
- * }),
- * fill: fill,
- * stroke: stroke
- * })
- * ];
- * ```
- *
- * A separate editing style has the following defaults:
- * ```js
- * import GeometryType from ol/geom/GeometryType
- * var white = [255, 255, 255, 1];
- * var blue = [0, 153, 255, 1];
- * var width = 3;
- * styles[GeometryType.POLYGON] = [
- * new ol.style.Style({
- * fill: new ol.style.Fill({
- * color: [255, 255, 255, 0.5]
- * })
- * })
- * ];
- * styles[GeometryType.MULTI_POLYGON] =
- * styles[GeometryType.POLYGON];
- * styles[GeometryType.LINE_STRING] = [
- * new ol.style.Style({
- * stroke: new ol.style.Stroke({
- * color: white,
- * width: width + 2
- * })
- * }),
- * new ol.style.Style({
- * stroke: new ol.style.Stroke({
- * color: blue,
- * width: width
- * })
- * })
- * ];
- * styles[GeometryType.MULTI_LINE_STRING] =
- * styles[GeometryType.LINE_STRING];
- * styles[GeometryType.POINT] = [
- * new ol.style.Style({
- * image: new ol.style.Circle({
- * radius: width * 2,
- * fill: new ol.style.Fill({
- * color: blue
- * }),
- * stroke: new ol.style.Stroke({
- * color: white,
- * width: width / 2
- * })
- * }),
- * zIndex: Infinity
- * })
- * ];
- * styles[GeometryType.MULTI_POINT] =
- * styles[GeometryType.POINT];
- * styles[GEOMETRY_COLLECTION] =
- * styles[GeometryType.POLYGON].concat(
- * styles[GeometryType.POINT]
- * );
- *```
- *
- * @namespace ol.style
- */
diff --git a/src/ol/tilegrid.js b/src/ol/tilegrid.js
index 48f60ec2b4..4e68d586e1 100644
--- a/src/ol/tilegrid.js
+++ b/src/ol/tilegrid.js
@@ -75,7 +75,7 @@ export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {
* @property {module:ol/extent~Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the
* top-left corner of the extent. The zero level of the grid is defined by the resolution at which one tile fits in the
* provided extent. If not provided, the extent of the EPSG:3857 projection is used.
- * @property {number} [maxZoom] Maximum zoom. The default is `ol~DEFAULT_MAX_ZOOM`. This determines the number of levels
+ * @property {number} [maxZoom] Maximum zoom. The default is `42`. This determines the number of levels
* in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.
* @property {number} [minZoom=0] Minimum zoom.
* @property {number|module:ol/size~Size} [tileSize=[256, 256]] Tile size in pixels.
diff --git a/src/ol/tilegrid/common.js b/src/ol/tilegrid/common.js
index 57a19b76ad..79205d3218 100644
--- a/src/ol/tilegrid/common.js
+++ b/src/ol/tilegrid/common.js
@@ -1,3 +1,7 @@
+/**
+ * @module ol/tilegrid/common
+ */
+
/**
* Default maximum zoom for default tile grids.
* @type {number}
diff --git a/src/ol/tilegrid/index.jsdoc b/src/ol/tilegrid/index.jsdoc
deleted file mode 100644
index 5f6ed64aaa..0000000000
--- a/src/ol/tilegrid/index.jsdoc
+++ /dev/null
@@ -1,3 +0,0 @@
-/**
- * @namespace ol.tilegrid
- */
From 5707cdf3b656c76cae6c519d9d9b35edbc2b549f Mon Sep 17 00:00:00 2001
From: Tim Schaub
Date: Mon, 7 May 2018 22:16:08 -0600
Subject: [PATCH 7/7] Type annotation corrections
---
src/ol/render/webgl/Replay.js | 12 ++++++------
src/ol/source/Raster.js | 2 +-
src/ol/source/TileDebug.js | 2 +-
src/ol/source/TileUTFGrid.js | 2 +-
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/ol/render/webgl/Replay.js b/src/ol/render/webgl/Replay.js
index 4a55652a31..2c6282fb28 100644
--- a/src/ol/render/webgl/Replay.js
+++ b/src/ol/render/webgl/Replay.js
@@ -146,9 +146,9 @@ WebGLReplay.prototype.finish = function(context) {};
* @param {module:ol/size~Size} size Size.
* @param {number} pixelRatio Pixel ratio.
* @return {module:ol/render/webgl/circlereplay/defaultshader/Locations|
- ol/render/webgl/linestringreplay/defaultshader/Locations|
- ol/render/webgl/polygonreplay/defaultshader/Locations|
- ol/render/webgl/texturereplay/defaultshader/Locations} Locations.
+ module:ol/render/webgl/linestringreplay/defaultshader/Locations|
+ module:ol/render/webgl/polygonreplay/defaultshader/Locations|
+ module:ol/render/webgl/texturereplay/defaultshader/Locations} Locations.
*/
WebGLReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {};
@@ -158,9 +158,9 @@ WebGLReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {};
* @protected
* @param {WebGLRenderingContext} gl gl.
* @param {module:ol/render/webgl/circlereplay/defaultshader/Locations|
- ol/render/webgl/linestringreplay/defaultshader/Locations|
- ol/render/webgl/polygonreplay/defaultshader/Locations|
- ol/render/webgl/texturereplay/defaultshader/Locations} locations Locations.
+ module:ol/render/webgl/linestringreplay/defaultshader/Locations|
+ module:ol/render/webgl/polygonreplay/defaultshader/Locations|
+ module:ol/render/webgl/texturereplay/defaultshader/Locations} locations Locations.
*/
WebGLReplay.prototype.shutDownProgram = function(gl, locations) {};
diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js
index 18252094bf..79ec0abc34 100644
--- a/src/ol/source/Raster.js
+++ b/src/ol/source/Raster.js
@@ -152,7 +152,7 @@ const RasterSource = function(options) {
/**
* @private
- * @type {module:ol/source/RasterOperationType}
+ * @type {module:ol/source/Raster~RasterOperationType}
*/
this.operationType_ = options.operationType !== undefined ?
options.operationType : RasterOperationType.PIXEL;
diff --git a/src/ol/source/TileDebug.js b/src/ol/source/TileDebug.js
index 0fc40f2c9d..589d8f9288 100644
--- a/src/ol/source/TileDebug.js
+++ b/src/ol/source/TileDebug.js
@@ -116,7 +116,7 @@ inherits(TileDebug, TileSource);
TileDebug.prototype.getTile = function(z, x, y) {
const tileCoordKey = getKeyZXY(z, x, y);
if (this.tileCache.containsKey(tileCoordKey)) {
- return /** @type {!module:ol/source/LabeledTile} */ (this.tileCache.get(tileCoordKey));
+ return /** @type {!module:ol/source/TileDebug~LabeledTile} */ (this.tileCache.get(tileCoordKey));
} else {
const tileSize = toSize(this.tileGrid.getTileSize(z));
const tileCoord = [z, x, y];
diff --git a/src/ol/source/TileUTFGrid.js b/src/ol/source/TileUTFGrid.js
index 566204c2c4..0e320618dc 100644
--- a/src/ol/source/TileUTFGrid.js
+++ b/src/ol/source/TileUTFGrid.js
@@ -384,7 +384,7 @@ UTFGrid.prototype.forDataAtCoordinateAndResolution = function(
if (this.tileGrid) {
const tileCoord = this.tileGrid.getTileCoordForCoordAndResolution(
coordinate, resolution);
- const tile = /** @type {!module:ol/source/CustomTile} */(this.getTile(
+ const tile = /** @type {!module:ol/source/TileUTFGrid~CustomTile} */(this.getTile(
tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));
tile.forDataAtCoordinate(coordinate, callback, null, opt_request);
} else {