DOC
|
Hello all, I am trying to customize an elevation chart widget since the chart display is exactly what I want. However, I have a table with Distance and Elevation values that I want to be able to query based on user input. I know the elevation chart uses a GP service, which I don't think I need to do since the values are confined to a specific line and not a dem. This should be pretty straight forward with creating a chart from a user specified input, but I can not figure out how to implement this either in the elevation widget, the chart widget, the related table chart widget, or even the custom barChartCedar since there are a lot of other functions going on in each. I have a custom javascript application that I am trying to convert into a WAB application, and have a custom query/chart built into it. I am trying to use the same code, but have been realizing that WAB is structured differently. Any direction is appreciated. Here is part of the the .js code from my running custom .js app: var layerInfo = []; var legendLayers = []; var legend; var legendCount = 0; var seriesid = 1; var count = 0; //Create the chart var chart = new Chart("chartDiv"); //Create the legend var legendtwo; //Add points feature layer var pointsLayer = new FeatureLayer("https://...MapServer/26", { mode: FeatureLayer.MODE_SELECTION, outFields: ["*"] }); var queryTask = new QueryTask("http://...MapServer/26"); //console.log(queryTask); //Add Query var query = new Query(); query.outFields = ["*"]; on(dom.byId("execute"), "click", _execute); function _execute() { query.where = "season='" + dom.byId("SeasonName").value + "' and year=" + dom.byId("YearName").value + " and line=" + dom.byId("LineName").value + ""; pointsLayer.selectFeatures(query, FeatureLayer.SELECTION_NEW, querycallback); legendLayers.push({ layer: pointsLayer, title: 'Profile Points' }); } //console.log(query); //Get the chart info from the query results //Add Querycallback function querycallback(results) { console.log(results); if (results.length !== 0) { var chartData = arrayUtils.map(results, function(feature) { return { x: feature.attributes.Dist, y: feature.attributes.Z }; }); chart.setTheme(Tom); chart.addPlot("default", { type: "Lines", tension: "S", markers: true }); chart.addAxis("x", { title: "Distance Feet", titleOrientation: "away", titleFontColor: "#999" }); chart.addAxis("y", { vertical: true, title: "Elevation", titleFontColor: "#999" }); // Add the chartdata var color = ["red", "yellow", "cyan"]; chart.addSeries("<div style='display:none'>"+seriesid++ +":</div>"+dom.byId("YearName").value + " " + dom.byId("SeasonName").value + " " + dom.byId("LineName").value , chartData, {plot:'other',stroke:{color:color[colorindex]}}); colorindex = colorindex % 3; colorindex++; chart.updateSeries(); // dojo.setStyle(dijit.byId("chart").domNode, 'display', 'inline'); // dojo.byId("chart").style.height = '300px'; // dijit.byId("content").resize(); // Render the chart! chart.render(); // Create the legend var node = dom.byId("surfaceDiv"); var legendID = "legend" + legendCount++; var nodes = "<div id='" + legendID + "' ></div>"; html.set(node, nodes); var nodeLegend = dom.byId(legendID); legendtwo = new SelectableLegend({ chart: chart, horizontal: false, outline: true }, nodeLegend.id); } else { alert("No results"); } } }); // // Remove the series from the chart // on(dom.byId("reset"), "click", function() { // var j = chart.series.length; // for (var i = 0; i < j; i++) { // chart.series.destroy(); // } // chart.series = []; // legendtwo.destroy(); // dojo.setStyle(dijit.byId("chart").domNode, 'display', 'none'); // dijit.byId("content").resize(); // }); });
... View more
03-25-2018
02:42 PM
|
0
|
0
|
5730
|
POST
|
That is correct, there are no errors in the command line, both are green.
... View more
03-22-2018
01:46 PM
|
0
|
1
|
1665
|
POST
|
Hey Robert, I am upgrading from 2.6 to 2.7. I have followed your "Upgrade apps" documentation. My logs file has been created and displays [INFO] for both actions: upgrade Builder Folder and upgrade App id. When I run the startup from 2.7, I get prompted to enter the App ID and specify my Portal. After I enter my App ID, the normal WAB home page opens but there are no apps listed. There is also no apps folder creation after the upgrade in the 2.7 server folder. Unless I am missing something, shouldn't the app be copied over from 2.6 to 2.7 with the custom/default widgets when performing this upgrade?
... View more
03-20-2018
08:57 AM
|
0
|
3
|
1665
|
POST
|
Maybe I am not placing it in the correct position, but it is not working. I would want to place this after the layers and templates get loaded, correct?
... View more
03-10-2017
01:23 PM
|
0
|
0
|
1221
|
POST
|
Ok, thanks. How would this work for a PopupTemplate? See example below: currentLayer.on("click", function(evt) {
console.log(evt);
featureId= evt.graphic.attributes.OBJECTID;
currentLayer.queryAttachmentInfos(featureId, function(attach) {
featureUrl=attach[0].url;
currenttemplate = new PopupTemplate({
title: "Current",
fieldInfos: [{
fieldName: "Name",
label: "Name: ",
visible: true
},{
fieldName: "X",
label: "X: ",
visible: true
},{
fieldName: "Y",
label: "Y: ",
visible: true
}],
mediaInfos:[{ //define the image
"title": "",
"caption": "",
"type":"image",
"value":{
"sourceURL": featureUrl
}
}]
});
currentLayer.infoTemplate=currenttemplate;
},
function(errback) {
console.log(errback);
});
});
... View more
03-10-2017
07:58 AM
|
0
|
7
|
1221
|
POST
|
I have a point feature that when clicked on, generates a popup with a graphic. The graphic is rather large so the whole popup is always cut off. I looked through the documentation and I am not really sure on what to call it so I don't really know what I am looking for, but I am looking to have the map resize to automatically when a popup is active to be able to refocus on the popup to show the whole thing. Anyone have any idea?
... View more
03-10-2017
06:46 AM
|
0
|
10
|
2056
|
POST
|
Hello, Has anyone been successful in using the ArcGIS platform with the MatLab platform to develop web applications? Basically I have a MatLab script that can does volume analysis on a db. I built a custom js web application that creates a visual graph that displays the data from that db. I don't see any volume analysis digit capabilities to build into the application, so I was thinking of trying to incorporate the MatLab script somehow. I searched around a little and the only thing I found was that Python is a common language both platforms. Therefore, I would have to convert the MatLab script to Python, then plug that into my application. Does anyone have any better suggestions or a workflow to accomplish this? Or a different way to avoid converting the MatLab script? Maybe I missed something in the JS API?
... View more
09-23-2016
01:20 PM
|
0
|
0
|
1073
|
POST
|
That would be the ideal situation. I am using Joyride at the moment since I can get the most functionality out of it but it doesnt have what I mentioned above. Have you seen anything that has those capabilities?
... View more
09-12-2016
12:05 PM
|
0
|
1
|
304
|
POST
|
Ok, before I provide some code though, is there a way to provide a step, then have the user do that action which moves on to the next step?
... View more
09-12-2016
11:57 AM
|
0
|
3
|
304
|
POST
|
Has anyone got intro.js to work in the regular arcgis js api? I am having trouble implementing it into my HTML. The instructions on their site say to include the steps within the html lines. This makes the code messy, imo, and not all located together in one place at the end with references to each id. I have tried both ways though and have not had much success. I keep getting a "multiple defined" error along with "introJs not defined". I did get a different Tour called Joyride to work and it looks great! Only problem, which is a big problem, is I can't get it to recognize a button id and I can't get the previous button to appear on the tour. I couldn't get bootstrap tour to work either. Anyone have any other suggestions and examples of a workflow that they know works in the environment I am using?
... View more
09-12-2016
10:56 AM
|
0
|
1
|
738
|
POST
|
Ok, that makes more sense. Where did you plug that into your html?
... View more
09-08-2016
09:14 AM
|
0
|
0
|
738
|
POST
|
Should the introJs().start(); be before the arcgis api? Unfortunately I cant share the whole app since the data is not public.
... View more
09-08-2016
08:57 AM
|
0
|
2
|
738
|
POST
|
I am having trouble getting this to work. I am getting this error: Uncaught TypeError: Cannot read property 'querySelectorAll' of null intro.js:130 I added the intro.js and introjs.css to my working directory. Added the stylesheets (css & js) to the body. Added the introJs().start(); script before the body. Then added data-step="1" data-intro="Hello step one!" to the query execute id. Am I missing a step? Do you know if I am able to step through the webapp? For example, a chart is generated after the query is executed, which right now I am not able to show.
... View more
09-08-2016
08:32 AM
|
0
|
4
|
738
|
Title | Kudos | Posted |
---|---|---|
1 | 08-27-2014 01:56 PM | |
1 | 08-27-2014 12:44 PM | |
1 | 05-09-2016 12:32 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|