@foodmarketmaker/mapag 0.0.4 → 0.0.6
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 +272 -117
- package/fesm2022/foodmarketmaker-mapag.mjs.map +1 -1
- package/index.d.ts +71 -2
- package/package.json +4 -1
package/index.d.ts
CHANGED
|
@@ -397,7 +397,7 @@ interface ColorPalette {
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
declare function SaveMap(map: Map$1): void;
|
|
400
|
-
declare function AddLayer(map: Map$1 | undefined, layer: any, afterId?: string):
|
|
400
|
+
declare function AddLayer(map: Map$1 | undefined, layer: any, afterId?: string): boolean;
|
|
401
401
|
declare function RemoveLayer(map: Map$1 | undefined, layerId: string): void;
|
|
402
402
|
declare function AddSource(map: Map$1 | undefined, sourceId: string, source: any): void;
|
|
403
403
|
declare function RemoveSource(map: Map$1 | undefined, sourceId: string): void;
|
|
@@ -607,11 +607,32 @@ interface CensusTract {
|
|
|
607
607
|
GeoID: string;
|
|
608
608
|
}
|
|
609
609
|
|
|
610
|
+
declare class LayerSettings {
|
|
611
|
+
visible: boolean;
|
|
612
|
+
}
|
|
613
|
+
declare class PolygonLayerSettings extends LayerSettings {
|
|
614
|
+
fillColor: string;
|
|
615
|
+
fillOpacity: number;
|
|
616
|
+
opacity: number;
|
|
617
|
+
borderColor: string;
|
|
618
|
+
borderWidth: number;
|
|
619
|
+
borderOpacity: number;
|
|
620
|
+
}
|
|
621
|
+
|
|
610
622
|
declare class HardinessMapper implements MapboxMapper {
|
|
623
|
+
LAYER_ID: string;
|
|
624
|
+
SOURCE_ID: string;
|
|
625
|
+
SOURCE_LAYER: string;
|
|
626
|
+
PMTILES_URL: string;
|
|
611
627
|
current: Popup | null;
|
|
612
628
|
currentFeatureID: string | number | undefined;
|
|
613
629
|
over: _angular_core.WritableSignal<geojson.Feature<geojson.Geometry, geojson.GeoJsonProperties> | null>;
|
|
630
|
+
settings: _angular_core.WritableSignal<HardinessSettings>;
|
|
614
631
|
onStyleChange(map: Map$1, svc: MapService): Promise<void>;
|
|
632
|
+
constructor();
|
|
633
|
+
create(): Promise<void>;
|
|
634
|
+
update(newSettings: HardinessSettings): void;
|
|
635
|
+
private _update;
|
|
615
636
|
onReady(map: Map$1, svc: MapService): Promise<void>;
|
|
616
637
|
reset(): void;
|
|
617
638
|
clear(): void;
|
|
@@ -621,6 +642,37 @@ declare class HardinessMapper implements MapboxMapper {
|
|
|
621
642
|
map: Map$1 | undefined;
|
|
622
643
|
popup: Popup | null;
|
|
623
644
|
}
|
|
645
|
+
declare class HardinessSettings extends PolygonLayerSettings {
|
|
646
|
+
zone1a: string;
|
|
647
|
+
zone1b: string;
|
|
648
|
+
zone2a: string;
|
|
649
|
+
zone2b: string;
|
|
650
|
+
zone3a: string;
|
|
651
|
+
zone3b: string;
|
|
652
|
+
zone4a: string;
|
|
653
|
+
zone4b: string;
|
|
654
|
+
zone5a: string;
|
|
655
|
+
zone5b: string;
|
|
656
|
+
zone6a: string;
|
|
657
|
+
zone6b: string;
|
|
658
|
+
zone7a: string;
|
|
659
|
+
zone7b: string;
|
|
660
|
+
zone8a: string;
|
|
661
|
+
zone8b: string;
|
|
662
|
+
zone9a: string;
|
|
663
|
+
zone9b: string;
|
|
664
|
+
zone10a: string;
|
|
665
|
+
zone10b: string;
|
|
666
|
+
zone11a: string;
|
|
667
|
+
zone11b: string;
|
|
668
|
+
zone12a: string;
|
|
669
|
+
zone12b: string;
|
|
670
|
+
zone13a: string;
|
|
671
|
+
zone13b: string;
|
|
672
|
+
fillColor: string;
|
|
673
|
+
fillOpacity: number;
|
|
674
|
+
borderOpacity: number;
|
|
675
|
+
}
|
|
624
676
|
|
|
625
677
|
declare class StandardLayersMapper implements MapboxMapper {
|
|
626
678
|
static readonly EMPTY_SOURCE = "empty";
|
|
@@ -667,9 +719,18 @@ interface VectorTileServerSource {
|
|
|
667
719
|
}
|
|
668
720
|
|
|
669
721
|
declare class WatershedMapper implements MapboxMapper {
|
|
722
|
+
FILL_LAYER_ID: string;
|
|
723
|
+
LINE_LAYER_ID: string;
|
|
724
|
+
SOURCE_ID: string;
|
|
725
|
+
SOURCE_LAYER: string;
|
|
726
|
+
settings: _angular_core.WritableSignal<WatershedSettings>;
|
|
670
727
|
current: Popup | null;
|
|
671
728
|
currentFeatureID: string | number | undefined;
|
|
672
729
|
over: _angular_core.WritableSignal<geojson.Feature<geojson.Geometry, geojson.GeoJsonProperties> | null>;
|
|
730
|
+
constructor();
|
|
731
|
+
update(settings: WatershedSettings): void;
|
|
732
|
+
private _update;
|
|
733
|
+
private create;
|
|
673
734
|
onReady(map: Map$1, svc: MapService): Promise<void>;
|
|
674
735
|
reset(): void;
|
|
675
736
|
clear(): void;
|
|
@@ -679,6 +740,14 @@ declare class WatershedMapper implements MapboxMapper {
|
|
|
679
740
|
map: Map$1 | undefined;
|
|
680
741
|
popup: Popup | null;
|
|
681
742
|
}
|
|
743
|
+
declare class WatershedSettings {
|
|
744
|
+
visible: boolean;
|
|
745
|
+
fillColor: string;
|
|
746
|
+
fillOpacity: number;
|
|
747
|
+
borderColor: string;
|
|
748
|
+
borderWidth: number;
|
|
749
|
+
borderOpacity: number;
|
|
750
|
+
}
|
|
682
751
|
|
|
683
752
|
declare class HttpBoundaryLoader implements Geoloader {
|
|
684
753
|
static NewCustom(http: HttpClient, path: string): HttpBoundaryLoader;
|
|
@@ -697,5 +766,5 @@ declare class HttpBoundaryLoader implements Geoloader {
|
|
|
697
766
|
loadGeoJson(url: string, geofield: string): Promise<MultiPolygon | undefined>;
|
|
698
767
|
}
|
|
699
768
|
|
|
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 };
|
|
769
|
+
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
770
|
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.6",
|
|
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",
|