Merge pull request #9068 from fredj/mvt_types

Use 'PBF' type instead of 'Object' in ol/format/MVT
This commit is contained in:
Frédéric Junod
2018-12-17 17:02:11 +01:00
committed by GitHub
+6 -9
View File
@@ -94,8 +94,7 @@ class MVT extends FeatureFormat {
/** /**
* Read the raw geometry from the pbf offset stored in a raw feature's geometry * Read the raw geometry from the pbf offset stored in a raw feature's geometry
* property. * property.
* @suppress {missingProperties} * @param {PBF} pbf PBF.
* @param {Object} pbf PBF.
* @param {Object} feature Raw feature. * @param {Object} feature Raw feature.
* @param {Array<number>} flatCoordinates Array to store flat coordinates in. * @param {Array<number>} flatCoordinates Array to store flat coordinates in.
* @param {Array<number>} ends Array to store ends in. * @param {Array<number>} ends Array to store ends in.
@@ -158,7 +157,7 @@ class MVT extends FeatureFormat {
/** /**
* @private * @private
* @param {Object} pbf PBF * @param {PBF} pbf PBF
* @param {Object} rawFeature Raw Mapbox feature. * @param {Object} rawFeature Raw Mapbox feature.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options. * @param {import("./Feature.js").ReadOptions=} opt_options Read options.
* @return {import("../Feature.js").FeatureLike} Feature. * @return {import("../Feature.js").FeatureLike} Feature.
@@ -289,7 +288,7 @@ class MVT extends FeatureFormat {
* Reader callback for parsing layers. * Reader callback for parsing layers.
* @param {number} tag The tag. * @param {number} tag The tag.
* @param {Object} layers The layers object. * @param {Object} layers The layers object.
* @param {Object} pbf The PBF. * @param {PBF} pbf The PBF.
*/ */
function layersPBFReader(tag, layers, pbf) { function layersPBFReader(tag, layers, pbf) {
if (tag === 3) { if (tag === 3) {
@@ -311,7 +310,7 @@ function layersPBFReader(tag, layers, pbf) {
* Reader callback for parsing layer. * Reader callback for parsing layer.
* @param {number} tag The tag. * @param {number} tag The tag.
* @param {Object} layer The layer object. * @param {Object} layer The layer object.
* @param {Object} pbf The PBF. * @param {PBF} pbf The PBF.
*/ */
function layerPBFReader(tag, layer, pbf) { function layerPBFReader(tag, layer, pbf) {
if (tag === 15) { if (tag === 15) {
@@ -345,7 +344,7 @@ function layerPBFReader(tag, layer, pbf) {
* Reader callback for parsing feature. * Reader callback for parsing feature.
* @param {number} tag The tag. * @param {number} tag The tag.
* @param {Object} feature The feature object. * @param {Object} feature The feature object.
* @param {Object} pbf The PBF. * @param {PBF} pbf The PBF.
*/ */
function featurePBFReader(tag, feature, pbf) { function featurePBFReader(tag, feature, pbf) {
if (tag == 1) { if (tag == 1) {
@@ -367,8 +366,7 @@ function featurePBFReader(tag, feature, pbf) {
/** /**
* Read a raw feature from the pbf offset stored at index `i` in the raw layer. * Read a raw feature from the pbf offset stored at index `i` in the raw layer.
* @suppress {missingProperties} * @param {PBF} pbf PBF.
* @param {Object} pbf PBF.
* @param {Object} layer Raw layer. * @param {Object} layer Raw layer.
* @param {number} i Index of the feature in the raw layer's `features` array. * @param {number} i Index of the feature in the raw layer's `features` array.
* @return {Object} Raw feature. * @return {Object} Raw feature.
@@ -388,7 +386,6 @@ function readRawFeature(pbf, layer, i) {
/** /**
* @suppress {missingProperties}
* @param {number} type The raw feature's geometry type * @param {number} type The raw feature's geometry type
* @param {number} numEnds Number of ends of the flat coordinates of the * @param {number} numEnds Number of ends of the flat coordinates of the
* geometry. * geometry.