diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 0cd6a76..f4eb878 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -8,6 +8,8 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" + android:isGame="false" + android:appCategory="maps" android:theme="@style/AppTheme"> { + const onClickHandler = (event: any) => { + window.history.back(); + }; + + return ( + + + + ); +}; + +export const Forward: Component = () => { + const onClickHandler = (event: any) => { + window.history.forward(); + }; + + return ( + + + + ); +}; diff --git a/src/components/back-forward/index.ts b/src/components/back-forward/index.ts new file mode 100644 index 0000000..29b6df3 --- /dev/null +++ b/src/components/back-forward/index.ts @@ -0,0 +1 @@ +export { Back, Forward } from './BackForward'; diff --git a/src/components/map/Map.tsx b/src/components/map/Map.tsx index 39be826..7e55c9b 100644 --- a/src/components/map/Map.tsx +++ b/src/components/map/Map.tsx @@ -20,6 +20,7 @@ import { Point } from 'ol/geom'; import { Circle, Fill, Stroke, Style, Icon } from 'ol/style'; import GetLocation, { getCurrentLocation } from '../get-location'; import ShowLocationIcon from '../get-location/ShowLocationIcon.svg'; +import { Back, Forward } from '../back-forward'; const [getState, setState] = createSignal({ lon: 0, @@ -144,6 +145,22 @@ const Map: Component = () => { ), }), + new Control({ + // @ts-ignore + element: ( +
+ +
+ ), + }), + new Control({ + // @ts-ignore + element: ( +
+ +
+ ), + }), ]), }); olMap.on(['moveend'], changeListener);