POST
|
Robert, Thank you for that explination, and that sounds like exactly what we are looking to do here at my company. I am new to dojo and javasript, and I am starting to understand the concepts a little better. Do you know where I could go for more resources on how to achieve better understanding of dojo and its uses in WAB? Or do you have an example of code that you leveraged with the print widget? Thank you, Douglas
... View more
12-13-2016
07:31 AM
|
0
|
0
|
583
|
POST
|
Hi Robert, I would really like some input and explination on the Reporting widges that you have embeded in the ESearch popup panel. I think it is brilliant how you used the print tool to produce them, but I can't seem to figure that part out. Thanks, Doug
... View more
12-12-2016
01:44 PM
|
1
|
2
|
583
|
POST
|
Hello Dan, I have another issue with the LDockable panel. I moved it to the right side of the layout, but the map position does not change anymore. I have reversed all the code to the changeMapPosition in the panel, but it is still opening up on top of the map. Any Idea what I might be missing? Thanks,
... View more
12-06-2016
01:41 PM
|
0
|
0
|
323
|
POST
|
Robert, That change caused the popup window to appear when I select a feature on the map. I had that happening before, and could not figure out how to make it bypass the call to make the popup window open. Does that make sense?
... View more
10-12-2016
08:13 AM
|
0
|
1
|
875
|
POST
|
the console error says that map.PanTo is not a function. I know I am missing something when I call the function. That is why I was wondering if there was any documentation on how to use the various functions in WAB.
... View more
10-12-2016
07:54 AM
|
0
|
3
|
875
|
POST
|
Sure. Here is the code I am working on to populate my FoldablePanel. function populateTreeView(features, tvNode, mm, dd7t) { require(['dojo/dom-construct',"dojo/Deferred", "dijit/registry","dijit/Dialog",'dojo/query', 'esri/symbols/SimpleFillSymbol', "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleMarkerSymbol","esri/renderers/SimpleRenderer", "esri/graphic", "esri/Color", "esri/tasks/query","esri/tasks/QueryTask", "esri/layers/GraphicsLayer", "jimu/MapManager", "jimu/WidgetManager"], function( dj,Deferred, registry, Dialog, query,SimpleFillSymbol, SimpleLineSymbol,SimpleMarkerSymbol, SimpleRenderer, Graphic, Color, Query, QueryTask, GraphicsLayer, MapManager, WidgetManager) { var map =mm.layerInfosObj.map; var featureClassColl = []; var feature, fc, field; var atts; var name, value; var tvDiv = document.createElement("div"); var layerDiv; var featureUl, fieldLi, fcUl,fcLi, featureLi, fieldUl; var featureLabel, fieldLabel, fcLabel; var fcCb, featureCb; var def = new Deferred(); var fieldLabel, fieldValue; var visibleFields ; for(var f in features) { feature = features ; var con = feature.getContent(); var idx = featureClassColl[feature._layer.name]; if(!idx) { featureClassColl[feature._layer.name] = []; } featureClassColl[feature._layer.name].push(feature); // alert(feature.attributes["OBJECTID"]); } if(document.getElementById("tv")) {tvNode.innerHTML = "" ;} layerDiv = dj.create("div", {class:"idtvDiv", id:"tv"}, tvNode); var featureUl; var featureTitle ; var oid ; // FOREACH FEATURECLASS THAT HAS BEEN CLICKED for(var key in featureClassColl) { fc = featureClassColl[key]; // CREATE THE LIST FOR THE FEATURE CLASS AND USE A LABEL TO NOTATE fcUl = dj.create("ul", {className: ""}, layerDiv); fcLi = dj.create("li","", fcUl); fcCb = dj.create("input", {class:"idtvFc", type:"checkbox", id:key}, fcLi); fcLabel = dj.create("label", {innerHTML:key, for:key}, fcLi); // FOREACH FEATURE THAT WAS SELECTED IN THIS FEATURE CLASS for(var i in fc) { feature = fc; amalgTitle = createFeatureTitleForTV(feature); oid = feature.attributes["OBJECTID"]; featureUl = dj.create("ul", {}, fcLi); featureLi = dj.create("li",{onclick:function(evt) { }},featureUl); featureCb = dj.create("input", {class:"idtvFeature", type:"checkbox", id:key+oid, checked:true}, featureLi); featureLabel = dj.create("label", {innerHTML: amalgTitle, for:key+oid}, featureLi ); // PAN AND ZOOM TO THE FEATURE THAT IS S,ELECTED IN THE TREEVIEW var panButton = dj.create("input", {text:"", value:"", panButton:"", onclick:function(evt){ var q = new Query(); q.where = "OBJECTID=" + evt.target.parentNode.parentNode.attributes["oid"].value; q.returnGeometry = true; q.outFields = ["*"]; q.outSpatialReference = map.spatialReference; var qt = new QueryTask(evt.target.parentNode.parentNode.attributes["uri"].value); var res = qt.execute(q, function(featureSet){ map.panTo(featureSet.features[0].panTo()); } ); }, type:"submit"}, featureLi); var zoomButton = dj.create("input", {text:"", value:"", zoomButton:"", onclick:function(evt){ var q = new Query(); q.where = "OBJECTID=" + evt.target.parentNode.parentNode.attributes["oid"].value; q.returnGeometry = true; q.outFields = ["*"]; q.outSpatialReference = map.spatialReference; var qt = new QueryTask(evt.target.parentNode.parentNode.attributes["uri"].value); var res = qt.execute(q, function(featureSet){ map.setExtent(featureSet.features[0].geometry.getExtent(),true);}); }, type:"submit"}, featureLi);
... View more
10-12-2016
06:58 AM
|
0
|
5
|
875
|
POST
|
Hello Robert, I have disabled the popup from showing up by taking out the 'jimu/dijit/PopupMenu' out of my definition. My panTo function is still not triggering from my custom widget with my on click event. Am I missing something in the variables? Is there some documentation out there that explains how to incorporate the panTo function? Thanks for your help, Douglas
... View more
10-12-2016
06:13 AM
|
0
|
7
|
875
|
POST
|
Hello all, I am trying to add the panTo functionality to an icon on my custom widget, but it keeps triggering the popup window to open up. How can I just have it pan to the selected feature in my tool without triggering the popup panel? here is the code block I am trying to implement it in. var panButton = dj.create("input", {text:"", value:"", panButton:"", onclick:function(evt){ var q = new Query(); q.where = "OBJECTID=" + evt.target.parentNode.parentNode.attributes["oid"].value; q.returnGeometry = true; q.outFields = ["*"]; q.outSpatialReference = map.spatialReference; var qt = new QueryTask(evt.target.parentNode.parentNode.attributes["uri"].value); var res = qt.execute(q, function(featureSet){ map.PanTo(featureSet.features[0]); } ); }, Thanks for your help, Douglas
... View more
10-11-2016
11:59 AM
|
0
|
9
|
1645
|
POST
|
Thank you very much for your help Daniel. Now I just have some css to tackle and I think I will be good to go. Cordially, Douglas
... View more
10-06-2016
05:07 AM
|
1
|
0
|
323
|
POST
|
I did that and remapped the panel to the Jewelryboxtheme and the panel is showing up now. Why did that work?
... View more
10-05-2016
01:48 PM
|
0
|
2
|
975
|
POST
|
Turned out that I did not have the config folder for that widget in the configs folder. That got rid of the error, but the panel still won't show up.
... View more
10-05-2016
01:03 PM
|
0
|
6
|
975
|
POST
|
Hello Daniel, Yes, that is what I did, but for some reason, I keep getting an error saying I have "an unexpected character at line 1 column 1 of the JSON data". I don't see anything wrong with the config.json in my theme, so it has to be something somewhere else. Any ideas? Thanks, Douglas
... View more
10-05-2016
07:58 AM
|
0
|
8
|
975
|
POST
|
Thank you Carmel. I was afraid of that. I will have to find another workaround then.
... View more
10-03-2016
01:35 PM
|
0
|
0
|
383
|
POST
|
Hello all, I am trying to use the LDockable panel functionality from the Jewelry box theme to my custom theme, but I can't figure out where to put my widget for it to register it in the config.json that one is present. The panel only shows up in the Jewelry box if you put a widget in in when you create the map. Has anyone tried to use this panel in their theme's? Thanks for the help. Doug
... View more
10-03-2016
01:34 PM
|
0
|
12
|
2343
|
Title | Kudos | Posted |
---|---|---|
1 | 12-12-2016 01:44 PM | |
1 | 10-06-2016 05:07 AM | |
1 | 02-23-2016 01:41 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|