Add supported media type list to feature formats
This commit is contained in:
@@ -76,6 +76,12 @@ class FeatureFormat {
|
||||
* @type {import("../proj/Projection.js").default|undefined}
|
||||
*/
|
||||
this.defaultFeatureProjection = undefined;
|
||||
|
||||
/**
|
||||
* A list media types supported by the format in descending order of preference.
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
this.supportedMediaTypes = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -132,6 +132,8 @@ class GMLBase extends XMLFeature {
|
||||
'featureMember': makeArrayPusher(this.readFeaturesInternal),
|
||||
'featureMembers': makeReplacer(this.readFeaturesInternal),
|
||||
};
|
||||
|
||||
this.supportedMediaTypes = ['application/gml+xml'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,6 +82,11 @@ class GeoJSON extends JSONFeature {
|
||||
* @private
|
||||
*/
|
||||
this.extractGeometryName_ = options.extractGeometryName;
|
||||
|
||||
this.supportedMediaTypes = [
|
||||
'application/geo+json',
|
||||
'application/vnd.geo+json',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -489,6 +489,8 @@ class KML extends XMLFeature {
|
||||
this.iconUrlFunction_ = options.iconUrlFunction
|
||||
? options.iconUrlFunction
|
||||
: defaultIconUrlFunction;
|
||||
|
||||
this.supportedMediaTypes = ['application/vnd.google-earth.kml+xml'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -89,6 +89,11 @@ class MVT extends FeatureFormat {
|
||||
* @type {string}
|
||||
*/
|
||||
this.idProperty_ = options.idProperty;
|
||||
|
||||
this.supportedMediaTypes = [
|
||||
'application/vnd.mapbox-vector-tile',
|
||||
'application/x-protobuf',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user