|
POST
|
JAVA WAB 1.1 has a great new tool in the analysis widget. However, my enthusiasm was short lived when I found that the tool could only work with AGOL services...which renders this tool virtually useless. I'm thinking not to many agencies have the number of users, or the amount of credits needed, to hand out a website with this widget and allow outside groups to access and write data, (consume credits), out of your their organization. So, my real question... has anyone hacked this to run off of a local service out of ArcGIS Server? If I can produce the service in house I should be able to consume it in house!!!! Any advice or input is appreciated! Thanks. Robert Scheitlin, GISP Rebecca Strauch
... View more
04-10-2015
12:53 PM
|
0
|
9
|
5786
|
|
POST
|
Here is some code that you might find helpful. Robert Scheitlin helped me with this section. Alows me to sort the Query Results by a specific field. I nested the If statements to capture all of the different queries. This selects them based on the ID of the service. Add the bold section of code to the existing section for _queryByObjectIds _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 === 18){ queryParams.orderByFields = ["NAME"]; } var queryTask = new QueryTask(this.currentAttrs.config.url); return queryTask.execute(queryParams); },
... View more
04-08-2015
10:05 AM
|
0
|
3
|
2698
|
|
POST
|
One solution I found was to turn off popups in the local layer and use Robert's identify tool instead. Thanks for catching the typo Rebecca!
... View more
04-07-2015
09:22 AM
|
0
|
0
|
2167
|
|
POST
|
That was the trick. I had tried a variation of declaring the variable but I failed to include the additional code after the var layerid. At this point I should be able to nest the if statement to include the other layers that I am looking to sort right?
... View more
04-06-2015
09:57 AM
|
0
|
2
|
2770
|
|
POST
|
Not too much in that section. ESRI Tech support gave me the query.orderByFields property and together we were able to enter the following statement…. queryParams.orderByFields = ["STATION"] this worked fine for my first query (Firestations), but when I added another query that did not contain the STATION field it failed. ESRI Tech support said there would need to be an if statement and possibly some additional logic in the statement to get the query widget to sort based on the id of the service. I found the section of code (I think), and the variable that should contain the service id number (parseInt). Here is the If statement that I have with your previously mentioned changes... if (parseInt === 15) { queryParams.orderByFields = ["STATION"]; } When I had the parseInt = 15 it correctly sorted the field (I’m thinking this is because the logic wasn’t correct and it passed to the next line of code). When I changed it to your suggestion it worked…but did not sort correctly. My end goal is to say If the service ID = ## then sort by , else if ID = ## and so on… Here is the complete section of code that you are referring to… _queryByObjectIds: function(objectIds, returnGeometry){ var queryParams = new EsriQuery(); queryParams.returnGeometry = !!returnGeometry; queryParams.outSpatialReference = this.map.spatialReference; queryParams.outFields = this._getOutputFields(); queryParams.objectIds = objectIds; //if (parseInt === 15) // { // queryParams.orderByFields = ["STATION"]; // } var queryTask = new QueryTask(this.currentAttrs.config.url); return queryTask.execute(queryParams); }, I have commented out the section with the if statement so that the app works correctly. ~ Nick
... View more
04-06-2015
09:32 AM
|
0
|
4
|
2770
|
|
POST
|
I have corrected that line, but I think I need to add more logic to the if statement. It still won't sort correctly.
... View more
04-06-2015
08:12 AM
|
0
|
6
|
2770
|
|
POST
|
So I found the Query Widget to be useful, well about 75% useful. So, while the widget functions correctly and works well the results are unable to be sorted. This makes it difficult identifying the result that I want. The main problem that I see with this is that it uses the objectID to sort the results (confirmed by esri tech support). Thankfully they got me on the right track in coding the tool to be sorted. We found that this code queryParams.orderByFields = ["FIELD_NAME"]; placed after line 828 directly following this code, queryParams.objectIds = objectIds; correctly sorted my first query in the widget. However it failed when a second was added. The tech supports advice was to add an if statements using the url / ID to differentiate the queries and sort each one accordingly. So I found the following code around line 416 - 419 that parsed out the id number from the url. ------------------------ _getLayerIndexByLayerUrl: function(layerUrl){ var lastIndex = layerUrl.lastIndexOf("/"); var a = layerUrl.slice(lastIndex + 1, layerUrl.length); return parseInt(a, 10); I used the variable parseInt in an if statement (below) and it correctly sorted the corresponding search, but failed on the others (obviously), and also killed all of the click functions. -------------------- if (parseInt = 18) { queryParams.orderByFields = ["NAME"]; } As I see it now I have 2 options... Correct the if statement to work correctly...but what am I missing? Build multiple queries into a group widget... I think this is possible right? I don't like option 2 as much even though, if possible, it would be easiest. I would be able to hard code the sort field per query and all would be good. However, the current Query widget lends itself well to having multiple queries in the single widget. Thoughts???? Robert Scheitlin, GISP
... View more
04-01-2015
12:44 PM
|
2
|
9
|
6540
|
|
DOC
|
Hi Robert, Just configured this widget and it works great! Thanks for the contributions! Anyways, I decided to use this to account for the oddities that I was seeing with the local layer widget and I think this will be sufficient. At this point I'm trying to make a small modification to the size of the form during the initial load. I want the height to be larger. I've been looking at the style.css and changing the height, min-height (lines 4 & 6), and another height tag at line 26, but I have not seen any changes. Is there any way to change the height of the widget so that more information appears in the list? Am I in the right area for this?
... View more
03-30-2015
12:19 PM
|
0
|
0
|
28225
|
|
POST
|
Ok...so I started from a fresh extraction of JAVA WAB and the same problem exists. The draw and measure tools activate the popup when drawing or measuring a polyline / polygon, or perform a function where you click and release on the same location, then the popup is activated and displays. Any ideas? I am currently searching through the code trying to find out what the problem could be. I'm looking for things like onClick, click, and the this.originOperLayer.ur or any variation of that to see if it needs to be replaced with the new link. These apps are also in State Plane feet... but I don't have any problems with this prior to the activation of the local layer widget.
... View more
03-30-2015
09:41 AM
|
0
|
1
|
2167
|
|
POST
|
Ok....so I have things working... Kind of. I was able to successfully add the dynamic service and configure everything. It seems to be fairly easy. I was also able to use the custom popup config to get my house pictures. Here is the problem I am running into at the moment. I have an app that uses AGOL Map of of my web services... ArcGIS Web Application Everything is working correctly in this site. I have 1 small quark with the location tool, but there is an easy workaround for it. Here is another app that I created using the local layer widget. ArcGIS Web Application . I have found that since I added the local layer widget there have been a lot of glitches. In this app when I use the measure or draw tool it opens my popups for wherever I clicked. This doesn't happen with the AGOL web map version. Also, I wanted the splash screen to always show up. I found the code that someone had mentioned and commented it out. In the AGOL web map version this worked. In my local layer version it caused and error message. So I actually changed one line of code from false to true and corrected the issue. My real problem is with the popups at this point. Has anyone else experienced any sort of problems with functionality? I'm debating whether I should start from a fresh install of WAB and then installing the local layer widget. Any ideas?
... View more
03-27-2015
07:39 AM
|
0
|
2
|
2559
|
|
POST
|
That worked… changed it to the png and it worked fine. ~ Nick
... View more
03-25-2015
12:53 PM
|
0
|
0
|
2559
|
|
POST
|
Yes… I selected JPG as the setting in the local widget setting… would that be the problem? ~ Nick
... View more
03-25-2015
12:48 PM
|
0
|
0
|
2559
|
|
POST
|
So...it appears that I had one of those ahh I'm being an idiot moments and missed the obvious ... thanks Robert Scheitlin, GISP for the wake up call. One thing I am noticing is that my envelope for the dynamic service over-rides the basemap services from the eBasemap widget. I know I can change the transparency of the services in the Local Layer widget but I really don't want everything in my dynamic service to be transparent. Similarly, I don't want to have to add imagery into every service. So... is there a way to turn the envelope color to clear or no color? From what I can tell the envelop for the service, when the service transparency is 0% the envelop appears white, even though the same service in flex, and in JAVA from the AGOL service, allows the basemap to show through the envelope without any problem. I must also say that the service being generated from ArcServer has the frame color set to no color. Thoughts?
... View more
03-25-2015
12:31 PM
|
0
|
3
|
2559
|
| 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
|