county-selection
Version:
This package contains a CountySelectionComponent class that displays a state map with county data on a \<county-selection\>\</county-selection> element. Currently state data is limited to "AL" and "AK".
96 lines (95 loc) • 2.75 kB
TypeScript
import { OnInit, ElementRef, EventEmitter } from '@angular/core';
export declare class CountySelectionComponent implements OnInit {
c: ElementRef;
alabamaData: {
"type": string;
"features": {
"type": string;
"geometry": {
"type": string;
"coordinates": number[][][];
};
"properties": {
"NAME": string;
};
}[];
};
arkansasData: {
"type": string;
"features": {
"type": string;
"geometry": {
"type": string;
"coordinates": number[][][];
};
"properties": {
"NAME": string;
};
}[];
};
stateData: any;
_selectedState: string;
selectedState: string;
_unselectedColor: string;
unselectedColor: string;
_hoverColor: string;
hoverColor: string;
_selectedColor: string;
selectedColor: string;
_backgroundColor: string;
backgroundColor: string;
countySelect: EventEmitter<string>;
_selectedCounty: string;
selectedCounty: string;
countyHover: EventEmitter<string>;
_hoverCounty: string;
hoverCounty: string;
_resolution: {
width: number;
height: number;
};
readonly resolution: {
width: number;
height: number;
};
width: number;
height: number;
_padding: number;
readonly mapPadding: number;
padding: number;
stateBounds: any;
ctx: any;
getMousePos(canvas: any, evt: any): {
x: number;
y: number;
};
isPointInBounds(p: any, bounds: any): boolean;
areIntersecting(v1x1: any, v1y1: any, v1x2: any, v1y2: any, v2x1: any, v2y1: any, v2x2: any, v2y2: any): boolean;
getStateBounds(): {
minX: number;
maxX: number;
minY: number;
maxY: number;
};
getCountyBounds(coords: any): {
minX: number;
maxX: number;
minY: number;
maxY: number;
};
remap(value: any, low1: any, high1: any, low2: any, high2: any): any;
mapScale(arr: any, bounds: any, resolution: any, padding: any): any;
styleHoverCounty(countyIndex: any): void;
styleUnselectedCounty(countyIndex: any): void;
styleSelectedCounty(countyIndex: any): void;
fillCounty(countyIndex: any): void;
draw(): void;
processStateData(): void;
deselectAllCounties(): void;
constructor();
ngOnInit(): void;
onMouseLeave(evt: any): void;
changeState(newState: any): void;
selectCounty(evt: any): void;
update(evt: any): void;
}