Setup config and category files - OsmHackTW/BusRouteMap GitHub Wiki
Config.json
Locate in LocalData folder
{
"TargetCity":"臺南市",
"TargetNetwork":"臺南市公車",
"CategoryJSON":"LocalData/MainCategory.json",
"BusStopRealTimeUrl":"http://www.2384.com.tw/qrcode/vstop?code=",
"BusRouteInfoUrl":"http://www.2384.com.tw/ebus/pathInfo.jsp?pathId="
}
Description
TargetCity
Your city name.
TargetNetwork
Network name for Overpass API querying.
CategoryJSON
Category json file.
See MainCategory.json section how to edit it.
BusStopRealTimeUrl
Query url for user discovers the bus what time comes yet , the url provide from your government.
BusRouteInfoUrl
Query url for user discovers the bus info , the url also provide from your government.
MainCategory.json
- Also locate in LocalData folder
- Structure: Array > Many Objects > Many Properties
[
{
"categoryOSMRef":"CityBus",
"categoryName":"市區公車",
"colourScheme":{
"MainLineColour":"#9900CC",
"ExtendLineColour":"#D699EB",
"StopColour":"#9900CC"
}
}
]
Description
categoryOSMRef
Bus category reference , it must match ref:category
in your OSM relation data.
categoryName
Bus category name for select bar.
colourScheme
Define the color of bus line , bus stop. Use Hex Color 32-bit format.