Skip to content

Instantly share code, notes, and snippets.

@whalec
Last active June 20, 2019 04:04
Show Gist options
  • Save whalec/50eae22abdc6b963203018538d38c7dd to your computer and use it in GitHub Desktop.
Save whalec/50eae22abdc6b963203018538d38c7dd to your computer and use it in GitHub Desktop.
{
"site" : {
"coordinates": {
"lat":-35.345911,
"lng":149.101182
}
},
"stops" : [
{
"label": "A",
"name": "Emergency Department",
"coordinates": {
"lat": -35.345938,
"lng": 149.100721
}
},
{
"label": "B",
"name": "Southern Car Park/Canberra Region Cancer Centre",
"coordinates": {
"lat": -35.347816,
"lng": 149.101384
}
},
{
"label": "C",
"name": "Bateson Road (Southern Car Park)",
"coordinates": {
"lat": -35.348729,
"lng": 149.101161
}
},
{
"label": "D",
"name": "Outpatient Services (Building 15)",
"coordinates": {
"lat": -35.347614,
"lng": 149.101977
}
},
{
"label": "E",
"name": "Canberra Hospital Main Entry",
"coordinates": {
"lat": -35.346340,
"lng": 149.101795
}
},
{
"label": "F",
"name": "Centenary Hospital for Women & Children",
"coordinates": {
"lat": -35.344367,
"lng": 149.101124
}
}
],
"transport" : {
"pollInterval": 10,
"pollURI": "https://act-health-api-dev.bilue.com.au/transport/tracker/canberra/update",
"infomation": "Courtesy Bus Service, Monday to Friday....",
"objects": [
{
"type": "bus",
"coordinates": {
"lat":-35.34500,
"lng":149.101500
},
"alert": null
}
]
}
}
@TerryBrett
Copy link

I've also added here a new key "site" which is just the location of the hospital. It is used when the map is zoomed out, I hide all the bus stop icons as they stack on top of each other and just show a single icon at this location.

{
"stops" : [
{
"label": "A",
"name": "Emergency Department",
"coordinates": {
"lat": -35.345938,
"lng": 149.100721
}
},

{
"label": "B",
"name": "Southern Car Park/Canberra Region Cancer Centre",
"coordinates": {
"lat": -35.347816,
"lng": 149.101384
}
},

{
"label": "C",
"name": "Bateson Road (Southern Car Park)",
"coordinates": {
"lat": -35.348729,
"lng": 149.101161
}
},

{
"label": "D",
"name": "Outpatient Services (Building 15)",
"coordinates": {
"lat": -35.347614,
"lng": 149.101977
}
},

{
"label": "E",
"name": "Canberra Hospital Main Entry",
"coordinates": {
"lat": -35.346340,
"lng": 149.101795
}
},

{
"label": "F",
"name": "Centenary Hospital for Women & Children",
"coordinates": {
"lat": -35.344367,
"lng": 149.101124
}
},
],
"transport" : {
"pollInterval": 10,
"pollURI": "https://somethingtorefreshObjects",
"infomation": "Courtesy Bus Service, Monday to Friday....",
"site": {
"lat":-35.345911,
"lng":149.101182
},
"objects": [
{
"type": "bus",
"coordinates": {
"lat":-35.34500,
"lng":149.101500
},
"alert": "Not currently operating, get walking.."
}
]
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment