Update raws

This commit is contained in:
Alexandre Rieux committed 2018-10-13 21:22:05 +02:00
1 parent 6164d91953
commit a262ae030a
7 files changed
+14 -12

No files matched your search

+4 -2
View File
@@ -23,7 +23,9 @@ interface Route {
// tslint:disable-next-line:no-var-requires
const route: Route = require('./route.json');
const mappedRoute = route.points.map(point => [point.lat, point.lng]);
const mappedRoute = route.points.map(
point => [point.lat, point.lng] as [number, number]
);
const Map = ReactMapboxGl({ accessToken: token });
@@ -52,7 +54,7 @@ const multiPolygonPaint = {
};
export interface State {
center: number[];
center: [number, number];
circleRadius: number;
routeIndex: number;
zoom: [number];
+1 -1
View File
@@ -34,7 +34,7 @@ export interface Props {
}
class GeoJsonLayer extends React.Component<Props> {
private center = [-77.01239, 38.91275];
private center = [-77.01239, 38.91275] as [number, number];
// tslint:disable-next-line:no-any
private onClickCircle = (evt: any) => {
+1 -1
View File
@@ -55,7 +55,7 @@ const layerPaint = {
};
export default class Heatmap extends React.Component<Props> {
private center = [-0.109970527, 51.52916347];
private center = [-0.109970527, 51.52916347] as [number, number];
// tslint:disable-next-line:no-any
private onStyleLoad = (map: any) => {
+2 -2
View File
@@ -34,14 +34,14 @@ const mapStyle = {
export interface Place {
id: string;
name: string;
center: number[];
center: [number, number];
}
export interface State {
query: string;
options: Place[];
selected?: Place;
center: number[];
center: [number, number];
}
const req = (url: string, body?: any, method = 'GET') =>
+2 -2
View File
@@ -35,8 +35,8 @@ const StyledPopup = styled.div`
`;
export interface State {
fitBounds?: number[][];
center: number[];
fitBounds?: [[number, number], [number, number]];
center: [number, number];
zoom: [number];
station?: Station;
stations: StationDict;
+2 -2
View File
@@ -81,7 +81,7 @@ const switchStyles = Object.keys(styles).filter(k =>
export interface State {
styleKey: string;
featuresPostion: number[][];
mapCenter: number[];
mapCenter: [number, number];
renderLayer: boolean;
}
@@ -90,7 +90,7 @@ export interface Props {
onStyleLoad?: (map: any) => any;
}
const InitialUserPostion = [-0.2416815, 51.5285582];
const InitialUserPostion = [-0.2416815, 51.5285582] as [number, number];
class StyleUpdate extends React.Component<Props, State> {
public state: State = {
+2 -2
View File
@@ -28,11 +28,11 @@ export interface Props {
onStyleLoad?: (map: any) => any;
}
class ThreeDMap extends React.Component<Props, {}> {
class ThreeDMap extends React.Component<Props> {
private zoom: [number] = [15];
private bearing: [number] = [-60];
private pitch: [number] = [60];
private center = [-0.0824952, 51.5144951];
private center = [-0.0824952, 51.5144951] as [number, number];
// tslint:disable-next-line:no-any
private onStyleLoad = (map: any) => {