From 103a2e7a50eba05054b60a23c94f5621282931a0 Mon Sep 17 00:00:00 2001 From: Ben Frengley Date: Tue, 14 Aug 2018 14:44:01 +1200 Subject: [PATCH] Fix feature being marked as optional in get/setFeatureState --- src/ui/map.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ui/map.js b/src/ui/map.js index c03e0d722c0..3a16ebc5fb7 100755 --- a/src/ui/map.js +++ b/src/ui/map.js @@ -1337,10 +1337,10 @@ class Map extends Camera { /** * Sets the state of a feature. The `state` object is merged in with the existing state of the feature. * - * @param {Object} [feature] Feature identifier. Feature objects returned from + * @param {Object} feature Feature identifier. Feature objects returned from * {@link Map#queryRenderedFeatures} or event handlers can be used as feature identifiers. - * @param {string | number} [feature.id] Unique id of the feature. - * @param {string} [feature.source] The Id of the vector source or GeoJSON source for the feature. + * @param {string | number} feature.id Unique id of the feature. + * @param {string} feature.source The Id of the vector source or GeoJSON source for the feature. * @param {string} [feature.sourceLayer] (optional) *For vector tile sources, the sourceLayer is * required.* * @param {Object} state A set of key-value pairs. The values should be valid JSON types. @@ -1359,12 +1359,12 @@ class Map extends Camera { /** * Gets the state of a feature. * - * @param {Object} [feature] Feature identifier. Feature objects returned from + * @param {Object} feature Feature identifier. Feature objects returned from * {@link Map#queryRenderedFeatures} or event handlers can be used as feature identifiers. - * @param {string} [feature.source] The Id of the vector source or GeoJSON source for the feature. + * @param {string | number} feature.id Unique id of the feature. + * @param {string} feature.source The Id of the vector source or GeoJSON source for the feature. * @param {string} [feature.sourceLayer] (optional) *For vector tile sources, the sourceLayer is * required.* - * @param {string | number} [feature.id] Unique id of the feature. * * @returns {Object} The state of the feature. */