Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,18 @@ public class ApplicationMime extends MimeType {
"application/vnd.mapbox-vector-tile",
true);

static Set<ApplicationMime> ALL = ImmutableSet.of(bil16, bil32, json, topojson, geojson, utfgrid, mapboxVector);
public static final ApplicationMime maplibreVector = new ApplicationMime(
"application/vnd.maplibre-vector-tile",
"mlt",
"maplibre-vectortile",
"application/vnd.maplibre-vector-tile",
true);

static Set<ApplicationMime> ALL =
ImmutableSet.of(bil16, bil32, json, topojson, geojson, utfgrid, mapboxVector, maplibreVector);

private static final List<String> BINARY_FORMATS =
Arrays.asList(bil16.mimeType, bil32.mimeType, mapboxVector.mimeType, utfgrid.mimeType);
private static final List<String> BINARY_FORMATS = Arrays.asList(
bil16.mimeType, bil32.mimeType, mapboxVector.mimeType, maplibreVector.mimeType, utfgrid.mimeType);

private static Map<String, ApplicationMime> BY_FORMAT = Maps.uniqueIndex(ALL, mimeType -> mimeType.getFormat());

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package org.geowebcache.mime;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -55,5 +57,16 @@ public void testMapboxLegacyFormat() throws MimeException {
MimeType mime = MimeType.createFromFormat(ApplicationMime.MAPBOX_TILES_LEGACY_MIME);
assertNotNull(mime);
}

@Test
public void testMapLibreVectorFormat() throws MimeException {
MimeType mime = MimeType.createFromFormat("application/vnd.maplibre-vector-tile");
assertEquals(ApplicationMime.maplibreVector, mime);
assertEquals("mlt", mime.getFileExtension());
assertEquals("maplibre-vectortile", mime.getInternalName());
assertTrue(mime.isVector());
assertTrue(mime.isBinary());
assertFalse(mime.isInlinePreferred());
}
}
}
Loading