Help on story map customization

1749
11
Jump to solution
06-15-2017 10:53 AM
NolwennLE_POULAIN
New Contributor

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

0 Kudos
11 Replies
NolwennLE_POULAIN
New Contributor

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!!

0 Kudos
NolwennLE_POULAIN
New Contributor
0 Kudos