Rename sub-sub-namespace typedefs to sub-namespace
These sub-sub-namespace typedefs are only used internally; some of them cause problems by creating a form of circular dependency. For example, ol.style.Atlas is created in style/atlasmanager.js; if ol.style.Atlas.Block is in a separate file, ol.style.Atlas is dependent on it, so the new file must precede ol.style.Atlas. However if it precedes it then it has to create the ol.style.Atlas namespace which should be created by atlasmanager.js. To get round this, these typedefs are renamed to remove the sub-sub-namespace. Fortunately they are all non-api, so the rename should not affect anything.
This commit is contained in:
@@ -366,12 +366,6 @@ ol.format.WKT.prototype.writeGeometryText = function(geometry, opt_options) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{type: number, value: (number|string|undefined), position: number}}
|
|
||||||
*/
|
|
||||||
ol.format.WKT.Token;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @const
|
* @const
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
@@ -451,7 +445,7 @@ ol.format.WKT.Lexer.prototype.nextChar_ = function() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch and return the next token.
|
* Fetch and return the next token.
|
||||||
* @return {!ol.format.WKT.Token} Next string token.
|
* @return {!ol.format.WKTToken} Next string token.
|
||||||
*/
|
*/
|
||||||
ol.format.WKT.Lexer.prototype.nextToken = function() {
|
ol.format.WKT.Lexer.prototype.nextToken = function() {
|
||||||
var c = this.nextChar_();
|
var c = this.nextChar_();
|
||||||
@@ -537,7 +531,7 @@ ol.format.WKT.Parser = function(lexer) {
|
|||||||
this.lexer_ = lexer;
|
this.lexer_ = lexer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {ol.format.WKT.Token}
|
* @type {ol.format.WKTToken}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.token_;
|
this.token_;
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ ol.interaction.Snap = function(opt_options) {
|
|||||||
options.pixelTolerance : 10;
|
options.pixelTolerance : 10;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {function(ol.interaction.Snap.SegmentDataType, ol.interaction.Snap.SegmentDataType): number}
|
* @type {function(ol.interaction.SnapSegmentDataType, ol.interaction.SnapSegmentDataType): number}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.sortByDistance_ = ol.interaction.Snap.sortByDistance.bind(this);
|
this.sortByDistance_ = ol.interaction.Snap.sortByDistance.bind(this);
|
||||||
@@ -137,7 +137,7 @@ ol.interaction.Snap = function(opt_options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Segment RTree for each layer
|
* Segment RTree for each layer
|
||||||
* @type {ol.structs.RBush.<ol.interaction.Snap.SegmentDataType>}
|
* @type {ol.structs.RBush.<ol.interaction.SnapSegmentDataType>}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.rBush_ = new ol.structs.RBush();
|
this.rBush_ = new ol.structs.RBush();
|
||||||
@@ -378,7 +378,7 @@ ol.interaction.Snap.prototype.shouldStopEvent = ol.functions.FALSE;
|
|||||||
* @param {ol.Pixel} pixel Pixel
|
* @param {ol.Pixel} pixel Pixel
|
||||||
* @param {ol.Coordinate} pixelCoordinate Coordinate
|
* @param {ol.Coordinate} pixelCoordinate Coordinate
|
||||||
* @param {ol.Map} map Map.
|
* @param {ol.Map} map Map.
|
||||||
* @return {ol.interaction.Snap.ResultType} Snap result
|
* @return {ol.interaction.SnapResultType} Snap result
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
|
ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
|
||||||
|
|
||||||
@@ -437,7 +437,7 @@ ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
|
|||||||
vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];
|
vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return /** @type {ol.interaction.Snap.ResultType} */ ({
|
return /** @type {ol.interaction.SnapResultType} */ ({
|
||||||
snapped: snapped,
|
snapped: snapped,
|
||||||
vertex: vertex,
|
vertex: vertex,
|
||||||
vertexPixel: vertexPixel
|
vertexPixel: vertexPixel
|
||||||
@@ -479,7 +479,7 @@ ol.interaction.Snap.prototype.writeLineStringGeometry_ = function(feature, geome
|
|||||||
var i, ii, segment, segmentData;
|
var i, ii, segment, segmentData;
|
||||||
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
||||||
segment = coordinates.slice(i, i + 2);
|
segment = coordinates.slice(i, i + 2);
|
||||||
segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({
|
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
|
||||||
feature: feature,
|
feature: feature,
|
||||||
segment: segment
|
segment: segment
|
||||||
});
|
});
|
||||||
@@ -500,7 +500,7 @@ ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ = function(feature,
|
|||||||
coordinates = lines[j];
|
coordinates = lines[j];
|
||||||
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
||||||
segment = coordinates.slice(i, i + 2);
|
segment = coordinates.slice(i, i + 2);
|
||||||
segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({
|
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
|
||||||
feature: feature,
|
feature: feature,
|
||||||
segment: segment
|
segment: segment
|
||||||
});
|
});
|
||||||
@@ -520,7 +520,7 @@ ol.interaction.Snap.prototype.writeMultiPointGeometry_ = function(feature, geome
|
|||||||
var coordinates, i, ii, segmentData;
|
var coordinates, i, ii, segmentData;
|
||||||
for (i = 0, ii = points.length; i < ii; ++i) {
|
for (i = 0, ii = points.length; i < ii; ++i) {
|
||||||
coordinates = points[i];
|
coordinates = points[i];
|
||||||
segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({
|
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
|
||||||
feature: feature,
|
feature: feature,
|
||||||
segment: [coordinates, coordinates]
|
segment: [coordinates, coordinates]
|
||||||
});
|
});
|
||||||
@@ -543,7 +543,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geo
|
|||||||
coordinates = rings[j];
|
coordinates = rings[j];
|
||||||
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
||||||
segment = coordinates.slice(i, i + 2);
|
segment = coordinates.slice(i, i + 2);
|
||||||
segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({
|
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
|
||||||
feature: feature,
|
feature: feature,
|
||||||
segment: segment
|
segment: segment
|
||||||
});
|
});
|
||||||
@@ -561,7 +561,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geo
|
|||||||
*/
|
*/
|
||||||
ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) {
|
ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) {
|
||||||
var coordinates = geometry.getCoordinates();
|
var coordinates = geometry.getCoordinates();
|
||||||
var segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({
|
var segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
|
||||||
feature: feature,
|
feature: feature,
|
||||||
segment: [coordinates, coordinates]
|
segment: [coordinates, coordinates]
|
||||||
});
|
});
|
||||||
@@ -581,7 +581,7 @@ ol.interaction.Snap.prototype.writePolygonGeometry_ = function(feature, geometry
|
|||||||
coordinates = rings[j];
|
coordinates = rings[j];
|
||||||
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
|
||||||
segment = coordinates.slice(i, i + 2);
|
segment = coordinates.slice(i, i + 2);
|
||||||
segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({
|
segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({
|
||||||
feature: feature,
|
feature: feature,
|
||||||
segment: segment
|
segment: segment
|
||||||
});
|
});
|
||||||
@@ -626,8 +626,8 @@ ol.interaction.Snap.handleUpEvent_ = function(evt) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Sort segments by distance, helper function
|
* Sort segments by distance, helper function
|
||||||
* @param {ol.interaction.Snap.SegmentDataType} a The first segment data.
|
* @param {ol.interaction.SnapSegmentDataType} a The first segment data.
|
||||||
* @param {ol.interaction.Snap.SegmentDataType} b The second segment data.
|
* @param {ol.interaction.SnapSegmentDataType} b The second segment data.
|
||||||
* @return {number} The difference in distance.
|
* @return {number} The difference in distance.
|
||||||
* @this {ol.interaction.Snap}
|
* @this {ol.interaction.Snap}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -71,31 +71,31 @@ ol.render.canvas.Immediate = function(context, pixelRatio, extent, transform, vi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.FillState}
|
* @type {?ol.render.canvasFillState}
|
||||||
*/
|
*/
|
||||||
this.contextFillState_ = null;
|
this.contextFillState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.StrokeState}
|
* @type {?ol.render.canvasStrokeState}
|
||||||
*/
|
*/
|
||||||
this.contextStrokeState_ = null;
|
this.contextStrokeState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.TextState}
|
* @type {?ol.render.canvasTextState}
|
||||||
*/
|
*/
|
||||||
this.contextTextState_ = null;
|
this.contextTextState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.FillState}
|
* @type {?ol.render.canvasFillState}
|
||||||
*/
|
*/
|
||||||
this.fillState_ = null;
|
this.fillState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.StrokeState}
|
* @type {?ol.render.canvasStrokeState}
|
||||||
*/
|
*/
|
||||||
this.strokeState_ = null;
|
this.strokeState_ = null;
|
||||||
|
|
||||||
@@ -203,19 +203,19 @@ ol.render.canvas.Immediate = function(context, pixelRatio, extent, transform, vi
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.FillState}
|
* @type {?ol.render.canvasFillState}
|
||||||
*/
|
*/
|
||||||
this.textFillState_ = null;
|
this.textFillState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.StrokeState}
|
* @type {?ol.render.canvasStrokeState}
|
||||||
*/
|
*/
|
||||||
this.textStrokeState_ = null;
|
this.textStrokeState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.TextState}
|
* @type {?ol.render.canvasTextState}
|
||||||
*/
|
*/
|
||||||
this.textState_ = null;
|
this.textState_ = null;
|
||||||
|
|
||||||
@@ -700,7 +700,7 @@ ol.render.canvas.Immediate.prototype.drawMultiPolygon = function(geometry) {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.render.canvas.FillState} fillState Fill state.
|
* @param {ol.render.canvasFillState} fillState Fill state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState) {
|
ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState) {
|
||||||
@@ -720,7 +720,7 @@ ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.render.canvas.StrokeState} strokeState Stroke state.
|
* @param {ol.render.canvasStrokeState} strokeState Stroke state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeState) {
|
ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeState) {
|
||||||
@@ -772,7 +772,7 @@ ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeSta
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.render.canvas.TextState} textState Text state.
|
* @param {ol.render.canvasTextState} textState Text state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.Immediate.prototype.setContextTextState_ = function(textState) {
|
ol.render.canvas.Immediate.prototype.setContextTextState_ = function(textState) {
|
||||||
|
|||||||
@@ -1538,19 +1538,19 @@ ol.render.canvas.TextReplay = function(tolerance, maxExtent, resolution) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.FillState}
|
* @type {?ol.render.canvasFillState}
|
||||||
*/
|
*/
|
||||||
this.replayFillState_ = null;
|
this.replayFillState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.StrokeState}
|
* @type {?ol.render.canvasStrokeState}
|
||||||
*/
|
*/
|
||||||
this.replayStrokeState_ = null;
|
this.replayStrokeState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.TextState}
|
* @type {?ol.render.canvasTextState}
|
||||||
*/
|
*/
|
||||||
this.replayTextState_ = null;
|
this.replayTextState_ = null;
|
||||||
|
|
||||||
@@ -1586,19 +1586,19 @@ ol.render.canvas.TextReplay = function(tolerance, maxExtent, resolution) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.FillState}
|
* @type {?ol.render.canvasFillState}
|
||||||
*/
|
*/
|
||||||
this.textFillState_ = null;
|
this.textFillState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.StrokeState}
|
* @type {?ol.render.canvasStrokeState}
|
||||||
*/
|
*/
|
||||||
this.textStrokeState_ = null;
|
this.textStrokeState_ = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {?ol.render.canvas.TextState}
|
* @type {?ol.render.canvasTextState}
|
||||||
*/
|
*/
|
||||||
this.textState_ = null;
|
this.textState_ = null;
|
||||||
|
|
||||||
@@ -1638,7 +1638,7 @@ ol.render.canvas.TextReplay.prototype.drawText = function(flatCoordinates, offse
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.render.canvas.FillState} fillState Fill state.
|
* @param {ol.render.canvasFillState} fillState Fill state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.TextReplay.prototype.setReplayFillState_ = function(fillState) {
|
ol.render.canvas.TextReplay.prototype.setReplayFillState_ = function(fillState) {
|
||||||
@@ -1662,7 +1662,7 @@ ol.render.canvas.TextReplay.prototype.setReplayFillState_ = function(fillState)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.render.canvas.StrokeState} strokeState Stroke state.
|
* @param {ol.render.canvasStrokeState} strokeState Stroke state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ = function(strokeState) {
|
ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ = function(strokeState) {
|
||||||
@@ -1704,7 +1704,7 @@ ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ = function(strokeSta
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.render.canvas.TextState} textState Text state.
|
* @param {ol.render.canvasTextState} textState Text state.
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.TextReplay.prototype.setReplayTextState_ = function(textState) {
|
ol.render.canvas.TextReplay.prototype.setReplayTextState_ = function(textState) {
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ ol.renderer.webgl.Map = function(container, map) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {ol.structs.LRUCache.<ol.renderer.webgl.TextureCacheEntry|null>}
|
* @type {ol.structs.LRUCache.<ol.renderer.webglTextureCacheEntry|null>}
|
||||||
*/
|
*/
|
||||||
this.textureCache_ = new ol.structs.LRUCache();
|
this.textureCache_ = new ol.structs.LRUCache();
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ ol.renderer.webgl.Map.prototype.disposeInternal = function() {
|
|||||||
if (!gl.isContextLost()) {
|
if (!gl.isContextLost()) {
|
||||||
this.textureCache_.forEach(
|
this.textureCache_.forEach(
|
||||||
/**
|
/**
|
||||||
* @param {?ol.renderer.webgl.TextureCacheEntry} textureCacheEntry
|
* @param {?ol.renderer.webglTextureCacheEntry} textureCacheEntry
|
||||||
* Texture cache entry.
|
* Texture cache entry.
|
||||||
*/
|
*/
|
||||||
function(textureCacheEntry) {
|
function(textureCacheEntry) {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ ol.source.Raster = function(options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The most recently rendered state.
|
* The most recently rendered state.
|
||||||
* @type {?ol.source.Raster.RenderedState}
|
* @type {?ol.source.RasterRenderedState}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.renderedState_ = null;
|
this.renderedState_ = null;
|
||||||
@@ -445,14 +445,6 @@ ol.source.Raster.createTileRenderer_ = function(source) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{revision: number,
|
|
||||||
* resolution: number,
|
|
||||||
* extent: ol.Extent}}
|
|
||||||
*/
|
|
||||||
ol.source.Raster.RenderedState;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Events emitted by {@link ol.source.Raster} instances are instances of this
|
* Events emitted by {@link ol.source.Raster} instances are instances of this
|
||||||
|
|||||||
@@ -5,16 +5,6 @@ goog.require('goog.asserts');
|
|||||||
goog.require('ol');
|
goog.require('ol');
|
||||||
goog.require('ol.dom');
|
goog.require('ol.dom');
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides information for an image inside an atlas manager.
|
|
||||||
* `offsetX` and `offsetY` is the position of the image inside
|
|
||||||
* the atlas image `image` and the position of the hit-detection image
|
|
||||||
* inside the hit-detection atlas image `hitImage`.
|
|
||||||
* @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement,
|
|
||||||
* hitImage: HTMLCanvasElement}}
|
|
||||||
*/
|
|
||||||
ol.style.AtlasManagerInfo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages the creation of image atlases.
|
* Manages the creation of image atlases.
|
||||||
@@ -239,15 +229,6 @@ ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height,
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides information for an image inside an atlas.
|
|
||||||
* `offsetX` and `offsetY` are the position of the image inside
|
|
||||||
* the atlas image `image`.
|
|
||||||
* @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement}}
|
|
||||||
*/
|
|
||||||
ol.style.AtlasInfo;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class facilitates the creation of image atlases.
|
* This class facilitates the creation of image atlases.
|
||||||
*
|
*
|
||||||
@@ -275,7 +256,7 @@ ol.style.Atlas = function(size, space) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {Array.<ol.style.Atlas.Block>}
|
* @type {Array.<ol.style.AtlasBlock>}
|
||||||
*/
|
*/
|
||||||
this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}];
|
this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}];
|
||||||
|
|
||||||
@@ -351,7 +332,7 @@ ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_t
|
|||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {number} index The index of the block.
|
* @param {number} index The index of the block.
|
||||||
* @param {ol.style.Atlas.Block} block The block to split.
|
* @param {ol.style.AtlasBlock} block The block to split.
|
||||||
* @param {number} width The width of the entry to insert.
|
* @param {number} width The width of the entry to insert.
|
||||||
* @param {number} height The height of the entry to insert.
|
* @param {number} height The height of the entry to insert.
|
||||||
*/
|
*/
|
||||||
@@ -359,9 +340,9 @@ ol.style.Atlas.prototype.split_ = function(index, block, width, height) {
|
|||||||
var deltaWidth = block.width - width;
|
var deltaWidth = block.width - width;
|
||||||
var deltaHeight = block.height - height;
|
var deltaHeight = block.height - height;
|
||||||
|
|
||||||
/** @type {ol.style.Atlas.Block} */
|
/** @type {ol.style.AtlasBlock} */
|
||||||
var newBlock1;
|
var newBlock1;
|
||||||
/** @type {ol.style.Atlas.Block} */
|
/** @type {ol.style.AtlasBlock} */
|
||||||
var newBlock2;
|
var newBlock2;
|
||||||
|
|
||||||
if (deltaWidth > deltaHeight) {
|
if (deltaWidth > deltaHeight) {
|
||||||
@@ -410,8 +391,8 @@ ol.style.Atlas.prototype.split_ = function(index, block, width, height) {
|
|||||||
* blocks (that are potentially smaller) are filled first.
|
* blocks (that are potentially smaller) are filled first.
|
||||||
* @private
|
* @private
|
||||||
* @param {number} index The index of the block to remove.
|
* @param {number} index The index of the block to remove.
|
||||||
* @param {ol.style.Atlas.Block} newBlock1 The 1st block to add.
|
* @param {ol.style.AtlasBlock} newBlock1 The 1st block to add.
|
||||||
* @param {ol.style.Atlas.Block} newBlock2 The 2nd block to add.
|
* @param {ol.style.AtlasBlock} newBlock2 The 2nd block to add.
|
||||||
*/
|
*/
|
||||||
ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) {
|
ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) {
|
||||||
var args = [index, 1];
|
var args = [index, 1];
|
||||||
@@ -423,9 +404,3 @@ ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) {
|
|||||||
}
|
}
|
||||||
this.emptyBlocks_.splice.apply(this.emptyBlocks_, args);
|
this.emptyBlocks_.splice.apply(this.emptyBlocks_, args);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{x: number, y: number, width: number, height: number}}
|
|
||||||
*/
|
|
||||||
ol.style.Atlas.Block;
|
|
||||||
|
|||||||
@@ -227,13 +227,6 @@ ol.style.Circle.prototype.load = ol.nullFunction;
|
|||||||
ol.style.Circle.prototype.unlistenImageChange = ol.nullFunction;
|
ol.style.Circle.prototype.unlistenImageChange = ol.nullFunction;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{strokeStyle: (string|undefined), strokeWidth: number,
|
|
||||||
* size: number, lineDash: Array.<number>}}
|
|
||||||
*/
|
|
||||||
ol.style.Circle.RenderOptions;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager.
|
* @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager.
|
||||||
@@ -259,7 +252,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
|
|||||||
|
|
||||||
var size = 2 * (this.radius_ + strokeWidth) + 1;
|
var size = 2 * (this.radius_ + strokeWidth) + 1;
|
||||||
|
|
||||||
/** @type {ol.style.Circle.RenderOptions} */
|
/** @type {ol.style.CircleRenderOptions} */
|
||||||
var renderOptions = {
|
var renderOptions = {
|
||||||
strokeStyle: strokeStyle,
|
strokeStyle: strokeStyle,
|
||||||
strokeWidth: strokeWidth,
|
strokeWidth: strokeWidth,
|
||||||
@@ -320,7 +313,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.style.Circle.RenderOptions} renderOptions Render options.
|
* @param {ol.style.CircleRenderOptions} renderOptions Render options.
|
||||||
* @param {CanvasRenderingContext2D} context The rendering context.
|
* @param {CanvasRenderingContext2D} context The rendering context.
|
||||||
* @param {number} x The origin for the symbol (x).
|
* @param {number} x The origin for the symbol (x).
|
||||||
* @param {number} y The origin for the symbol (y).
|
* @param {number} y The origin for the symbol (y).
|
||||||
@@ -355,7 +348,7 @@ ol.style.Circle.prototype.draw_ = function(renderOptions, context, x, y) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.style.Circle.RenderOptions} renderOptions Render options.
|
* @param {ol.style.CircleRenderOptions} renderOptions Render options.
|
||||||
*/
|
*/
|
||||||
ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
||||||
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
||||||
@@ -375,7 +368,7 @@ ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.style.Circle.RenderOptions} renderOptions Render options.
|
* @param {ol.style.CircleRenderOptions} renderOptions Render options.
|
||||||
* @param {CanvasRenderingContext2D} context The context.
|
* @param {CanvasRenderingContext2D} context The context.
|
||||||
* @param {number} x The origin for the symbol (x).
|
* @param {number} x The origin for the symbol (x).
|
||||||
* @param {number} y The origin for the symbol (y).
|
* @param {number} y The origin for the symbol (y).
|
||||||
|
|||||||
@@ -289,20 +289,6 @@ ol.style.RegularShape.prototype.load = ol.nullFunction;
|
|||||||
ol.style.RegularShape.prototype.unlistenImageChange = ol.nullFunction;
|
ol.style.RegularShape.prototype.unlistenImageChange = ol.nullFunction;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {{
|
|
||||||
* strokeStyle: (string|undefined),
|
|
||||||
* strokeWidth: number,
|
|
||||||
* size: number,
|
|
||||||
* lineCap: string,
|
|
||||||
* lineDash: Array.<number>,
|
|
||||||
* lineJoin: string,
|
|
||||||
* miterLimit: number
|
|
||||||
* }}
|
|
||||||
*/
|
|
||||||
ol.style.RegularShape.RenderOptions;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager.
|
* @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager.
|
||||||
@@ -342,7 +328,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
|
|||||||
|
|
||||||
var size = 2 * (this.radius_ + strokeWidth) + 1;
|
var size = 2 * (this.radius_ + strokeWidth) + 1;
|
||||||
|
|
||||||
/** @type {ol.style.RegularShape.RenderOptions} */
|
/** @type {ol.style.RegularShapeRenderOptions} */
|
||||||
var renderOptions = {
|
var renderOptions = {
|
||||||
strokeStyle: strokeStyle,
|
strokeStyle: strokeStyle,
|
||||||
strokeWidth: strokeWidth,
|
strokeWidth: strokeWidth,
|
||||||
@@ -405,7 +391,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.style.RegularShape.RenderOptions} renderOptions Render options.
|
* @param {ol.style.RegularShapeRenderOptions} renderOptions Render options.
|
||||||
* @param {CanvasRenderingContext2D} context The rendering context.
|
* @param {CanvasRenderingContext2D} context The rendering context.
|
||||||
* @param {number} x The origin for the symbol (x).
|
* @param {number} x The origin for the symbol (x).
|
||||||
* @param {number} y The origin for the symbol (y).
|
* @param {number} y The origin for the symbol (y).
|
||||||
@@ -450,7 +436,7 @@ ol.style.RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.style.RegularShape.RenderOptions} renderOptions Render options.
|
* @param {ol.style.RegularShapeRenderOptions} renderOptions Render options.
|
||||||
*/
|
*/
|
||||||
ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
|
||||||
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
|
||||||
@@ -470,7 +456,7 @@ ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptio
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @param {ol.style.RegularShape.RenderOptions} renderOptions Render options.
|
* @param {ol.style.RegularShapeRenderOptions} renderOptions Render options.
|
||||||
* @param {CanvasRenderingContext2D} context The context.
|
* @param {CanvasRenderingContext2D} context The context.
|
||||||
* @param {number} x The origin for the symbol (x).
|
* @param {number} x The origin for the symbol (x).
|
||||||
* @param {number} y The origin for the symbol (y).
|
* @param {number} y The origin for the symbol (y).
|
||||||
|
|||||||
+67
-6
@@ -369,6 +369,12 @@ ol.format.WFS.FeatureCollectionMetadata;
|
|||||||
ol.format.WFS.TransactionResponse;
|
ol.format.WFS.TransactionResponse;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {{type: number, value: (number|string|undefined), position: number}}
|
||||||
|
*/
|
||||||
|
ol.format.WKTToken;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A function that takes a {@link ol.MapBrowserEvent} and two
|
* A function that takes a {@link ol.MapBrowserEvent} and two
|
||||||
* {@link ol.Pixel}s and returns a `{boolean}`. If the condition is met,
|
* {@link ol.Pixel}s and returns a `{boolean}`. If the condition is met,
|
||||||
@@ -420,7 +426,7 @@ ol.interaction.SelectFilterFunction;
|
|||||||
* vertexPixel: (ol.Pixel|null)
|
* vertexPixel: (ol.Pixel|null)
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.ResultType;
|
ol.interaction.SnapResultType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -429,7 +435,7 @@ ol.interaction.Snap.ResultType;
|
|||||||
* segment: Array.<ol.Coordinate>
|
* segment: Array.<ol.Coordinate>
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
ol.interaction.Snap.SegmentDataType;
|
ol.interaction.SnapSegmentDataType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -485,7 +491,7 @@ ol.raster.Pixel;
|
|||||||
/**
|
/**
|
||||||
* @typedef {{fillStyle: ol.ColorLike}}
|
* @typedef {{fillStyle: ol.ColorLike}}
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.FillState;
|
ol.render.canvasFillState;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -496,7 +502,7 @@ ol.render.canvas.FillState;
|
|||||||
* miterLimit: number,
|
* miterLimit: number,
|
||||||
* strokeStyle: string}}
|
* strokeStyle: string}}
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.StrokeState;
|
ol.render.canvasStrokeState;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -504,13 +510,13 @@ ol.render.canvas.StrokeState;
|
|||||||
* textAlign: string,
|
* textAlign: string,
|
||||||
* textBaseline: string}}
|
* textBaseline: string}}
|
||||||
*/
|
*/
|
||||||
ol.render.canvas.TextState;
|
ol.render.canvasTextState;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{magFilter: number, minFilter: number, texture: WebGLTexture}}
|
* @typedef {{magFilter: number, minFilter: number, texture: WebGLTexture}}
|
||||||
*/
|
*/
|
||||||
ol.renderer.webgl.TextureCacheEntry;
|
ol.renderer.webglTextureCacheEntry;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -545,6 +551,14 @@ ol.reproj.Triangle;
|
|||||||
ol.source.ImageOptions;
|
ol.source.ImageOptions;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {{revision: number,
|
||||||
|
* resolution: number,
|
||||||
|
* extent: ol.Extent}}
|
||||||
|
*/
|
||||||
|
ol.source.RasterRenderedState;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
* @typedef {{attributions: (ol.AttributionLike|undefined),
|
||||||
* logo: (string|olx.LogoOptions|undefined),
|
* logo: (string|olx.LogoOptions|undefined),
|
||||||
@@ -598,6 +612,39 @@ ol.source.UrlTileOptions;
|
|||||||
ol.structs.LRUCacheEntry;
|
ol.structs.LRUCacheEntry;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {{x: number, y: number, width: number, height: number}}
|
||||||
|
*/
|
||||||
|
ol.style.AtlasBlock;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides information for an image inside an atlas.
|
||||||
|
* `offsetX` and `offsetY` are the position of the image inside
|
||||||
|
* the atlas image `image`.
|
||||||
|
* @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement}}
|
||||||
|
*/
|
||||||
|
ol.style.AtlasInfo;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides information for an image inside an atlas manager.
|
||||||
|
* `offsetX` and `offsetY` is the position of the image inside
|
||||||
|
* the atlas image `image` and the position of the hit-detection image
|
||||||
|
* inside the hit-detection atlas image `hitImage`.
|
||||||
|
* @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement,
|
||||||
|
* hitImage: HTMLCanvasElement}}
|
||||||
|
*/
|
||||||
|
ol.style.AtlasManagerInfo;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {{strokeStyle: (string|undefined), strokeWidth: number,
|
||||||
|
* size: number, lineDash: Array.<number>}}
|
||||||
|
*/
|
||||||
|
ol.style.CircleRenderOptions;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{opacity: number,
|
* @typedef {{opacity: number,
|
||||||
* rotateWithView: boolean,
|
* rotateWithView: boolean,
|
||||||
@@ -619,6 +666,20 @@ ol.style.ImageOptions;
|
|||||||
ol.style.GeometryFunction;
|
ol.style.GeometryFunction;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {{
|
||||||
|
* strokeStyle: (string|undefined),
|
||||||
|
* strokeWidth: number,
|
||||||
|
* size: number,
|
||||||
|
* lineCap: string,
|
||||||
|
* lineDash: Array.<number>,
|
||||||
|
* lineJoin: string,
|
||||||
|
* miterLimit: number
|
||||||
|
* }}
|
||||||
|
*/
|
||||||
|
ol.style.RegularShapeRenderOptions;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A function that takes an {@link ol.Feature} and a `{number}` representing
|
* A function that takes an {@link ol.Feature} and a `{number}` representing
|
||||||
* the view's resolution. The function should return a {@link ol.style.Style}
|
* the view's resolution. The function should return a {@link ol.style.Style}
|
||||||
|
|||||||
Reference in New Issue
Block a user