|
POST
|
All signs point to the Coordinate Widget causing the problems...but only when a non default coordinate system is used.
... View more
04-21-2015
11:51 AM
|
0
|
3
|
1950
|
|
POST
|
It looks like I might be on to something here... I was adding an additional coordinate system in the coordinate widget as the default. When you do this it prompts you to click on the map to get the coordinates. I'm thinking there was some problems between this widget and that one. I removed the coordinate widget and the popups worked. I also added it back in and only kept the default coordinate system, which changes as you move the mouse and the popups work. My next test is to see why they popup box is sized appropriately for one app and not the other.
... View more
04-21-2015
11:19 AM
|
0
|
4
|
2171
|
|
POST
|
So I am experiencing some oddities.. and I think they have something to do with this widget, but I am not totally sure. I had one app that I was able to create popups for within the local layer widget and it WORKED correctly. Since everything was good I went back into my previous apps and tried to create popups for them as opposed to using the Identify widget. That app looked fine in the WAB, but when deployed the popup window was tiny... like 50% the normal size. When I went back to the deployed app that was working correctly those popups stopped working and I am unable to get them back. Anyone else experience anything similar?
... View more
04-21-2015
10:58 AM
|
0
|
5
|
2171
|
|
POST
|
Ha… No I totally get it. At this point my security works fine on the Flex sites, but my new JAVA sites fail when I try to load my index.asp. Really I was looking for tips, tricks, and to confirm that the process was the same for JAVA vs Flex sites. Initially I thought it should be but then I ran into the problems. Thanks, ~ Nick
... View more
04-17-2015
04:29 AM
|
0
|
1
|
829
|
|
POST
|
Hi Robert, I believe I had read in a previous post that you use some sort of custom front end for website security. We use the same thing for our Flex sites, but I have not had much success with the JAVA sites yet. We use .asp code to verify username and password information against a SQL Database. With the FLEX we were able to add an include statement into our default.asp (formerly default.html). However, the JAVA sites seem to not react well to this. I converted the index.html to index.asp and tried to add the include statement. With or without the include statement my index.asp page does not want to load...it hangs up on the load bar. So I was wondering if you had any pointers on getting security setup on the JAVA sites? Thanks! Robert Scheitlin, GISP
... View more
04-16-2015
09:58 AM
|
0
|
3
|
4093
|
|
POST
|
I made some modifications to this widget around line 900. See the code below. It sorts the fields based on the layer id. You may be able to add alias / order information to this to get the information on the screen corrected. _queryByObjectIds: function(objectIds, returnGeometry){ var queryParams = new EsriQuery(); queryParams.returnGeometry = !!returnGeometry; queryParams.outSpatialReference = this.map.spatialReference; queryParams.outFields = this._getOutputFields(); queryParams.objectIds = objectIds; var layerId = this._getLayerIndexByLayerUrl(this.currentAttrs.config.url); if (layerId === 15){ queryParams.orderByFields = ["STATION"]; } else if (layerId === 16){ queryParams.orderByFields = ["DEPARTMENT"]; } else if (layerId === 17){ queryParams.orderByFields = ["STATION"]; } else if (layerId === 18){ queryParams.orderByFields = ["NAME"]; } else if (layerId === 36){ queryParams.orderByFields = ["SITE_NAME"]; } else if (layerId === 31){ queryParams.orderByFields = ["NAME01"]; } else if (layerId === 32){ queryParams.orderByFields = ["PARK_NAME"]; } else if (layerId === 33){ queryParams.orderByFields = ["Name"]; } else if (layerId === 29){ queryParams.orderByFields = ["Name"]; } else if (layerId === 30){ queryParams.orderByFields = ["AGENCY_CD"]; } else if (layerId === 38){ queryParams.orderByFields = ["NAME01"]; } else if (layerId === 39){ queryParams.orderByFields = ["NAME"]; } else if (layerId === 10){ queryParams.orderByFields = ["Name"]; } else if (layerId === 11){ queryParams.orderByFields = ["NAME"]; } else if (layerId === 13){ queryParams.orderByFields = ["Cemetery"]; } else if (layerId === 12){ queryParams.orderByFields = ["Precinct"]; } var queryTask = new QueryTask(this.currentAttrs.config.url); return queryTask.execute(queryParams); }, Hope it helps.
... View more
04-15-2015
11:13 AM
|
1
|
0
|
1273
|
|
POST
|
Robert....good call. I never thought to look in there. I was so focused on the analysis tool that they released. Works great! I'm really surprised that the Tech Support didn't think of this either.
... View more
04-15-2015
07:23 AM
|
0
|
1
|
2080
|
|
POST
|
Well here is what I have so far. I was able to grab the sample Data Extract Widget and get it working, but this is a self contained website, which is very plain. Since I have very limited programming skills I have most likely taken this as far as I can. I'm struggling with trying to get this code converted over to a usable widget... either in WAB or outside. ------------------ <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>Data Download</title> <link rel="stylesheet" href="http://js.arcgis.com/3.13/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css"> <style> html, body, #map { height: 100%; width: 100%; margin: 0; padding: 0; } #HomeButton { position: absolute; top: 95px; left: 20px; z-index: 50; } body { background-color: #FFF; overflow: hidden; font-family: "Trebuchet MS"; } .claro .dijitBorderContainer-child { border: none; } .claro .dijitBorderContainer-dijitContentPane, .claro .dijitContentPane { padding: 0; } .claro .dijitTitlePaneContentInner { line-height: 1.4em; } #controls { position:absolute; top:1em;right:1em; width:auto !important; height:auto !important; z-index:10; } #loading { display: none; vertical-align: middle; } .freehandIcon { background-image:url(./images/i_draw_freepoly.PNG); width:20px; height:20px; } .polyIcon { background-image:url(./images/i_draw_poly.png); width:20px; height:20px;} </style> <script src="http://js.arcgis.com/3.13/"></script> <script> var gp, map; require(["esri/map", "esri/dijit/HomeButton", "esri/dijit/Scalebar", "esri/config", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/tasks/Geoprocessor", "esri/tasks/FeatureSet", "esri/toolbars/draw", "esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol", "esri/graphic", "esri/Color", "dojo/dom", "dojo/dom-style", "dojo/query", "dojo/parser", "dijit/registry", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/TitlePane", "dijit/form/CheckBox", "dijit/form/ComboBox", "dojo/domReady!"], function(Map, HomeButton, Scalebar, esriConfig, ArcGISDynamicMapServiceLayer, Geoprocessor, FeatureSet, Draw, SimpleFillSymbol, SimpleLineSymbol, Graphic, Color, dom, domStyle, query, parser, registry) { // Create all dijits. parser.parse(); // Prevent flash of unstyled content(FOUC). domStyle.set(query("body")[0], "visibility", "visible"); // Specify where the location of the proxy to use to communicate with the extract GP service. esriConfig.defaults.io.proxyUrl = "/proxy/"; // Keep a reference to the loading icon DOM node. var loading = dom.byId("loading"); map = new Map("map", { basemap: "", center: [-77.844, 41.834], zoom: 10 }); home = new HomeButton({ map: map }, "HomeButton"); home.startup(); scalebar = new Scalebar({ map: map, // "dual" displays both miles and kilmometers // "english" is the default, which displays miles // use "metric" for kilometers scalebarUnit: "dual" }); map.on("load", initSelectionToolbar); var homelandSecurity = new ArcGISDynamicMapServiceLayer("http://..../arcgis/rest/services/sitename/MapServer"); map.addLayer(homelandSecurity); gp = new Geoprocessor("http://.../arcgis/rest/services/.../GPServer/Extract%20Data%20Task"); gp.setOutSpatialReference({wkid:102100}); registry.byId("polygon").on("click", function() { activateTool(this.id); }); registry.byId("freehandpolygon").on("click", function() { activateTool(this.id); }); registry.byId("extract").on("click", extractData); function initSelectionToolbar() { map.graphics.clear(); selectionToolbar = new Draw(map); selectionToolbar.on("draw-end", function(e) { selectionToolbar.deactivate(); var symbol = new SimpleFillSymbol( "solid", new SimpleLineSymbol("dash", new Color([255,0,0]), 2), new Color([255,255,0,0.25]) ); var graphic = new Graphic(e.geometry, symbol); map.graphics.add(graphic); }); } function activateTool(tool) { map.graphics.clear(); // The draw.activate expects a string like "polygon" or "freehand_polygon". selectionToolbar.activate(tool); } function extractData(){ //get clip layers var clipLayers = []; if ( registry.byId("layer0").get("checked") ) { clipLayers.push("schools"); } if ( registry.byId("layer1").get("checked") ) { clipLayers.push("villages"); } if ( registry.byId("layer2").get("checked") ) { clipLayers.push("streams"); } if ( registry.byId("layer3").get("checked") ) { clipLayers.push("streets"); } if ( registry.byId("layer4").get("checked") ) { clipLayers.push("railway"); } if ( registry.byId("layer5").get("checked") ) { clipLayers.push("driveways"); } if ( registry.byId("layer6").get("checked") ) { clipLayers.push("utils"); } if ( registry.byId("layer7").get("checked") ) { clipLayers.push("buildings"); } if ( registry.byId("layer8").get("checked") ) { clipLayers.push("ipars"); } if ( registry.byId("layer9").get("checked") ) { clipLayers.push("Parcels_Owner"); } if ( registry.byId("layer10").get("checked") ) { clipLayers.push("WaterSA"); } if ( registry.byId("layer11").get("checked") ) { clipLayers.push("Centre"); } if ( clipLayers.length === 0 || map.graphics.graphics.length === 0 ) { alert("Select layers to extract and draw an area of interest."); return; } var featureSet = new FeatureSet(); var features = []; features.push(map.graphics.graphics[0]); featureSet.features = features; var params = { "Layers_to_Clip": clipLayers, "Area_of_Interest": featureSet, "Feature_Format": registry.byId("formatBox").get("value") }; domStyle.set(loading, "display", "inline-block"); gp.submitJob(params, completeCallback , statusCallback, function(error){ alert(error); domStyle.set(loading, "display", "none"); }); } function completeCallback(jobInfo){ if ( jobInfo.jobStatus !== "esriJobFailed" ) { gp.getResultData(jobInfo.jobId, "Output_Zip_File", downloadFile); } } function statusCallback(jobInfo) { var status = jobInfo.jobStatus; if ( status === "esriJobFailed" ) { alert(status); domStyle.set("loading", "display", "none"); } else if (status === "esriJobSucceeded"){ domStyle.set("loading", "display", "none"); } } function downloadFile(outputFile){ map.graphics.clear(); var theurl = outputFile.value.url; window.location = theurl; } }); </script> </head> <body class="claro"> <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-prps="gutters:false" style="width: 100%; height: 100%;margin:0;"> <div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"> <div id="HomeButton"></div> <div data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Extract Data'" id="controls"> 1.Select area of interest <br> <button id="polygon" data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'polyIcon', showLabel:false"> Polygon </button> <button id="freehandpolygon" data-dojo-type="dijit.form.Button" data-dojo-props="iconClass:'freehandIcon', showLabel:false"> Freehand </button> <br><br> 2.Select Layers to extract data from <br> <input id="layer0" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer0">Schools</label><br> <input id="layer1" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer1">Villages</label><br> <input id="layer2" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer2">Streams</label><br> <input id="layer3" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer3">Streets</label><br> <input id="layer4" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer4">Railway</label><br> <input id="layer5" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer5">Driveways</label><br> <input id="layer6" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer6">Utility Roads</label><br> <input id="layer7" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer7">Buildings</label><br> <input id="layer8" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer8">Unsold Lots</label><br> <input id="layer9" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer9">Parcels</label><br> <input id="layer10" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer10">Water Service Areas</label><br> <input id="layer11" data-dojo-type="dijit/form/CheckBox" checked="checked" type="checkbox"/> <label for="layer11">Municipal Lines</label> <br><br> 3.Specify download format <br> <select data-dojo-type="dijit/form/ComboBox" id="formatBox"> <option>Shapefile - SHP - .shp</option> <option>File Geodatabase - GDB - .gdb</option> <option>Autodesk AutoCAD - DXF_R2007 - .dxf</option> <option>Autodesk AutoCAD - DWG_R2007 - .dwg</option> <option>Bentley Microstation Design (V8) - DGN_V8 - .dgn</option> </select> <br><br> <button id="extract" data-dojo-type="dijit/form/Button">Extract Data</button> <img id="loading" src="images/loading.gif"> </div> </div> </div> </body> </html>
... View more
04-15-2015
06:56 AM
|
0
|
4
|
2080
|
|
DOC
|
Got it... Thanks Sent from my Verizon Wireless 4G LTE DROID
... View more
04-14-2015
01:35 PM
|
0
|
0
|
6247
|
|
DOC
|
I don’t see that option in the demo site…am I missing something. ~ Nick
... View more
04-14-2015
12:49 PM
|
0
|
0
|
6247
|
|
POST
|
Hi Luke, Here is an option for the Contact Us. I used the About widget built into WAB and added some text with the mailto: link into it. I created a new icon (folder) and renamed the widget links.
... View more
04-14-2015
12:44 PM
|
1
|
1
|
1799
|
|
DOC
|
Hi Robert, Great addition to the widget in hijacking the attribute table. Much appreciated. One thing I noticed in the live demo site is that the attribute window is populated on the initial search that you run, but any additional searched turn up 0 results in the attribute window. In other words...when I click on the link and it zooms to the location and select the point they show up in the attribute window. If I select another traffic camera search it shows nothing in the attribute window. Using Firefox
... View more
04-14-2015
12:32 PM
|
0
|
0
|
6247
|
|
POST
|
Based on the info I have found the Analysis tools can only be used with AGOL. I have some custom code that uses my URL information. I pulled this from the ArcGIS API Samples page. Anyways, I have that running successfully, but my next massive hurdle is getting it into a usable Widget in WAB.
... View more
04-14-2015
11:01 AM
|
1
|
6
|
2080
|
|
POST
|
Hi Rebecca, No worries. I am using the local layer widget. Based on what I've seen from the code / interface it forces my to add an AGOL Service and save any datasets into AGOL. Neither option is desirable, but the last one is exceptionally troubling since it would consume credits every time someone pulled data from us...not to mention we would have to add them as a user in our Org. I really don't know what ESRI is thinking with this AGOL, but I feel like they are shooting themselves in the foot with it. I plan on doing some more digging in the code today to see what I can uncover. Thanks, Nick
... View more
04-13-2015
04:56 AM
|
0
|
7
|
2080
|
| Title | Kudos | Posted |
|---|---|---|
| 5 | 04-05-2024 05:00 AM | |
| 11 | 03-05-2024 04:49 AM | |
| 1 | 01-24-2019 06:27 AM | |
| 9 | 11-18-2021 12:08 PM | |
| 1 | 04-14-2015 11:01 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-20-2025
05:52 AM
|