http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109
<script type="text/javascript">
var djConfig = {
parseOnLoad: true,
packages: [{
"name": "agsjs"
// "location": location.pathname.replace(/\/[^/]+$/, "") + '/agsjs'
"location": 'http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/2.04/xbuild/agsjs' // for xdomain load
}]
};
</script>
//later in my code, I am also using the following:
//add the legend
dojo.connect(map, 'onLayersAddResult', function (results) {
var toc = new agsjs.dijit.TOC({
map: map,
layerInfos: [{
layer: dynaLayer1,
title: "Political Boundaries",
noLegend:false,
noLayers: false
}
]
}
, 'tocDiv');
toc.startup();
console.log("Set TOC");
}
);
map.addLayers([dynaLayer1]);
dojo.connect(map, 'onLoad', function (theMap) {
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
});
//"end legend"
I ended up having IT place the 'agsjs' files on the server, and put the full path to the directory on the server in the web application, which now works. First, I basically tried the same on my Sharepoint site, which did not work.
hI,
I am attempting to host the 'agsjs' files on our own server, I downloaded the code from
//http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/
and put it in folders on our server and then use path like:
hI,I am not pointing to GoogleMapsLayer.js to display the TOC, but to:
I am attempting to host the 'agsjs' files on our own server, I downloaded the code from
//http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/
and put it in folders on our server and then use path like:
//"location": location.pathname.replace(/\/[^/]+$/, '') + '/../src/agsjs'
When I run the app, I always get the following error....
404 Object Not Found - http://localhost/APPS/agsjs/build/agsjs/layers/GoogleMapsLayer.js
Where is the 'GoogleMapsLayer.js' coming from. I don't want to point to 'http://gmaps...." seems to unstable lately.
Thanks.
'http://localhost/APPS/agsjs/build/agsjs'But, this is in order to use the TOC feature with my data.
I am not pointing to GoogleMapsLayer.js to display the TOC, but to:'http://localhost/APPS/agsjs/build/agsjs'But, this is in order to use the TOC feature with my data.
when I copied the GoogleMapsLayer, I misspelled it, thus it could not find it.
/*built on 2013-08-05 12:16:32.99*/ define("agsjs/dijit/TOC",["dojo/_base/declare","dijit/_Widget","dijit/_Templated","dojox/gfx","dojo/fx/Toggler","dijit/form/Slider"],function...
if (this.checkNode) if (this.checkNode.set) this.checkNode.set("disabled", a);
if (this.checkNode) if (this.checkNode.set) ;
Basically I want my users to be able to switch greyed out layers on, even when they are greyed out
function enableAllCheckBox(){ dojo.query('.agsjsTOCOutOfScale').forEach(function(node, idx){ var tocNode = dijit.getEnclosingWidget(node); if (tocNode.checkNode) { if (tocNode.checkNode.set) { // for dijit.form.CheckBox tocNode.checkNode.set('disabled', false); } else { // for regular HTML checkbox input tocNode.checkNode.disabled = false; } } }); }