This repository has been archived by the owner on May 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Normalize vizwiz configuration schema #29
Comments
First pass at normalization. Would like to find an API docs site or something to be able to put this in place for comment / documentation. {
"format": "1.0",
"uid": "0PXs0K514dn917qVqw4Su",
"dataSources": [
{
"uid": "HzViXPtxfbDTmKxSXTHv6",
"icons": {
"url": "https://patterns.boston.gov/images/global/icons/mapping/waypoint-charles-blue.svg",
"cluster": true
},
"polygons": {
"style": "default",
"color": "#0C2639",
"hoverColor": "#FB4D42"
},
"popupHtmlTemplate": "<div><img src=\"{{Image}}\" class=\"cdp-i\" alt=\"{{Councilor}}\" style=\"margin-bottom: 1rem\"/></div><div> <div class=\"ta-c m-v300\"></div><div> <div class=\"cdp-t t--sans t--upper m-t200\">{{Councilor}}</div></div><div> <div class=\"cdp-st t--subinfo t--g300\">District {{DISTRICT}}</div></div><div> </div></div><div> <a href=\"{{Bio}}\" class=\"btn btn--b btn--100 btn--sm\"></div><div> Visit webpage<span class=\"a11y--h\"> of {{Councillor}}</span></div><div> </a></div>",
"source": {
"type": "cob-arcgis",
"service": "https://services.arcgis.com/sFnw0xNflSi8J0uh/ArcGIS/rest/services/City_Council_Districts/FeatureServer",
"layer": 0
},
"legend": {
"style": "icon",
"label": "Boston City Council Districts"
}
}
],
"maps": [
{
"uid": "OL~DGvQTVMyD00yr068SZ",
"title": "City Councilor Look-Up",
"instructionsHtml": " <div class=\"t--info\"> <p>\n Hover over and click on your district to find your councilor, or search your address.\n </p>\n <p>\n To see all City Council members, including at-large councilors, visit the\n <a href=\"https://www.boston.gov/departments/city-council#city-council-members\">City Council page</a>.\n </p>\n </div>",
"latitude": 42.347316,
"longitude": -71.065227,
"zoom": 12,
"showZoomControl": true,
"showLegend": true,
"showUserLocation": false,
"addressSearch": {
"title": "Find an address",
"placeholder": "Search for your address...",
"zoomToResult": true,
"autoPopupLayerUid": ""
}
}
]
}
|
Considering documenting this with JSON-Schema and generating documentation with docson. |
#31 has an agreed-upon new schema. Vizwiz needs to be updated to consume / generate it. See CityOfBoston/patterns#303 for the web components side of this change. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If a JSON value should be interpreted as HTML, then its key should make that obvious. E.g.
descriptionHtml
andpopoverHtmlMustache
. Other keys that are just strings should stay the same (such as "title")Putting this above the milestone only because migrating the config will be more of a pain once we're in the wild.
The text was updated successfully, but these errors were encountered: