mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-30 02:01:46 +00:00
refactor: GeoJSON.Geometry instead of custom Geometry union type
This commit is contained in:
Vendored
+6
-8
@@ -63,9 +63,9 @@ declare namespace mapboxgl {
|
||||
|
||||
isRotating(): boolean;
|
||||
|
||||
queryRenderedFeatures(pointOrBox?: PointLike | PointLike[], parameters?: { layers?: string[], filter?: any[] }): GeoJSON.Feature<GeoJSONGeometry>[];
|
||||
queryRenderedFeatures(pointOrBox?: PointLike | PointLike[], parameters?: { layers?: string[], filter?: any[] }): GeoJSON.Feature<GeoJSON.Geometry>[];
|
||||
|
||||
querySourceFeatures(sourceID: string, parameters?: { sourceLayer?: string, filter?: any[] }): GeoJSON.Feature<GeoJSONGeometry>[];
|
||||
querySourceFeatures(sourceID: string, parameters?: { sourceLayer?: string, filter?: any[] }): GeoJSON.Feature<GeoJSON.Geometry>[];
|
||||
|
||||
setStyle(style: mapboxgl.Style | string, options?: { diff?: boolean, localIdeographFontFamily?: string }): this;
|
||||
|
||||
@@ -530,8 +530,6 @@ declare namespace mapboxgl {
|
||||
type: 'vector' | 'raster' | 'raster-dem' | 'geojson' | 'image' | 'video' | 'canvas';
|
||||
}
|
||||
|
||||
export type GeoJSONGeometry = GeoJSON.Point | GeoJSON.LineString | GeoJSON.MultiPoint | GeoJSON.Polygon | GeoJSON.MultiLineString | GeoJSON.MultiPolygon | GeoJSON.GeometryCollection;
|
||||
|
||||
/**
|
||||
* GeoJSONSource
|
||||
*/
|
||||
@@ -545,17 +543,17 @@ declare namespace mapboxgl {
|
||||
|
||||
constructor(options?: mapboxgl.GeoJSONSourceOptions);
|
||||
|
||||
setData(data: GeoJSON.Feature<GeoJSONGeometry> | GeoJSON.FeatureCollection<GeoJSONGeometry> | String): this;
|
||||
setData(data: GeoJSON.Feature<GeoJSON.Geometry> | GeoJSON.FeatureCollection<GeoJSON.Geometry> | String): this;
|
||||
|
||||
getClusterExpansionZoom(clusterId: number, callback: (error: any, zoom: number) => void): this;
|
||||
|
||||
getClusterChildren(clusterId: number, callback: (error: any, features: GeoJSON.Feature<GeoJSONGeometry>[]) => void): this;
|
||||
getClusterChildren(clusterId: number, callback: (error: any, features: GeoJSON.Feature<GeoJSON.Geometry>[]) => void): this;
|
||||
|
||||
getClusterLeaves(cluserId: number, limit: number, offset: number, callback: (error: any, features: GeoJSON.Feature<GeoJSONGeometry>[]) => void): this;
|
||||
getClusterLeaves(cluserId: number, limit: number, offset: number, callback: (error: any, features: GeoJSON.Feature<GeoJSON.Geometry>[]) => void): this;
|
||||
}
|
||||
|
||||
export interface GeoJSONSourceOptions {
|
||||
data?: GeoJSON.Feature<GeoJSONGeometry> | GeoJSON.FeatureCollection<GeoJSONGeometry> | string;
|
||||
data?: GeoJSON.Feature<GeoJSON.Geometry> | GeoJSON.FeatureCollection<GeoJSON.Geometry> | string;
|
||||
|
||||
maxzoom?: number;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user