mirror of
https://github.com/maputnik/editor.git
synced 2026-01-21 12:50:02 +00:00
Add PMTiles support (#938)
Add support for pmtiles sources. Solves #807 <strike> There is still an error, probably when adding the source to the Maputnik sources: ``` Failed to process sources for 'pmtiles://https://example.com/data/switzerland.pmtiles' TypeError: NetworkError when attempting to fetch resource. fetchSources App.tsx:642 ``` @bdon How did you solve this for https://editor.protomaps.com/ ? </strike> --------- Co-authored-by: Brandon Liu <bdon@bdon.org> Co-authored-by: WebFreak001 <gh@webfreak.org> Co-authored-by: ShellyDCMS <60476837+ShellyDCMS@users.noreply.github.com> Co-authored-by: Harel M <harel.mazor@gmail.com>
This commit is contained in:
@@ -83,6 +83,24 @@ describe("modals", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("add new pmtiles source", () => {
|
||||
const sourceId = "pmtilestest";
|
||||
when.setValue("modal:sources.add.source_id", sourceId);
|
||||
when.select("modal:sources.add.source_type", "pmtiles_vector");
|
||||
when.setValue("modal:sources.add.source_url", "https://data.source.coop/protomaps/openstreetmap/v4.pmtiles");
|
||||
when.click("modal:sources.add.add_source");
|
||||
when.click("modal:sources.add.add_source");
|
||||
when.wait(200);
|
||||
then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
sources: {
|
||||
pmtilestest: {
|
||||
type: "vector",
|
||||
url: "pmtiles://https://data.source.coop/protomaps/openstreetmap/v4.pmtiles",
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("add new raster source", () => {
|
||||
const sourceId = "rastertest";
|
||||
when.setValue("modal:sources.add.source_id", sourceId);
|
||||
|
||||
Reference in New Issue
Block a user