Using AGSJS TOC with ArcGIS Javascript 3.0

6528
13
Jump to solution
06-21-2012 10:39 AM
MeleKoneya
Occasional Contributor III
I have been using the Table of Contents widget from

https://code.google.com/p/gmaps-utility-gis/  with ArcGIS Javasript API 2.8 but wanted to update my API to 3.0 and have not had luck doing so.

I am not clear on how to migrate to 3.0 even after reading the documention.    I did update my dojoconfig to use the "packages" property.

dojoConfig = {
        parseOnLoad: true,
        packages: [{
          name: "agsjs",
          location: "http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/1.07/build/agsjs"
         
        
          }]

However, when using dojo.require("agsjs.dijit.TOC");  the table of contents does not load and the rest of my page does not load either.

Has anyone been able to use this Table of Contents widget with 3.0?    If so,  can you provide instructions on how you got it to work?

Thanks,

Mele
0 Kudos
13 Replies
DougCollins
Occasional Contributor
Yes, I am having a similar problem.  I have tried to get the agsjs TOC working with the ArcGIS JavaScript 3.2 API, and it does not work.  I suspect there are issues with dojo 1.7.x here as well.

Too bad, because this looks like a really nice implementation of a TOC.  Something that is missing from the ArcGIS JavaScript API.

Charlie
0 Kudos
AdrianMarsden
Occasional Contributor III
I'm not sure of the issue - I'm using the TOC code here http://maps2.eastdevon.gov.uk/mapping/assets/ and it works fine in all browsers now (mine is slightly modified to take visible layers rather than default visibility - I did this before the core code was changed to do this)

ACM
0 Kudos
SIT_AGSM_VERONA_SPAAGSM_VERONA
New Contributor II
I'm not sure of the issue - I'm using the TOC code here http://maps2.eastdevon.gov.uk/mapping/assets/ and it works fine in all browsers now (mine is slightly modified to take visible layers rather than default visibility - I did this before the core code was changed to do this)

ACM


Hi to all!
I'm trying to install and configure dijit TOC locally but unfortunately the TOC doesn't appear. I looked at the source code you wrote (http://maps2.eastdevon.gov.uk/mapping/assets/) and I tryied to replicate the structure on my intranet server with the only result that the map is displayed but not the TOC.
I'm referencing the javascript API 3.2 (<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2"></script>) and configuring the packages in this way:
    var djConfig = {
    parseOnLoad: true,
    packages: [{
   "name": "agsjs",
   "location": "http://<local server IP>/agsjs/build/agsjs"
    }]
  };

I'm also referencing the package explicitly  
dojo.require("dojo.fx");
dojo.require("agsjs.dijit.TOC");

without success... what's wrong? Am I missing something?

Thanks a lot!
0 Kudos
BarryGuidry
Occasional Contributor
I am also using the Javascript API 3.2, and agsjs 2.03, and cannot get it to work. Does the agsjs files HAVE to be on the web server? I have tried putting them on my Sharepoint site and linking to them in the Javascript of the web application, as well as in a local directory for testing. I don't know, maybe there is an issue with the Javascript API v.3.2 and the agsjs, as well; but, what leads me to believe this is not the issue is that it does work fine when using the public link to agsjs:

'http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/2.03/xbuild/agsjs'

Is there another option to load a TOC in the Javascript API?
0 Kudos