|
POST
|
I don't use the popup thingy at all - I redirect all to a floating pane and then go through each found layer, and each result in the layer to produce something like the attached - basically replicating what we had in ArcIMS 🙂 [ATTACH=CONFIG]23880[/ATTACH] So it is important to only expose the fields you want to see in the ArcMap MXD. By using the layer description I have also manage a feature specific hyperlink (again like ArcIMS) Shout if you want to see the code ACM ACM and all thank you so much. Very cool example. Hm. I do have access to the MXD and all server capabilities. I talked to someone today who said if I hide the field in ArcMap (hide the column in attribute table) it will hide it from showing up. The server is processing something now, so I can not test this, but I will test it in the next few days and report back on its success.
... View more
04-30-2013
12:13 PM
|
0
|
0
|
1779
|
|
POST
|
Derek thank you so much, indeed this works. Although I wonder why it does not make the field name's "label" and its contents justify to the left/right, kind of split, like most esri.dijit.PopupTemplate windows? And where the field name label is grey? Like on ArcGIS.com. Is that not possible when telling it to use all fields in the description via wildcard? Odoe thank you for your advice, too. I'm still in the learning phase here, hope to be a helpful contributor and adviser here myself in the future. If I understand your code Odoe, it displays all attributes in the popup dijit infowindow... but strips out the ObjectID and FID fields? This sounds perfect. I think I see the pattern where I could add others to ignore like Shape as well. Generally, how do we use it? Is this an object I make an instance of, like AGS JS TOC widget for example? So, we put it at the top of our code (i.e. the 'layout.js' or equivalent where the script is located)? How do we tell it which layer(s) to use? I'd love to implement your utility. I'm starting to experiment with it. Thanks both!
... View more
04-30-2013
07:38 AM
|
0
|
0
|
1779
|
|
POST
|
Hi Derek, thank you for your reply. I am with you on the UI aspect. However, it's over 100 layers each with 15+ fields and many may change soon so this is the best approach for now for us. The esri.dijit.PopupTemplate can do this, it does support wildcards for all fields, just like infoTemplate, right? InfoTemplate works great but Popup is just better. I recall having found the Popup syntax before but can not locate it again, if you could provide this syntax that would be kindly appreciated! I wonder whether using wildcards and some fancy array syntax / logic it would be possible to say show me everything BUT the ObjectID and Shape? It's fine they are there, it's much more important to show all fields than worry about those two, but that would be a neat trick.
... View more
04-26-2013
04:21 AM
|
0
|
0
|
1779
|
|
POST
|
So you're using dynamic layers I presume based on your layername? I mention this since this issue with no expandopanes happens with featureLayers. We're using this widget. Works great. I have multiple instances of it in accordions, with many groups and even subgroups in my MXD that carry through perfectly to the AGS TOC instances. All in a dynamic service. Can you post all your code in? That may help identify the issue.
... View more
04-24-2013
07:30 AM
|
0
|
0
|
1599
|
|
POST
|
Hi forum, Has anyone set Nianwei Liu's AGS JS TOC widget to not collapse layer Groups when it is clicked? In other words, I have a dynamic service with around 100 layers. I've grouped these into a few groups which works great with the AGS widget, whcih groups them hierarchically just like ArcMap. Now I am wondering how to make it NOT automatically roll up the groups when I turn them off. We want them to stay expanded, unless the user clicks the little "+" button. We do however want it to collapse/expand with the "+" as is normal. (the AGS widget - http://forums.arcgis.com/threads/32804-AGS-JavaScript-Api-Combined-TOC-Legend-Contol etc ) I have tinkered with the TOC.js code and I believe the relevant block of code is below but I have not succeeded. I set a lot of those visible items to true, set both expandos to "open" etc to no avail yet. Anyone else done this or know how?
var show = this.data.visible;
// if it is a group layer and no child layer is visible, then collapse
if (this.data._subLayerInfos) {
var noneVisible = true;
dojo.every(this.data._subLayerInfos, function(info) {
if (info.visible) {
noneVisible = false;
return false;
}
return true;
});
if (noneVisible)
show = false;
}
if (this.data.collapsed)
show = false;
if (this.iconNode && this.iconNode.src == this.blank) {
dojo.addClass(this.iconNode, 'dijitTreeExpando');
dojo.addClass(this.iconNode, show ? 'dijitTreeExpandoOpened' : 'dijitTreeExpandoClosed');
}
if (this.containerNode)
dojo.style(this.containerNode, 'display', show ? 'block' : 'none');
if (this.rootLayerTOC.toc.style == 'standard' && this.iconNode && this.checkNode) {
dojo.place(this.iconNode, this.checkNode.domNode || this.checkNode, 'before');
}
... View more
04-24-2013
07:11 AM
|
0
|
0
|
598
|
|
POST
|
Still working on this... I have tested inserting the following code at http://jsfiddle.net/URpaW/ Replacing what was there, the infoTemplate, at line 101 var infoTemplate = new esri.dijit.PopupTemplate({
description: feature.attributes.layerName,
fieldInfos: [{
fieldName: "*",
visible: true,
label: "*"
}]
}); This only displays the description, though. When I delete "description: feature.attributes.layerName," though it displays all fields. Although it displays an asterisk for a label, as well. Anyone else using this approach for their popups / Identify tools and know the syntax?
... View more
04-24-2013
03:53 AM
|
0
|
0
|
1779
|
|
POST
|
Hi all, I want to display all attributes for all fields in an esri.dijit.Popup window. I remember seeing this somewhere but can not find it again. I want to accomplish the same thing the following code would do in a regular infoWindow: var infoTemplate = new esri.InfoTemplate("${name}", "${*}"); But with a Popup Dijit. Anyone know the syntax? Thanks! Below is the entire code / details for why/what I am trying to accomplish. I want to convert the code below to a Popup dijit and put a 'title' in as a Description since it overwrites the title because it shows multiple coincident features. var infoTemplate = new esri.dijit.PopupTemplate({ title: "", description: feature.attributes.layerName, fieldInfos: [ { fieldName: "${*}", visible: true, label: "{*}" } ] }); I want to make that work in the identify widget: //// Identify Widget ////
var identifyParams;
var tasks;
var clickPoint;
//var popup = new esri.dijit.Popup({ fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.25]))}, dojo.create("div"));
dojo.connect(map, 'onLoad', function () {
//setup generic identify parameters
identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.tolerance = 5;
identifyParams.returnGeometry = true;
identifyParams.layerIds = MYDYNAMICLAYER.visibleLayers;
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE;
dojo.connect(map, 'onClick', doIdentify);
});
dojo.connect(map, 'onLayersAddResult', setupIdentify);
function setupIdentify(results) {
//loop through operational layers and add identify task for each.
tasks = dojo.map(results, function (result) {
return new esri.tasks.IdentifyTask(result.layer.url);
});
}
function doIdentify(evt) {
map.infoWindow.hide();
clickPoint = evt.mapPoint;
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.width = map.width;
identifyParams.height = map.height;
identifyParams.layerIds = MYDYNAMICLAYER.visibleLayers;
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE;
var deferreds = dojo.map(tasks, function (task) {
return task.execute(identifyParams);
});
var dlist = new dojo.DeferredList(deferreds);
dlist.then(handleQueryResults);
}
function handleQueryResults(results) {
var features = [];
dojo.forEach(results, function (result) {
// for a simplified test let's just display all the attributes in the popup
if (result[1].length > 0) {
dojo.forEach(result[1], function (r) {
var feature = r.feature;
console.log(feature);
feature.attributes.layerName = r.layerName;
var infoTemplate = new esri.InfoTemplate("${name}", "${*}");
feature.setInfoTemplate(infoTemplate);
features.push(feature);
});
}
});
map.infoWindow.setFeatures(features);
map.infoWindow.show(clickPoint);
}
//// ^^^ Identify Widget ////
... View more
04-22-2013
12:07 PM
|
0
|
17
|
6636
|
|
POST
|
Thanks mcdade. I want to display all visible layers in a popup, displaying all features in the click tolerance (multiple coincident featurse with the arrows in the upper-right of infowindow). However this overwrites a set title so I'll have to put it into the infowindow content apparently. So far I have this almost working. I had some basemap layers (ESRI's basemaps and imagery) and they were showing up in the infowindows below even though I'd set it to only display visible layers. I moved them below the Identify widget code and they are gone which is good. But I still have layers show up that are not visible at a certain scale. (I set scale dependencies in the ArcMap MXD/MSD). I have to manually turn them off in the AGS TOC widget. //// Identify Widget ////
var identifyParams;
var tasks;
var clickPoint;
//var popup = new esri.dijit.Popup({ fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.25]))}, dojo.create("div"));
dojo.connect(map, 'onLoad', function () {
//setup generic identify parameters
identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.tolerance = 5;
identifyParams.returnGeometry = true;
identifyParams.layerIds = MYDYNAMICLAYER.visibleLayers;
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE;
dojo.connect(map, 'onClick', doIdentify);
});
dojo.connect(map, 'onLayersAddResult', setupIdentify);
function setupIdentify(results) {
//loop through operational layers and add identify task for each.
tasks = dojo.map(results, function (result) {
return new esri.tasks.IdentifyTask(result.layer.url);
});
}
function doIdentify(evt) {
map.infoWindow.hide();
clickPoint = evt.mapPoint;
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
identifyParams.width = map.width;
identifyParams.height = map.height;
identifyParams.layerIds = MYDYNAMICLAYER.visibleLayers;
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE;
var deferreds = dojo.map(tasks, function (task) {
return task.execute(identifyParams);
});
var dlist = new dojo.DeferredList(deferreds);
dlist.then(handleQueryResults);
}
function handleQueryResults(results) {
var features = [];
dojo.forEach(results, function (result) {
// for a simplified test let's just display all the attributes in the popup
if (result[1].length > 0) {
dojo.forEach(result[1], function (r) {
var feature = r.feature;
console.log(feature);
feature.attributes.layerName = r.layerName;
var infoTemplate = new esri.InfoTemplate("${name}", "${*}");
feature.setInfoTemplate(infoTemplate);
features.push(feature);
});
}
});
map.infoWindow.setFeatures(features);
map.infoWindow.show(clickPoint);
}
//// ^^^ Identify Widget ////
... View more
04-22-2013
07:30 AM
|
0
|
10
|
1198
|
|
POST
|
redundant, sorry should be deleted, replied to this thread http://forums.arcgis.com/threads/52543-NLiu-s-Table-of-Contents(TOC)-Legend-widget-and-Visibility-States?highlight=http%3A%2F%2Fjsfiddle.net%2FURpaW%2F
... View more
04-22-2013
06:54 AM
|
0
|
0
|
654
|
|
POST
|
Is this perhaps the ESRI Geocoder dijit address field issue? The geocoder dijit is hardcoded to look for "SingleLine" in the query sent via JSON. In Steve's code it is "SingleKey". Kelly posted a workaround for this. It is posted in this thread. Example code is there as well: http://forums.arcgis.com/threads/75070-Geocoder-dijit-in-JS-API-v3.3-bug-quot-SingleKey-quot-vs-quot-singleLine-quot-search-parameter-name.?highlight=kelly+geocoder+dijit
... View more
04-11-2013
11:40 AM
|
0
|
0
|
790
|
|
POST
|
Thank you Domenico. Also, your Surface utility is fantastic! Thank you again.
... View more
04-10-2013
06:26 AM
|
0
|
0
|
476
|
|
POST
|
Hi all, Does anyone know the estimated time of release for the Elevation Server Object Extension for ArcGIS Server 10.1? The ESRI developer posted "soon" here - http://blogs.esri.com/esri/apl/2010/10/07/elevation-server-object-extension/ We would like to deploy this for a 10.1 server. Looks like a great piece of software.
... View more
04-09-2013
12:02 PM
|
0
|
2
|
709
|
|
POST
|
Also just a tip.. you can put multiple instances of the AGSJS TOC object (the widget) in your site. For example, I have several AGSJS TOC widgets, each in their own Accordion Panes. (Read more on Accordions and Border Container layout on in Dojo's docs at the Dojo website at http://dojotoolkit.org/reference-guide/1.8/dijit/layout/BorderContainer.html ). Also, it does the cascading levels only for dynamic layers, NOT feature layers! That is why we put a few AGSJS TOCs with Feature Layers into their own Accordions. However that'd be a cool update. Note that the coolest example is that the auther Nianwei integrated his widget into the ESRI Basic Viewer at http://maps.charlottenc.gov/templates/basicviewer/?webmap=460c54f38736428fa9c3429071be07b8 (Thread: http://forums.arcgis.com/threads/75725-BasicViewer-with-TOC ) I'd love to see this just rolled into the API by default. It's a fantastic piece of work. Also, see his Google Maps widget, at his site above. I would encourage ESRI to consider integrating this. Also Court consider reviewing Dojo's docs on using dojoConfig to use ESRI's server for the API but deploying this widget locally. http://dojotoolkit.org/documentation/tutorials/1.8/dojo_config/ Hope this is enough to get you started and it helps. I just learned and implemented this same process last month. 🙂
... View more
03-22-2013
07:44 AM
|
0
|
0
|
1571
|
|
POST
|
I have discovered what I think (?) might be a bug. I was having problems with Measurement.js not instantiating. I noticed ESRI samples do not have a dojoConfig... I then noticed my DojoConfig I'd set async to true. (Which is what we want ideally). I turned async to false and that fixed Measurement.js both for local API and edge server API sites. This should be fixed so we can use async mode. I have reported the bug but thought I'd mention it here in case others ran across this.
... View more
03-22-2013
07:33 AM
|
0
|
0
|
713
|
|
POST
|
Same issue, same workaround/fix. Works local now too. The API needs to be updated to allow Measurement.js to work when async is set to true in dojoConfig.
... View more
03-22-2013
07:16 AM
|
0
|
0
|
2462
|
| Title | Kudos | Posted |
|---|---|---|
| 23 | 12-16-2014 10:46 AM | |
| 2 | 06-06-2014 06:45 AM | |
| 1 | 12-15-2014 01:07 PM | |
| 1 | 07-14-2014 01:18 PM | |
| 1 | 07-15-2014 05:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|