peterm_erm

Custom Module Not Loading (dojo.ready issue???)

Discussion created by peterm_erm on Nov 10, 2013
Hi All,

I am trying to customise the Basic Viewer template from AGOL. One of the things I am trying to do is to load a custom module. However when I call the custom module I get an error message to say that it is 'undefined'. From doing a bit of research I see that the calls to custom modules need to be wrapped in a dojo.ready function but I am not sure where to put this in my code. To add a bit of detail to the post:

With the Basic Viewer template the main thrust of UI and map creation is carried out within a separate template.js file. The call to these functions are already wrapped in a dojo.ready function within the index.html page (would this cause any issues if I put another dojo.ready function in the template.js file?

The code is attached, so far I have tried:

   - wrapping the createApp() function in a dojo.ready function, but it never gets called
   - wrapping the addXYZoom() function in a dojo.ready function but again it never seems to get called

Can anyone suggest where this dojo.ready function should be placed, or if this is even the solution!

Thanks

Peter

Attachments

Outcomes