From 5ccb93bd5988f575e4d689a2747010d85d2f9fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 26 Feb 2019 22:20:12 +0100 Subject: [PATCH] Use the official IANA MIME-type and extension --- pbfplugin.json | 4 ++-- pkg/pbfplugin.xml | 9 +++++++++ src/pbfplugin.cpp | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 pkg/pbfplugin.xml diff --git a/pbfplugin.json b/pbfplugin.json index c5cc32e..2ccaac3 100644 --- a/pbfplugin.json +++ b/pbfplugin.json @@ -1,4 +1,4 @@ { - "Keys": [ "pbf" ], - "MimeTypes": [ "image/pbf" ] + "Keys": [ "mvt" ], + "MimeTypes": [ "application/vnd.mapbox-vector-tile" ] } diff --git a/pkg/pbfplugin.xml b/pkg/pbfplugin.xml new file mode 100644 index 0000000..2d2c009 --- /dev/null +++ b/pkg/pbfplugin.xml @@ -0,0 +1,9 @@ + + + + Mapbox Vector Tile + + + + + diff --git a/src/pbfplugin.cpp b/src/pbfplugin.cpp index 290bf1e..2011317 100644 --- a/src/pbfplugin.cpp +++ b/src/pbfplugin.cpp @@ -21,7 +21,7 @@ QImageIOPlugin::Capabilities PBFPlugin::capabilities(QIODevice *device, const QByteArray &format) const { if (device == 0) - return (format == "pbf") ? Capabilities(CanRead) : Capabilities(); + return (format == "mvt") ? Capabilities(CanRead) : Capabilities(); else return (device->isReadable() && PBFHandler::canRead(device)) ? Capabilities(CanRead) : Capabilities();