cliveswan

Sharing common function between web maps.

Discussion created by cliveswan on Apr 3, 2012
Latest reply on Apr 3, 2012 by DSwingley-esristaff
Hi,

We have 3 map services that share common functions e.g. function init(); FinaliseMap = function()....etc.
The aim is to put the common code into a single file and call the functions as required.

I have tried moving the code to a common file then calling the function from Map A for example.
Get an error calling them??

For example.

I put  function COL.init() in col_common_SHARED.js
Then tried to call function COL.init() in Map Service A (mapA.js).


mapA.js
var function init() = COL.init;

Any suggestions what is wrong AND what I should be doing??
Appreciate any assistance.

Outcomes