Hi everyone,
I'm trying to customize my story map and I'm meeting some troubles..
I've dowload the code on GitHub and I would like to put some legend on the images that are on the main stage
I've tried this :
<script type="text/javascript">
require(["dojo/topic"], function(topic) {
/*
* Custom Javascript to be executed while the application is initializing goes here
*/
console.log("Map Journal is initializing");
// The application is ready
topic.subscribe("tpl-ready", function(){
/*
* Custom Javascript to be executed when the application is ready goes here
*/
topic.subscribe("story-load-section", function(index){
console.log("The section", index, "is being loaded");
var mainStageTitle = document.getElementById("mainStageTitle");
switch(index) {
case 0:
mainStageTitle.innerHTML = "South Resident Killer Whales, NL";
break;
case 1:
mainStageTitle.innerHTML = "Beluga, BC";
break;
default:
mainStageTitle.innerHTML = "Marine Mammals";
}
});
console.log("Map Journal is ready");
});
</script>
but anytime an error occured and say(index):340 Uncaught ReferenceError: require is not defined
I don't understant because I've follow some examples which were doing the same..
If someone could help me
Thanks,
Nolwenn
Solved! Go to Solution.
Yes it was the exact same code!
You save me it works with surge!!
Ship Trafic Impact on Marine Mammals
I don't understand why it doesn't work on wamp but I will continue with surge it's much better!
Thanks a lot!!