davvalent commited on 2023-03-15 16:50:54
Showing 1 changed files, with 7 additions and 5 deletions.
| ... | ... |
@@ -60,25 +60,27 @@ |
| 60 | 60 |
console.log("Dev:", sparqlResults);
|
| 61 | 61 |
}; |
| 62 | 62 |
|
| 63 |
+ let featuresArray = []; |
|
| 64 |
+ |
|
| 63 | 65 |
/** |
| 64 | 66 |
* making of geoJSON object |
| 65 | 67 |
*/ |
| 66 |
- let featuresArray = []; |
|
| 67 | 68 |
sparqlResults.results.bindings.forEach(feature => {
|
| 68 |
- featuresArray.push( |
|
| 69 |
- {
|
|
| 69 |
+ |
|
| 70 |
+ featuresArray.push({
|
|
| 70 | 71 |
"type": "Feature", |
| 71 | 72 |
"properties": {
|
| 72 | 73 |
"URI": feature.a.value |
| 73 | 74 |
}, |
| 74 | 75 |
"geometry": JSON.parse(feature.b.value) |
| 75 |
- } |
|
| 76 |
- ) |
|
| 77 | 76 |
}); |
| 77 |
+ }); |
|
| 78 |
+ |
|
| 78 | 79 |
const geojsonFeaturesFromTripleStore = {
|
| 79 | 80 |
"type": "FeatureCollection", |
| 80 | 81 |
"features": featuresArray |
| 81 | 82 |
}; |
| 83 |
+ |
|
| 82 | 84 |
if (dev()) { // develop
|
| 83 | 85 |
console.log(geojsonFeaturesFromTripleStore); |
| 84 | 86 |
}; |
| 85 | 87 |