
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@adactive/adsum-wayfindingcontrols-asia
Advanced tools
Install this component using yarn add @adactive/adsum-wayfindingcontrols-asia
Setting Redux Reducers typically located on your_project_folder/src/rootReducer.js
import { WayFindingControlsReducers } from '@adactive/adsum-wayfindingcontrols-asia';
const appState: AppStateType = {
routing: routerReducer,
map,
loadingScreen,
WayFindingControls: WayFindingControlsReducers
};
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))
(resetMapAndWayFinding(true, true, true, true);)
there are 4 parameter in resetMapAndWayFinding
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
));
},
});
Attach Wayfinding Component inside your Map Component for example:
<Map
backgroundImage={MapBackground}
store={store}
awm={this.awm}
isOpen={this.isMapOpen()}
className="app-map-container"
onClick={this.onMapClicked}
userObjectLabel={this.userObjectLabel}
getDrawPathSectionOptions={this.getDrawPathSectionOptions}
zoom={{
min: 20,
max: 600,
}}
>
<WayFindingControls
awm={this.awm}
kioskPlace={currentFloorFull}
/>
<div id="adsum-web-map-container" ref={this.awmContainerRef}>
<MapControls awm={this.awm} />
</div>
</Map>
###Props
**This WayFinding Required TWO PROPS which are awm and kioskPlace**
awm is AdsumWebMap
kioskPlace is
```javascript
getCurrentFloorFull() {
return this.awm.defaultFloor;
}
```
**If you want to take the POI destination or destination floor name u can get it on:**
set connect and mapStateToProps
```javascript
import { connect } from 'react-redux';
const mapStateToProps = (state: AppStateType): MappedStatePropsType => ({
wayFindingControlsState: state.wayFindingControls,
});
```
then call it on
```javascript
const { wayFindingControlsState } = this.props;
{wayFindingControlsState
&& wayFindingControlsState.placeDestination
&& wayFindingControlsState.placeDestination.name
&& `Your Destination is at
${wayFindingControlsState.placeDestination.name.replace('_', ' ')}`}
```
or get the POI destination
```javascript
const { wayFindingControlsState } = this.props;
wayFindingControlsState.destination[0]
```
**This WayFinding Have FOUR OPTIONAL PROPS**
1. destinationLabelText, it is Destination Label Text, the default was "You Reached (Shop)"
2. icLabelText, it is InterChange Label Text, the default was "Head Down/Up (Floor)"
3. arrivalLabelStyle, it is Destination Label Styling and Offset, the structure should be the same as the default which can see below (props Detail)
4. interchangeLabelStyle, it is Interchange Label Styling and Offset, the structure should be the same as the default which can see below (props Detail)
# Props Detail
```javascript
type OwnPropsType = {|
//props needed when call this component
awm: *,
kioskPlace: object,
//optional props
destinationLabelText: string,
icLabelText: string,
arrivalLabelStyle: object,
interchangeLabelStyle: object,
|};
static defaultProps = {
destinationLabelText: "You reached ",
icLabelText: "Head ",
arrivalLabelStyle: {
offset: {
x: 0,
y: 0,
z: 15,
},
style: {
backgroundColor: '#00437a',
backgroundOpacity: 0.9,
backgroundRadius: 3,
color: '#ffffff',
size: 4,
},
},
interchangeLabelStyle: {
offset: {
x: 0,
y: 0,
z: 15,
},
style: {
backgroundColor: '#00437a',
backgroundOpacity: 0.9,
backgroundRadius: 3,
color: '#ffffff',
size: 4,
},
},
}
***You can Edit sentence to use
`npx @adactive/adsum-wayfindingcontrols copy --less-only`
`npx @adactive/adsum-wayfindingcontrols copy`
FAQs
Adsum Way Finding Controls Component
The npm package @adactive/adsum-wayfindingcontrols-asia receives a total of 3 weekly downloads. As such, @adactive/adsum-wayfindingcontrols-asia popularity was classified as not popular.
We found that @adactive/adsum-wayfindingcontrols-asia demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.