@@ -107,15 +107,17 @@ export function identifyGeoJSONFeatureAt(geoJsonLayer, coordinate, projection, r
107
107
}
108
108
return identifyInGeoJson ( reprojectedGeoJSON , coordinate , projection , resolution ) . map (
109
109
( feature ) => {
110
- return new LayerFeature (
111
- geoJsonLayer ,
112
- feature . id ,
113
- feature . properties . station_name || feature . id ,
114
- { title : feature . properties . name , description : feature . properties . description } ,
115
- reprojectCoordinates ( feature . geometry . coordinates , projection ) ,
116
- null ,
117
- reproject ( feature . geometry , WGS84 . epsg , projection . epsg )
118
- )
110
+ return new LayerFeature ( {
111
+ layer : geoJsonLayer ,
112
+ id : feature . id ,
113
+ name : feature . properties . station_name || feature . id ,
114
+ data : {
115
+ title : feature . properties . name ,
116
+ description : feature . properties . description ,
117
+ } ,
118
+ coordinates : reprojectCoordinates ( feature . geometry . coordinates , projection ) ,
119
+ geometry : reproject ( feature . geometry , WGS84 . epsg , projection . epsg ) ,
120
+ } )
119
121
}
120
122
)
121
123
}
@@ -145,15 +147,17 @@ export function identifyKMLFeatureAt(kmlLayer, coordinate, projection, resolutio
145
147
const convertedKml = kmlToGeoJSON ( parseKml )
146
148
return identifyInGeoJson ( convertedKml , coordinate , projection , resolution ) . map (
147
149
( feature ) => {
148
- return new LayerFeature (
149
- kmlLayer ,
150
- feature . id ,
151
- kmlLayer . name ,
152
- { title : feature . properties . name , description : feature . properties . description } ,
153
- reprojectCoordinates ( feature . geometry . coordinates , projection ) ,
154
- null ,
155
- reproject ( feature . geometry , WGS84 . epsg , projection . epsg )
156
- )
150
+ return new LayerFeature ( {
151
+ layer : kmlLayer ,
152
+ id : feature . id ,
153
+ name : kmlLayer . name ,
154
+ data : {
155
+ title : feature . properties . name ,
156
+ description : feature . properties . description ,
157
+ } ,
158
+ coordinates : reprojectCoordinates ( feature . geometry . coordinates , projection ) ,
159
+ geometry : reproject ( feature . geometry , WGS84 . epsg , projection . epsg ) ,
160
+ } )
157
161
}
158
162
)
159
163
}
@@ -176,15 +180,14 @@ export function identifyGPXFeatureAt(gpxLayer, coordinate, projection, resolutio
176
180
const convertedGpx = gpxToGeoJSON ( parseGpx )
177
181
return identifyInGeoJson ( convertedGpx , coordinate , projection , resolution ) . map (
178
182
( feature ) => {
179
- return new LayerFeature (
180
- gpxLayer ,
181
- `${ gpxLayer . name } -${ feature . properties ?. name } ` ,
182
- feature . properties ?. name ,
183
- { ...feature . properties } ,
184
- reprojectCoordinates ( feature . geometry . coordinates , projection ) ,
185
- null ,
186
- reproject ( feature . geometry , WGS84 . epsg , projection . epsg )
187
- )
183
+ return new LayerFeature ( {
184
+ layer : gpxLayer ,
185
+ id : `${ gpxLayer . name } -${ feature . properties ?. name } ` ,
186
+ name : feature . properties ?. name ,
187
+ data : { ...feature . properties } ,
188
+ coordinates : reprojectCoordinates ( feature . geometry . coordinates , projection ) ,
189
+ geometry : reproject ( feature . geometry , WGS84 . epsg , projection . epsg ) ,
190
+ } )
188
191
}
189
192
)
190
193
}
0 commit comments