Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Singapore Mrt Stations Map React Component

NotificationsYou must be signed in to change notification settings

winhtaikaung/react-smrt-map-selector

Repository files navigation

Singapore SMRT map station selector react component

npm version

NPM

Installation

npm install --save react-smrt-map-selector

Usage & Configuration

importSmrtSelectorfrom'react-smrt-map-selector';<SmrtSelectorselectedStations={[]}onStationsCheckChange={(item,selectedStn)=>{}}config={{backgroundColor:'#FFF',textColor:'#000000',title:{textColor:"#000000"}}}isDisplayFutureStation={true}displayTagSelector={true}/>

Props & methods

PropNameDescriptionPropTypevaluerequired
widthWidth of the map componentstring(default 100vw)number + em,px,%,false
heightHeight of the map componentstring(default 100vh)number + em,px,%,false
titleTitle of the map componentstring(default Singapore SMRT Map)false
selectedStationsArray of selected stationsarray[]false
onStationsCheckChangeFunction to receive stations check changes from mapfunctionTrue
displayStationsList of stations that can display by passing as an arrayarrayTrue
displayFutureStationList of future stations that can display by passing as an arrayarraytrue
displayTagSelectorTags selector view which shows selected stations below the stations map viewarrayfalse
configconfigurations for mapbackgroundColor andtextColorobjectfalse

Available stations

constcurrentStation=["EW_LINE_STN","NS_LINE_STN","NE_LINE_STN","CC_LINE_STN","DTL_LINE_STN","BP_LRT_LINE_STN","NS_SK_LRT_LINE_STN","NS_PG_LRT_LINE_STN"]constnewStations=["ECL_TEL_LINE_STN","JRL_LINE_STN","RTS_JB_LINE_STN","CC_LINE_NEW_STN","DTL_LINE_NEW_STN","NE_LINE_NEW_STN"]

Demo App & Source Code

CodePen Demo

License

The MIT License (MIT)

Copyright (c) 2019 Win Htaik Aung

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Singapore Mrt Stations Map React Component

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp