@foodmarketmaker/mapag 0.0.5 → 0.0.8
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/README.md +50 -2
- package/copy-assets.js +53 -0
- package/fesm2022/foodmarketmaker-mapag.mjs +309 -146
- package/fesm2022/foodmarketmaker-mapag.mjs.map +1 -1
- package/index.d.ts +73 -3
- package/package.json +4 -1
package/index.d.ts
CHANGED
|
@@ -291,6 +291,7 @@ declare class MapComponent implements AfterViewInit, OnDestroy {
|
|
|
291
291
|
readonly mapper: _angular_core.InputSignal<MapboxMapperGroup<any>>;
|
|
292
292
|
readonly mapContainer: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
293
293
|
readonly id: _angular_core.InputSignal<string>;
|
|
294
|
+
readonly onMap: _angular_core.OutputEmitterRef<Map$1>;
|
|
294
295
|
faPrint: _fortawesome_fontawesome_common_types.IconDefinition;
|
|
295
296
|
map: maplibregl.Map | undefined;
|
|
296
297
|
svc: MapService;
|
|
@@ -303,7 +304,7 @@ declare class MapComponent implements AfterViewInit, OnDestroy {
|
|
|
303
304
|
private initializeMap;
|
|
304
305
|
saveImage(): void;
|
|
305
306
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MapComponent, never>;
|
|
306
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MapComponent, "mapag-map", never, { "mapper": { "alias": "mapper"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
307
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MapComponent, "mapag-map", never, { "mapper": { "alias": "mapper"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; }, { "onMap": "onMap"; }, never, ["*"], true, never>;
|
|
307
308
|
}
|
|
308
309
|
|
|
309
310
|
declare class BasemapSelectMenu {
|
|
@@ -397,7 +398,7 @@ interface ColorPalette {
|
|
|
397
398
|
}
|
|
398
399
|
|
|
399
400
|
declare function SaveMap(map: Map$1): void;
|
|
400
|
-
declare function AddLayer(map: Map$1 | undefined, layer: any, afterId?: string):
|
|
401
|
+
declare function AddLayer(map: Map$1 | undefined, layer: any, afterId?: string): boolean;
|
|
401
402
|
declare function RemoveLayer(map: Map$1 | undefined, layerId: string): void;
|
|
402
403
|
declare function AddSource(map: Map$1 | undefined, sourceId: string, source: any): void;
|
|
403
404
|
declare function RemoveSource(map: Map$1 | undefined, sourceId: string): void;
|
|
@@ -607,11 +608,32 @@ interface CensusTract {
|
|
|
607
608
|
GeoID: string;
|
|
608
609
|
}
|
|
609
610
|
|
|
611
|
+
declare class LayerSettings {
|
|
612
|
+
visible: boolean;
|
|
613
|
+
}
|
|
614
|
+
declare class PolygonLayerSettings extends LayerSettings {
|
|
615
|
+
fillColor: string;
|
|
616
|
+
fillOpacity: number;
|
|
617
|
+
opacity: number;
|
|
618
|
+
borderColor: string;
|
|
619
|
+
borderWidth: number;
|
|
620
|
+
borderOpacity: number;
|
|
621
|
+
}
|
|
622
|
+
|
|
610
623
|
declare class HardinessMapper implements MapboxMapper {
|
|
624
|
+
LAYER_ID: string;
|
|
625
|
+
SOURCE_ID: string;
|
|
626
|
+
SOURCE_LAYER: string;
|
|
627
|
+
PMTILES_URL: string;
|
|
611
628
|
current: Popup | null;
|
|
612
629
|
currentFeatureID: string | number | undefined;
|
|
613
630
|
over: _angular_core.WritableSignal<geojson.Feature<geojson.Geometry, geojson.GeoJsonProperties> | null>;
|
|
631
|
+
settings: _angular_core.WritableSignal<HardinessSettings>;
|
|
614
632
|
onStyleChange(map: Map$1, svc: MapService): Promise<void>;
|
|
633
|
+
constructor();
|
|
634
|
+
create(): Promise<void>;
|
|
635
|
+
update(newSettings: HardinessSettings): void;
|
|
636
|
+
private _update;
|
|
615
637
|
onReady(map: Map$1, svc: MapService): Promise<void>;
|
|
616
638
|
reset(): void;
|
|
617
639
|
clear(): void;
|
|
@@ -621,6 +643,37 @@ declare class HardinessMapper implements MapboxMapper {
|
|
|
621
643
|
map: Map$1 | undefined;
|
|
622
644
|
popup: Popup | null;
|
|
623
645
|
}
|
|
646
|
+
declare class HardinessSettings extends PolygonLayerSettings {
|
|
647
|
+
zone1a: string;
|
|
648
|
+
zone1b: string;
|
|
649
|
+
zone2a: string;
|
|
650
|
+
zone2b: string;
|
|
651
|
+
zone3a: string;
|
|
652
|
+
zone3b: string;
|
|
653
|
+
zone4a: string;
|
|
654
|
+
zone4b: string;
|
|
655
|
+
zone5a: string;
|
|
656
|
+
zone5b: string;
|
|
657
|
+
zone6a: string;
|
|
658
|
+
zone6b: string;
|
|
659
|
+
zone7a: string;
|
|
660
|
+
zone7b: string;
|
|
661
|
+
zone8a: string;
|
|
662
|
+
zone8b: string;
|
|
663
|
+
zone9a: string;
|
|
664
|
+
zone9b: string;
|
|
665
|
+
zone10a: string;
|
|
666
|
+
zone10b: string;
|
|
667
|
+
zone11a: string;
|
|
668
|
+
zone11b: string;
|
|
669
|
+
zone12a: string;
|
|
670
|
+
zone12b: string;
|
|
671
|
+
zone13a: string;
|
|
672
|
+
zone13b: string;
|
|
673
|
+
fillColor: string;
|
|
674
|
+
fillOpacity: number;
|
|
675
|
+
borderOpacity: number;
|
|
676
|
+
}
|
|
624
677
|
|
|
625
678
|
declare class StandardLayersMapper implements MapboxMapper {
|
|
626
679
|
static readonly EMPTY_SOURCE = "empty";
|
|
@@ -667,9 +720,18 @@ interface VectorTileServerSource {
|
|
|
667
720
|
}
|
|
668
721
|
|
|
669
722
|
declare class WatershedMapper implements MapboxMapper {
|
|
723
|
+
FILL_LAYER_ID: string;
|
|
724
|
+
LINE_LAYER_ID: string;
|
|
725
|
+
SOURCE_ID: string;
|
|
726
|
+
SOURCE_LAYER: string;
|
|
727
|
+
settings: _angular_core.WritableSignal<WatershedSettings>;
|
|
670
728
|
current: Popup | null;
|
|
671
729
|
currentFeatureID: string | number | undefined;
|
|
672
730
|
over: _angular_core.WritableSignal<geojson.Feature<geojson.Geometry, geojson.GeoJsonProperties> | null>;
|
|
731
|
+
constructor();
|
|
732
|
+
update(settings: WatershedSettings): void;
|
|
733
|
+
private _update;
|
|
734
|
+
private create;
|
|
673
735
|
onReady(map: Map$1, svc: MapService): Promise<void>;
|
|
674
736
|
reset(): void;
|
|
675
737
|
clear(): void;
|
|
@@ -679,6 +741,14 @@ declare class WatershedMapper implements MapboxMapper {
|
|
|
679
741
|
map: Map$1 | undefined;
|
|
680
742
|
popup: Popup | null;
|
|
681
743
|
}
|
|
744
|
+
declare class WatershedSettings {
|
|
745
|
+
visible: boolean;
|
|
746
|
+
fillColor: string;
|
|
747
|
+
fillOpacity: number;
|
|
748
|
+
borderColor: string;
|
|
749
|
+
borderWidth: number;
|
|
750
|
+
borderOpacity: number;
|
|
751
|
+
}
|
|
682
752
|
|
|
683
753
|
declare class HttpBoundaryLoader implements Geoloader {
|
|
684
754
|
static NewCustom(http: HttpClient, path: string): HttpBoundaryLoader;
|
|
@@ -697,5 +767,5 @@ declare class HttpBoundaryLoader implements Geoloader {
|
|
|
697
767
|
loadGeoJson(url: string, geofield: string): Promise<MultiPolygon | undefined>;
|
|
698
768
|
}
|
|
699
769
|
|
|
700
|
-
export { AddLayer, AddSource, AreaMapperMapper, BackgroundMaskMapper, BaseMapLight, BasemapSelect, BasemapSelectMenu, CensusTractMapper, DrawingMapper, HardinessMapper, HttpBoundaryLoader, MapAreaSelectComponent, MapComponent, MapSelectionService, MapService, MapStyles, MapboxMapperGroup, NoOpMapper, RemoveLayer, RemoveSource, SaveMap, SelectMode, StandardLayersMapper, Styles, VectorTileServerMapper, WatershedMapper, discoverLayers, isGeoloader, isMultiPolygon, isNumber2DArray, isNumber3DArray, isPolygon, mapboxLoadImages, mapboxloadImage, sampleTilesForLayers, simpleClone, toMultiPolygon, trySync };
|
|
770
|
+
export { AddLayer, AddSource, AreaMapperMapper, BackgroundMaskMapper, BaseMapLight, BasemapSelect, BasemapSelectMenu, CensusTractMapper, DrawingMapper, HardinessMapper, HardinessSettings, HttpBoundaryLoader, MapAreaSelectComponent, MapComponent, MapSelectionService, MapService, MapStyles, MapboxMapperGroup, NoOpMapper, RemoveLayer, RemoveSource, SaveMap, SelectMode, StandardLayersMapper, Styles, VectorTileServerMapper, WatershedMapper, WatershedSettings, discoverLayers, isGeoloader, isMultiPolygon, isNumber2DArray, isNumber3DArray, isPolygon, mapboxLoadImages, mapboxloadImage, sampleTilesForLayers, simpleClone, toMultiPolygon, trySync };
|
|
701
771
|
export type { AreaSelectionType, CensusTract, CustomImage, CustomSourcesAndLayersData, DataCustomization, Geoloader, IMapboxSettings, LegendDesc, LegendItem, MapAreaSelectMode, MapAreaSelection, MapboxImage, MapboxLayerType, MapboxMapper, MapboxStyler, PointData, PointDataLoader, PointDataOptions, PopupRenderer, StyleData, VectorTileServerSource };
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foodmarketmaker/mapag",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Angular library for interactive maps with advanced geospatial features",
|
|
5
5
|
"author": "Food Market Maker",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mapag-copy-assets": "copy-assets.js"
|
|
9
|
+
},
|
|
7
10
|
"homepage": "https://github.com/foodmarketmaker/market-maker-website#readme",
|
|
8
11
|
"repository": {
|
|
9
12
|
"type": "git",
|