@@ -109,12 +109,12 @@ function featureToH3Set(feature, resolution) {
109109 * @param {Object } [properties] Optional feature properties
110110 * @return {Feature } GeoJSON Feature object
111111 */
112- function h3ToFeature ( hexAddress , properties = { } ) {
112+ function h3ToFeature ( h3Index , properties = { } ) {
113113 // Wrap in an array for a single-loop polygon
114- const coordinates = [ h3 . h3ToGeoBoundary ( hexAddress , true ) ] ;
114+ const coordinates = [ h3 . h3ToGeoBoundary ( h3Index , true ) ] ;
115115 return {
116116 type : FEATURE ,
117- id : hexAddress ,
117+ id : h3Index ,
118118 properties,
119119 geometry : {
120120 type : POLYGON ,
@@ -162,9 +162,9 @@ function h3SetToFeature(hexagons, properties = {}) {
162162 * @return {Feature } GeoJSON Feature object
163163 */
164164function h3SetToMultiPolygonFeature ( hexagons , properties = { } ) {
165- const coordinates = hexagons . map ( hexAddress =>
165+ const coordinates = hexagons . map ( h3Index =>
166166 // Wrap in an array for a single-loop polygon
167- [ h3 . h3ToGeoBoundary ( hexAddress , { geoJson : true } ) ]
167+ [ h3 . h3ToGeoBoundary ( h3Index , { geoJson : true } ) ]
168168 ) ;
169169 return {
170170 type : FEATURE ,
@@ -184,15 +184,15 @@ function h3SetToMultiPolygonFeature(hexagons, properties = {}) {
184184 * @static
185185 * @param {String[] } hexagons Hexagon addresses
186186 * @param {Function } [getProperties] Optional function returning properties
187- * for a hexagon: f(hexAddress ) => Object
187+ * for a hexagon: f(h3Index ) => Object
188188 * @return {FeatureCollection } GeoJSON FeatureCollection object
189189 */
190190function h3SetToFeatureCollection ( hexagons , getProperties ) {
191191 const features = [ ] ;
192192 for ( let i = 0 ; i < hexagons . length ; i ++ ) {
193- const hexAddress = hexagons [ i ] ;
194- const properties = getProperties ? getProperties ( hexAddress ) : { } ;
195- features . push ( h3ToFeature ( hexAddress , properties ) ) ;
193+ const h3Index = hexagons [ i ] ;
194+ const properties = getProperties ? getProperties ( h3Index ) : { } ;
195+ features . push ( h3ToFeature ( h3Index , properties ) ) ;
196196 }
197197 return {
198198 type : FEATURE_COLLECTION ,
0 commit comments