Setting Redux Actions in your Apps
First thing to do is to import the action to file which you need the actions, for example app.js
import { WayFindingControlsActions } from '@adactive/adsum-wayfindingcontrols-asia';
There is 2 redux prop actions that this component have:
(WayFindingControlsActions.tmtt(poi, poiPlace))
- Action to reset map and Wayfinding)
(resetMapAndWayFinding(true, true, true, true);)
there are 4 parameter in resetMapAndWayFinding
- reset: needed to activate the resetMapAndWayFinding itself
- resetMap: needed if you want to resetMap
- resetMapOption: option to make the resetMap animated or not
- resetWayfinding: needed if you want to clear label and wayfinding path
Put these to actions on the mapDispatchToProps
For Example:
const mapDispatchToProps = (dispatch: *): MappedDispatchPropsType => ({
tmtt: (poi, poiPlace) => {
WayFindingControlsActions.tmtt(poi, poiPlace));
},
resetMapAndWayFinding: (reset, resetMap, resetMapAnimatedOption, resetWayfinding) => {
dispatch(WayFindingControlsActions.resetMapAndWayFinding(
reset,
resetMap,
resetMapAnimatedOption,
resetWayfinding
));
},
});