Hi all, I am working in glitch to develop a scrollytellying map in Mapbox. I have a coding error, but I cannot seem to find what specifically what is wrong. I know that the issue line 79, but I am not sure what the specific fix is. Any and all help is appreciated. Here is the link to the code: Glitch :・゚✧
hi! I think the brackets are not matching properly. Before copy&pasting a new “chapter” element, make sure you use “prettier” button to fix indentation…
var config = {
style: "mapbox://styles/mapbox/streets-v11",
accessToken:
"pk.eyJ1IjoibG91ZGM5NTEiLCJhIjoiY2xteHM0ZWNqMTVoMzJqbnRua2x4N3Z0aCJ9.tugxtT5RuuQ9E46oqSPwjw",
showMarkers: true,
theme: "light",
alignment: "right",
title: "Women's House of Detention Walking Tour",
subtitle: "An tale of stories contained between the walls of the prison and memory",
byline: "Youth Public History Institute",
footer: "Source: source citations, etc.",
chapters: [
{
id: "chap-1",
title: "Washington Square Park",
image: "./path/to/image/source.png",
description:
"<p>This will be the first location on the walking tour.</p>",
location: {
center: [-73.99824, 40.73076],
zoom: 16.03,
pitch: 60.0,
bearing: 48.0
},
onChapterEnter: [
// {
// layer: 'layer-name',
// opacity: 1
// }
],
onChapterExit: [
// {
// layer: 'layer-name',
// opacity: 0
// }
]
},
{
id: "chap-2",
title: "The Garnets’ House — 175 MacDougal Street [1850s-1880s]",
image: "./path/to/image/source.png",
description: "This will be the second location of the walking tour.",
location: {
center: [-73.99723, 40.73000],
zoom: 18.87,
pitch: 60.0,
bearing: 0.0
},
onChapterEnter: [
// {
// layer: 'layer-name',
// opacity: 1
// }
],
onChapterExit: [ {
// layer: 'layer-name',
// opacity: 0
// }]
}
]
},
{
id: "chap-3",
title: "Lorraine Hansberry’s House — 112 Waverly Place ",
image: "./path/to/image/source.png",
description: "This will be the second location of the walking tour.",
location: {
center: [-73.99723, 40.73000],
zoom: 18.87,
pitch: 60.0,
bearing: 0.0
},
onChapterEnter: [],
onChapterExit: []
},
{
id: "chap-4",
title: " Site on map Tour",
image: "./path/to/image/source.png",
description: "This will be the second location of the walking tour.",
location: {
center: [-73.99723, 40.73000],
zoom: 18.87,
pitch: 60.0,
bearing: 0.0
},
onChapterEnter: [
// {
// layer: 'layer-name',
// opacity: 1
// }
],
onChapterExit: [
// layer: 'layer-name',
// opacity: 0
// }
]
}
]
}
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.