Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid geojson data - only FeatureCollection and Feature are supported #7099

Open
jay7ul opened this issue Apr 1, 2024 · 0 comments
Open

Comments

@jay7ul
Copy link

jay7ul commented Apr 1, 2024

Hi,

a) from this webpage.
https://docs.terria.io/guide/connecting-to-data/catalog-type-details/geojson/

b) copy paste this code and saveas local .json file

{
"type": "geojson",
"url": "https://tiles.terria.io/terriajs-examples/geojson/bike_racks.geojson",
"name": "geojson example",
"id": "some unique ID"
}

c) upload to local terriajs node (npm start) http://127.0.0.1:3001/

d) error message

A network request error occurred
Data may not be available or display correctly due to data custodian's service outage. Please try reloading the map, accessing the data at a later stage, or selecting a different dataset.
If the problem persists, please submit feedback here.
Developer details
Data could not be added

An error occurred while loading the catalog item.

Failed to load g2.json mapItems

Data may not be available or display correctly due to data custodian's service outage. Please try reloading the map, accessing the data at a later stage, or selecting a different dataset.
If the problem persists, please submit feedback here.

An error occurred parsing the provided data as JSON. This may indicate that the file is invalid or that it is not supported.

Invalid geojson data - only FeatureCollection and Feature are supported

Invalid geojson data - only FeatureCollection and Feature are supported
Error: Invalid geojson data - only FeatureCollection and Feature are supported
at Function.from (webpack-internal:///./node_modules/terriajs/lib/Core/TerriaError.ts:396:25)
at GeoJsonCatalogItem._callee2$ (webpack-internal:///./node_modules/terriajs/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts:268:45)
at tryCatch (webpack-internal:///./node_modules/terriajs/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts:64:1062)
at Generator.eval (webpack-internal:///./node_modules/terriajs/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts:64:3012)
at Generator.eval [as next] (webpack-internal:///./node_modules/terriajs/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts:64:1699)
at asyncGeneratorStep (webpack-internal:///./node_modules/terriajs/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts:65:103)
at _next (webpack-internal:///./node_modules/terriajs/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts:66:194)
This may indicate one of the following:

The server hostname could not be resolved
The server did not respond to the request - or is temporarily unavailable
The server denied Cross-Origin Resource Sharing (CORS) access to this URL
There is a problem with your internet connection
If you entered the link manually, please verify that the link is correct.

e) manual downlaod OK - copy paste this into a web browser
https://tiles.terria.io/terriajs-examples/geojson/bike_racks.geojson

Please help me understand how to use this example.
https://docs.terria.io/guide/connecting-to-data/catalog-type-details/geojson/

Thanks
Zul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant