[core] parse GeoJSON source type
This commit is contained in:
6
test/fixtures/style_parser/geojson-data-inline.info.json
vendored
Normal file
6
test/fixtures/style_parser/geojson-data-inline.info.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"default": {
|
||||
"log": [
|
||||
]
|
||||
}
|
||||
}
|
||||
9
test/fixtures/style_parser/geojson-data-inline.style.json
vendored
Normal file
9
test/fixtures/style_parser/geojson-data-inline.style.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 8,
|
||||
"sources": {
|
||||
"mapbox": {
|
||||
"type": "geojson",
|
||||
"data": { "type": "Feature", "geometry": { "type": "Point", "coordinates": [100.0, 0.0] } }
|
||||
}
|
||||
}
|
||||
}
|
||||
6
test/fixtures/style_parser/geojson-data-url.info.json
vendored
Normal file
6
test/fixtures/style_parser/geojson-data-url.info.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"default": {
|
||||
"log": [
|
||||
]
|
||||
}
|
||||
}
|
||||
9
test/fixtures/style_parser/geojson-data-url.style.json
vendored
Normal file
9
test/fixtures/style_parser/geojson-data-url.style.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 8,
|
||||
"sources": {
|
||||
"mapbox": {
|
||||
"type": "geojson",
|
||||
"data": "asset://TEST_DATA/fixtures/geojson/point.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
test/fixtures/style_parser/geojson-invalid-data.info.json
vendored
Normal file
7
test/fixtures/style_parser/geojson-invalid-data.info.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"default": {
|
||||
"log": [
|
||||
[1, "ERROR", "ParseStyle", "GeoJSON data must be a URL or an object"]
|
||||
]
|
||||
}
|
||||
}
|
||||
9
test/fixtures/style_parser/geojson-invalid-data.style.json
vendored
Normal file
9
test/fixtures/style_parser/geojson-invalid-data.style.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"version": 8,
|
||||
"sources": {
|
||||
"mapbox": {
|
||||
"type": "geojson",
|
||||
"data": 24
|
||||
}
|
||||
}
|
||||
}
|
||||
7
test/fixtures/style_parser/geojson-missing-data.info.json
vendored
Normal file
7
test/fixtures/style_parser/geojson-missing-data.info.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"default": {
|
||||
"log": [
|
||||
[1, "WARNING", "ParseStyle", "GeoJSON source must have a data value"]
|
||||
]
|
||||
}
|
||||
}
|
||||
8
test/fixtures/style_parser/geojson-missing-data.style.json
vendored
Normal file
8
test/fixtures/style_parser/geojson-missing-data.style.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"version": 8,
|
||||
"sources": {
|
||||
"mapbox": {
|
||||
"type": "geojson"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user