Skip to content
This repository was archived by the owner on Jun 4, 2026. It is now read-only.
This repository was archived by the owner on Jun 4, 2026. It is now read-only.

Style JSON parsing error #40

Open
Open

Description

@thezealousfool

Not sure where to report this issue, I am posting it here. Please redirect me to a more appropriate portal to report the issue if possible.

I am trying to have GeoJSON inline in a Style JSON file as follows:

{
    "version": 8,
    "center": [-106.29139774164685, 30.74320394740525],
    "zoom": 7.9165632086734234,
    "bearing": 0,
    "pitch": 0,
    "sources": {
        "buildings": {
            "type": "geojson",
            "data": {
                "features": [
                {
                    "type": "Feature",
                    "properties": {
                    "fid": 0
                    },
                    "geometry": {
                    "coordinates": [
                        [
                        [
                            -105.499675,
                            30.282806
                        ],
                        [
                            -105.453983,
                            30.426904
                        ],
                        [
                            -105.43146,
                            30.421707
                        ],
                        [
                            -105.428044,
                            30.431721
                        ],
                        [
                            -105.161523,
                            30.370142
                        ],
                        [
                            -105.203136,
                            30.231688
                        ],
                        [
                            -105.241638,
                            30.240779
                        ],
                        [
                            -105.262133,
                            30.171159
                        ],
                        [
                            -105.427114,
                            30.209311
                        ],
                        [
                            -105.410752,
                            30.263432
                        ],
                        [
                            -105.499675,
                            30.282806
                        ]
                        ]
                    ],
                    "type": "Polygon"
                    },
                    "id": "03a6bb18482548f8d399fcc8b8cd8b7e"
                },
                {
                    "type": "Feature",
                    "properties": {
                    "fid": 1
                    },
                    "geometry": {
                    "coordinates": [
                        [
                        [
                            -105.138426,
                            30.365559
                        ],
                        [
                            -104.941421,
                            30.320549
                        ],
                        [
                            -105.000463,
                            30.124578
                        ],
                        [
                            -105.088116,
                            30.144028
                        ],
                        [
                            -105.090904,
                            30.134062
                        ],
                        [
                            -105.25431,
                            30.170743
                        ],
                        [
                            -105.233968,
                            30.231627
                        ],
                        [
                            -105.132159,
                            30.20848
                        ],
                        [
                            -105.130136,
                            30.215007
                        ],
                        [
                            -105.180838,
                            30.227302
                        ],
                        [
                            -105.138426,
                            30.365559
                        ]
                        ]
                    ],
                    "type": "Polygon"
                    },
                    "id": "831f60761ce030bf27ea78ba736e0440"
                }
                ],
                "type": "FeatureCollection"
            }
        }
    },
    "layers": [
        {
            "id": "background",
            "type": "background",
            "paint": {"background-color": "#f0f0f0"}
        },
        {
            "source": "buildings",
            "id": "buildings",
            "type": "fill",
            "minzoom": 5.5,
            "paint": {
                "fill-color": "#fff",
                "fill-opacity": [
                    "interpolate",
                    ["linear"],
                    ["zoom"],
                    5.5,
                    0,
                    6,
                    1
                ]
            }
        }
    ]
}

But when I try to upload it to Mapbox studio, I get an error as bellow
Screen Shot 2020-07-01 at 5 53 15 PM

I am not sure what the problem is, if not a bug.

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions