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

Composite Catalog Endpoint Only Showing First Source #652

Closed
jtwiest opened this issue May 1, 2023 · 5 comments · Fixed by #653
Closed

Composite Catalog Endpoint Only Showing First Source #652

jtwiest opened this issue May 1, 2023 · 5 comments · Fixed by #653

Comments

@jtwiest
Copy link

jtwiest commented May 1, 2023

Using version 0.8.0

We're using composite sources and the catalog endpoint only seems to be listed the first vector layer vs. all of them. The tiles endpoint with the same composite sources does render all of the correct layers. Below you can see I'm requesting a composite of tiles.layer_one and tiles.layer_two, it's confirmed Martin sees both layers since they're listed in the tiles url in the response however the vector_layers array only lists the first composite layer tiles.layer_one vs. both.

curl localhost:3000/tiles.layer_one,tiles.layer_two

{
    "tilejson": "3.0.0",
    "tiles": [
        "http://localhost:3000/tiles.layer_one,tiles.layer_two/{z}/{x}/{y}"
    ],
    "vector_layers": [
        {
            "id": "tiles.layer_one",
            "fields": {
                ...
            }
        }
    ],
    "bounds": [
        ...
    ],
    "description": "tiles.layer_one.geom",
    "name": "tiles.layer_one"
}

When using mapbox this does actually appear to work fine, both layers one and two are available to the user. The downside however is that every time I try to add layer two as a layer to the map, I get the following error:

Error: Source layer "tiles.layer_two" does not exist on source "my_source" as specified by style layer "layer_two"

@nyurik
Copy link
Member

nyurik commented May 1, 2023

@jtwiest I'm not sure I understood. You ask for two "Tile Sources" - which is different from "MVT layers" -- each tile source can have more than one layers. Each MVT layer should have its own object in the vector_layers array. When asking for merged tile sources, vector_layers should in theory merge as well. Are you saying it does not?

nyurik added a commit to nyurik/martin that referenced this issue May 2, 2023
Improve merging of multiple tilejsons

Fix maplibre#652
@nyurik
Copy link
Member

nyurik commented May 2, 2023

I think i found the issue, fixed in #653

nyurik added a commit that referenced this issue May 2, 2023
Improve merging of multiple tilejsons

Fix #652
@jtwiest
Copy link
Author

jtwiest commented May 4, 2023

Looks like that fixed it! Thank you @nyurik

@nyurik
Copy link
Member

nyurik commented May 4, 2023

sure, i still need to do a release (we have had some issues with the docker for mac, so may have to revert that part)

@nyurik
Copy link
Member

nyurik commented May 9, 2023

released as 0.8.2

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

Successfully merging a pull request may close this issue.

2 participants