@foodmarketmaker/mapag 0.0.48 → 0.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/foodmarketmaker-mapag.mjs +288 -304
- package/fesm2022/foodmarketmaker-mapag.mjs.map +1 -1
- package/index.d.ts +22 -16
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { NgZone, AfterViewInit, OnDestroy, ElementRef, Signal, OnInit } from '@angular/core';
|
|
3
|
-
import
|
|
4
|
-
import { StyleSpecification, Map as Map$1, SourceSpecification, LayerSpecification, GeoJSONFeature, MapMouseEvent, PointLike, MapTouchEvent, MapSourceDataEvent, MapGeoJSONFeature, Popup, ExpressionFilterSpecification, MapLayerMouseEvent as MapLayerMouseEvent$1, MapLayerTouchEvent as MapLayerTouchEvent$1, PositionAnchor, SymbolLayerSpecification, FillLayerSpecification, LineLayerSpecification, CircleLayerSpecification } from 'maplibre-gl';
|
|
3
|
+
import { StyleSpecification, Map as Map$1, SourceSpecification, LayerSpecification, MapGeoJSONFeature, GeoJSONFeature, MapMouseEvent, Popup, LngLat, PointLike, MapTouchEvent, MapSourceDataEvent, ExpressionFilterSpecification, PositionAnchor, SymbolLayerSpecification, FillLayerSpecification, LineLayerSpecification, CircleLayerSpecification } from 'maplibre-gl';
|
|
5
4
|
import * as rxjs from 'rxjs';
|
|
6
5
|
import { Subject, Subscription } from 'rxjs';
|
|
7
6
|
import * as geojson from 'geojson';
|
|
8
7
|
import { Feature, MultiPolygon, BBox, Polygon } from 'geojson';
|
|
8
|
+
import { Point } from 'kt-maplibre-gl';
|
|
9
9
|
import MapboxDraw, { DrawCreateEvent } from 'maplibre-gl-draw';
|
|
10
10
|
import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
|
|
11
11
|
import { PMTiles } from 'pmtiles';
|
|
@@ -93,6 +93,7 @@ interface MapboxMapper {
|
|
|
93
93
|
count: number;
|
|
94
94
|
total: number;
|
|
95
95
|
onStyleChange?(map: Map$1, svc: MapService): void;
|
|
96
|
+
renderPopup?(f: MapGeoJSONFeature): string | undefined;
|
|
96
97
|
}
|
|
97
98
|
declare class MapboxMapperGroup<T extends MapboxMapper> implements MapboxMapper {
|
|
98
99
|
map: Map$1 | undefined;
|
|
@@ -108,6 +109,7 @@ declare class MapboxMapperGroup<T extends MapboxMapper> implements MapboxMapper
|
|
|
108
109
|
onReady(map: Map$1, svc: MapService): void;
|
|
109
110
|
reset(): void;
|
|
110
111
|
clear(): void;
|
|
112
|
+
renderPopup(f: MapGeoJSONFeature): string | undefined;
|
|
111
113
|
}
|
|
112
114
|
interface LegendDesc {
|
|
113
115
|
id: string;
|
|
@@ -229,6 +231,8 @@ declare class MapService {
|
|
|
229
231
|
setDefaultCursor(): void;
|
|
230
232
|
setCrosshairCursor(): void;
|
|
231
233
|
setPointerCursor(): void;
|
|
234
|
+
currentPopup: Popup | null;
|
|
235
|
+
handleMapClick(point: Point, lngLat: LngLat): void;
|
|
232
236
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MapService, never>;
|
|
233
237
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MapService>;
|
|
234
238
|
}
|
|
@@ -910,7 +914,7 @@ declare class AreaMapperMapper implements MapboxMapper {
|
|
|
910
914
|
setAreaType(type: string): void;
|
|
911
915
|
load(): Promise<void>;
|
|
912
916
|
fixZoom(): void;
|
|
913
|
-
renderPopup(
|
|
917
|
+
renderPopup(feature: MapGeoJSONFeature): string | undefined;
|
|
914
918
|
useStat(id: string, stats: {
|
|
915
919
|
id: string;
|
|
916
920
|
name: string;
|
|
@@ -1000,7 +1004,7 @@ interface MapAreaSelection {
|
|
|
1000
1004
|
}
|
|
1001
1005
|
declare function discoverLayers(pmtilesUrl: string): Promise<string[]>;
|
|
1002
1006
|
declare function sampleTilesForLayers(pmtiles: PMTiles): Promise<string[]>;
|
|
1003
|
-
declare function pmtilesPixelInfo(url: string, map: Map$1,
|
|
1007
|
+
declare function pmtilesPixelInfo(url: string, map: Map$1, lngLat: LngLat): Promise<Uint8ClampedArray | undefined>;
|
|
1004
1008
|
declare function propertiesToTableHtml(properties: {
|
|
1005
1009
|
[key: string]: any;
|
|
1006
1010
|
}): string;
|
|
@@ -1227,6 +1231,7 @@ declare class CropSequenceMapper implements MapboxMapper {
|
|
|
1227
1231
|
update(settings: Partial<CropSequenceSettings>): void;
|
|
1228
1232
|
private _update;
|
|
1229
1233
|
private create;
|
|
1234
|
+
renderPopup(feature: MapGeoJSONFeature): string | undefined;
|
|
1230
1235
|
lookupClass(code: string | number): string | undefined;
|
|
1231
1236
|
lookup(code: string | number): CroplandType | undefined;
|
|
1232
1237
|
onReady(map: Map$1, svc: MapService): Promise<void>;
|
|
@@ -1236,7 +1241,6 @@ declare class CropSequenceMapper implements MapboxMapper {
|
|
|
1236
1241
|
count: number;
|
|
1237
1242
|
total: number;
|
|
1238
1243
|
map: Map$1 | undefined;
|
|
1239
|
-
popup: Popup | null;
|
|
1240
1244
|
}
|
|
1241
1245
|
declare class CropSequenceSettings {
|
|
1242
1246
|
visible: boolean;
|
|
@@ -1344,7 +1348,7 @@ declare class NaicsMapper implements MapboxMapper {
|
|
|
1344
1348
|
private geoJsonUrl;
|
|
1345
1349
|
private geoJsonResource;
|
|
1346
1350
|
constructor(settings?: Partial<NaicsMapperSettings>, id?: string | undefined);
|
|
1347
|
-
data: _angular_core.Signal<
|
|
1351
|
+
data: _angular_core.Signal<MapGeoJSONFeature[] | Feature<geojson.Geometry, geojson.GeoJsonProperties>[]>;
|
|
1348
1352
|
update(settings: Partial<NaicsMapperSettings>): void;
|
|
1349
1353
|
private _update;
|
|
1350
1354
|
onReady(map: Map$1, svc: MapService): void;
|
|
@@ -1361,8 +1365,8 @@ declare class NaicsMapper implements MapboxMapper {
|
|
|
1361
1365
|
filter(map: Map$1, settings: NaicsMapperSettings): void;
|
|
1362
1366
|
getSettings(): NaicsMapperSettings;
|
|
1363
1367
|
flyToFeature(f: Feature): void;
|
|
1364
|
-
|
|
1365
|
-
|
|
1368
|
+
renderPopup(f: MapGeoJSONFeature): string | undefined;
|
|
1369
|
+
renderInfo(f: Feature): string | undefined;
|
|
1366
1370
|
}
|
|
1367
1371
|
type NaicsCode = Partial<NaicsMapperSettings> & {
|
|
1368
1372
|
ID: string;
|
|
@@ -1426,8 +1430,7 @@ declare class FoodhubMapper implements MapboxMapper {
|
|
|
1426
1430
|
getFipsFilter(): string[] | undefined;
|
|
1427
1431
|
filter(map: Map$1): void;
|
|
1428
1432
|
getSettings(): FoodhubMapperSettings;
|
|
1429
|
-
|
|
1430
|
-
renderPopup(f: Feature): Promise<string | undefined>;
|
|
1433
|
+
renderPopup(f: MapGeoJSONFeature): string | undefined;
|
|
1431
1434
|
semiToComma(input: string | undefined): string | undefined;
|
|
1432
1435
|
}
|
|
1433
1436
|
interface FoodHub {
|
|
@@ -1682,6 +1685,7 @@ declare class HardinessMapper implements MapboxMapper {
|
|
|
1682
1685
|
onStyleChange(map: Map$1, svc: MapService): Promise<void>;
|
|
1683
1686
|
constructor(settings?: Partial<HardinessSettings>);
|
|
1684
1687
|
create(): Promise<void>;
|
|
1688
|
+
renderPopup(feature: MapGeoJSONFeature): string | undefined;
|
|
1685
1689
|
update(newSettings: Partial<HardinessSettings>): void;
|
|
1686
1690
|
private _update;
|
|
1687
1691
|
legend: _angular_core.Signal<LegendItem[]>;
|
|
@@ -1874,8 +1878,8 @@ declare class NAASMapper implements MapboxMapper {
|
|
|
1874
1878
|
onReady(map: Map$1, svc: MapService): void;
|
|
1875
1879
|
reset(): void;
|
|
1876
1880
|
clear(): void;
|
|
1877
|
-
|
|
1878
|
-
RenderPopup(feature: GeoJSON.Feature, state: any):
|
|
1881
|
+
renderPopup(feature: MapGeoJSONFeature): string | undefined;
|
|
1882
|
+
RenderPopup(feature: GeoJSON.Feature, state: any): string | undefined;
|
|
1879
1883
|
}
|
|
1880
1884
|
declare function FipsFromDataSet(ds: TabularDataSetP, rowIndex: number): string | null;
|
|
1881
1885
|
declare function DataSetFieldValue(ds: TabularDataSetP, rowIndex: number, field: string): string | number | null;
|
|
@@ -1932,7 +1936,7 @@ type PointData = {
|
|
|
1932
1936
|
bboxFilter?: BBox;
|
|
1933
1937
|
};
|
|
1934
1938
|
interface PopupRenderer {
|
|
1935
|
-
RenderPopup(feature: GeoJSON.Feature):
|
|
1939
|
+
RenderPopup(feature: GeoJSON.Feature): string | undefined;
|
|
1936
1940
|
}
|
|
1937
1941
|
declare function isGeoloader(obj: any): obj is Geoloader;
|
|
1938
1942
|
declare function isMultiPolygon(obj: any): obj is MultiPolygon;
|
|
@@ -2010,7 +2014,8 @@ declare class PointDataMapper implements MapboxMapper {
|
|
|
2010
2014
|
private geoJsonResource;
|
|
2011
2015
|
dataCnt: number;
|
|
2012
2016
|
constructor(popupRenderer?: PopupRenderer, settings?: Partial<PointDataMapperSettings>);
|
|
2013
|
-
data: _angular_core.Signal<
|
|
2017
|
+
data: _angular_core.Signal<MapGeoJSONFeature[] | geojson.Feature<geojson.Geometry, geojson.GeoJsonProperties>[]>;
|
|
2018
|
+
renderPopup(f: MapGeoJSONFeature): string | undefined;
|
|
2014
2019
|
update(settings: Partial<PointDataMapperSettings>): void;
|
|
2015
2020
|
private _update;
|
|
2016
2021
|
private loadIcon;
|
|
@@ -2027,7 +2032,6 @@ declare class PointDataMapper implements MapboxMapper {
|
|
|
2027
2032
|
private createCircleLayers;
|
|
2028
2033
|
private createHeatLayers;
|
|
2029
2034
|
private createIconLayers;
|
|
2030
|
-
onClick: (e: MapLayerMouseEvent$1 | MapLayerTouchEvent$1) => Promise<void>;
|
|
2031
2035
|
getSettings(): PointDataMapperSettings;
|
|
2032
2036
|
}
|
|
2033
2037
|
interface PointDataClusterProperties {
|
|
@@ -2059,6 +2063,7 @@ declare class RailroadsMapper implements MapboxMapper {
|
|
|
2059
2063
|
updateUsageSettings(key: UsageKey, usageSettings: Partial<RailroadUsageSettings>): void;
|
|
2060
2064
|
private _update;
|
|
2061
2065
|
private create;
|
|
2066
|
+
renderPopup(feature: MapGeoJSONFeature): string | undefined;
|
|
2062
2067
|
fmtDistance(km: number | undefined): string;
|
|
2063
2068
|
onReady(map: Map$1, svc: MapService): Promise<void>;
|
|
2064
2069
|
reset(): void;
|
|
@@ -2181,6 +2186,7 @@ declare class WatershedMapper implements MapboxMapper {
|
|
|
2181
2186
|
update(settings: Partial<WatershedSettings>): void;
|
|
2182
2187
|
private _update;
|
|
2183
2188
|
private create;
|
|
2189
|
+
renderPopup(feature: MapGeoJSONFeature): string | undefined;
|
|
2184
2190
|
onReady(map: Map$1, svc: MapService): Promise<void>;
|
|
2185
2191
|
reset(): void;
|
|
2186
2192
|
clear(): void;
|
|
@@ -2818,7 +2824,7 @@ declare class MMPanel implements OnDestroy {
|
|
|
2818
2824
|
}
|
|
2819
2825
|
declare class MarketMakerPopupRenderer implements PopupRenderer {
|
|
2820
2826
|
RenderPopupSync(feature: GeoJSON.Feature): string | undefined;
|
|
2821
|
-
RenderPopup(feature:
|
|
2827
|
+
RenderPopup(feature: MapGeoJSONFeature): string | undefined;
|
|
2822
2828
|
private getArrayProperty;
|
|
2823
2829
|
private parseArrayProperty;
|
|
2824
2830
|
}
|