I need help to automatically uncheck the checkbox next to Root layer Topographic Contours on agsjs.dijit.toc. Topographic Contours is a cached tile map service that is not like dynamic map service -- easily make layers visible or invisible. Thanks.
I hope so, too. The ESRI layer list lacks integrated legend, transparency, powerful config. A "-" for groups with some but not all sublayers on would also be good to implement.
This may be low priority but I'll ask it anyways. This TOC worked perfectly in ESRI JavaScript 3.xyz. I'm now working in ESRI JavaScript 4.0+ beta. It's possible maybe it needs to be implemented a different way but it doesn't seem to work properly in the latest JS API version. Thanks for your hard work on this.
Will you build a new version that will play will with ERSI's JavaScript 4.0 API?
Great job. I'm working the last version (update 2015-01-15) but I'm having problems when the layer is a ArcGISDynamicMapServiceLayer and applies a layerDrawingOptions. The problem is that the legend is drawn in the toc does not match the loaded in the map layer; in this case , the legend of toc equals legend MapService. Does anybody have the same problem?
So if I have a Paved Areas layer, with Road, Parking, and Driveway attributes, I would see three checkboxes under the 'Paved Areas' layer and I could turn off just parking, with an older AGS JS TOC?
you had to add a query statement for some reason in the layer, but 1=1 (ie everything) did the trick.
I just noticed this, shame, I was selling that as a neat new feature to my users - any chance of adding this back in as an option? I agree it wasn't for everyone, as if you had a poorly index/large layer it did have a server hit.CheersACM
Some of the fairly complex but less known functionality was dropped to simplify the code upgrade, such as creation of check box on legend items based on UniqueValueRenderer,
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; } } }); }
if (this.checkNode) if (this.checkNode.set) this.checkNode.set("disabled", a);
if (this.checkNode) if (this.checkNode.set) ;
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...
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.
'http://localhost/APPS/agsjs/build/agsjs'
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: //"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.jsWhere is the 'GoogleMapsLayer.js' coming from. I don't want to point to 'http://gmaps...." seems to unstable lately.Thanks.
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:
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.
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"
Could anybody ever get this portion of the agsjs connection code to work? I could only get a full direct path to the 'agsjs' directory to work.name: "agsjs", //necessary for TOC location:location.pathname.replace(/\/[^/]+$/, "")+'/./build/agsjs'
name: "agsjs", //necessary for TOC location:location.pathname.replace(/\/[^/]+$/, "")+'/./build/agsjs'
{ layer: aerials, slider: true, title: "Aerials", collapsed: true }
<img src="http://my server/arcgis_js_api/library/3.5/jsapi/js/dojo/dojo/resources/blank.gif" alt="" data-dojo-attach-point="iconNode" class="dijitTreeExpando dijitTreeExpandoClosed" style="visibility: hidden;">
{ layer: aerials, slider: true, title: "Aerials", isopen: true, collapsed: true }
adding a class to the image ACM
.agsjsTOCNode img { /* your style */ }
templateString: '<div class="agsjsTOCNode"><div data-dojo-attach-point="rowNode" data-dojo-attach-event="onclick:_onClick"><span data-dojo-attach-point="contentNode" class="agsjsTOCContent"><span data-dojo-attach-point="checkContainerNode"></span><img class="tocimage" src="${_blankGif}" alt="" data-dojo-attach-point="iconNode" /><span data-dojo-attach-point="labelNode"></span></span></div><div data-dojo-attach-point="containerNode" style="display: none;"> </div></div>',
Could anybody ever get this portion of the agsjs connection code to work? I could only get a full direct path to the 'agsjs' directory to work
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.