次に、お好みのテキストエディタでconfig.jsを開いてみましょう。Sublime Text 2かAtomをダウンロードしてください。以下は、設定ファイルをそのままにしたものです。
var config = {
style: 'mapbox://styles/mapbox/streets-v11',
accessToken: 'YOUR_ACCESS_TOKEN',
showMarkers: true,
theme: 'light',
alignment: 'left',
title: 'The Title Text of this Story',
subtitle: 'A descriptive and interesting subtitle to draw in the reader',
byline: 'By a Digital Storyteller',
footer: 'Source: source citations, etc.',
chapters: [
{
id: 'slug-style-id',
title: 'Display Title',
image: './path/to/image/source.png',
description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
location: {
center: [-122.418398, 37.759483],
zoom: 13.5,
pitch: 60,
bearing: 0
},
onChapterEnter: [
//{
// layer: 'layer-name',
// opacity: 1
//}
],
onChapterExit: [
// {
// layer: 'layer-name',
// opacity: 0
// }
]
},
{
id: 'other-identifier',
title: 'Second Title',
image: './path/to/image/source.png',
description: 'Copy these sections to add to your story.',
location: {
center: [-77.020636, 38.886900],
zoom: 13.5,
pitch: 60,
bearing: -43.2
},
onChapterEnter: [],
onChapterExit: []
}
]
};
{
id: 'intro',
title: 'A local’s guide to Washington, D.C',
image: 'https://www.washingtonpost.com/resizer/LB5cSvyCfPBXonvYBbgQq6OF8XQ=/1024x0/arc-anglerfish-washpost-prod-washpost.s3.amazonaws.com/public/3AB7DBUBM4I6TNMF4NVRNJJRVI.jpg',
description: 'To know Washington is to peel back its suit: The briefcases and blazers the rest of the world sees are just covers for a vibrant, creative community. Whether it’s the food scene — one of the country’s best — or murals tucked away in historic alleys, the city D.C. residents know is quirky — and inspiring.',
location: {
center: [-77.07567, 38.89583]
},
zoom: 11.23,
pitch: 60.00,
bearing: 43.61
}
{
id: 'chap-1',
title: '',
image: 'images/graph.png',
description: '',
location: {
center: [-124.99958, 37.21861],
zoom: 5,
pitch: 0.00,
bearing: 0.00
},
// we have to specify these settings for when the user comes back to this chapter
onChapterEnter: [
{
layer: 'fires',
opacity: 1
},
{
layer: 'satellite',
opacity: .5
}
],
onChapterExit: [
]
},
{
id: 'chap-2',
title: '',
image: '',
description: 'From 1895 to 2018, wildfires burned 35,437,560 acres of land. California measures nearly 105 million acres. In the past 123 years, wildfires have burned the equivalent of 33.8 percent of California.',
location: {
center: [-124.99958, 37.21861],
zoom: 5,
pitch: 0.00,
bearing: 0.00
},
// we have to specify these settings for when the user comes back to this chapter
onChapterEnter: [
{
layer: 'fires',
opacity: 1
},
{
layer: 'satellite',
opacity: .5
}
],
onChapterExit: [
{
layer: 'fires',
opacity: 0
},
{
layer: 'satellite',
opacity: 1
}
]
},