|
POST
|
Thanks Robert, I attached the file. I did get around the problem by creating a 'subtitle' and adding a div in the html doc. Originally, the 'title' and 'subtitle' were combined in one line. I would still like to know why the html tags don't seem to work at times, I do run into this often when editing widget configs. It just seems weird that the line breaks work fine in some areas and not in other in the same file. As far as syntax, I tried inserting the breaks just about every way possible with no luck. I also make sure to clear the browser cache each time. Just one observation I have noticed regarding the config files, as far as consistency. Not sure if this makes any sense, but the files that have the more 'structured' format (normally found in the widget folder) are the ones I seem to have most issues with. I assume this is because they are closely tied to the html and javasript files, therefore any edits must be done across all associated files. I am learning not to try and edit the configs located in the widget folders, and instead create a new one and located inside the configs folder. That way, although they look messy, all of the coding is included in the one file and you just have to worry about syntax and css. The attached file looks like it might have been copied and pasted from the widget folder into the configs folder, so I don't know if that may be causing some issue with the html tags.
... View more
01-30-2018
11:43 AM
|
0
|
4
|
1941
|
|
POST
|
Yes, Robert is right Rebecca. Sorry, I should have been more specific.
... View more
01-30-2018
09:41 AM
|
0
|
6
|
1941
|
|
POST
|
This is kind of frustrating because I can't seem to figure out why html tags sometimes work in my config files and sometimes they don't work. I have a config.json that I am editing for a customized flash widget. All of the html tags work just fine, accept for the 'title'. When I insert a line break into the title: "title": "Seabird Rehabilitators\n<br />and Transporters", I get this: The tags in the description are working just fine: "description:" ...stay with the bird until help arrives. \n<br />\n<br />\n<a <---These are working href=\"http://myfwc.com/education/wildlife/unhook/\"... I must be missing something very obvious but I am not seeing it!
... View more
01-30-2018
06:26 AM
|
0
|
10
|
2923
|
|
POST
|
I have an application that uses the 'Near Me' widget to query a database and return a list of seabird rehabbers based on the distance from an address, or from any location set from a mouse click on map. The query result (rehabbers list) then appears in a panel in the widget beneath the search box and zoom slider. It shows the name of the rehabber and distance from the address/point. I also have a legend that symbolizes the rehabbers by permit type (there are two symbols). I don't like having to toggle between the legend and 'Near Me' widget, so I as able to place the legend inside the 'Near Me' widget just above the list of rehabbers. I think this is a step in the right direction, but I would also like to place a symbol beside each list item so people using the app can easily see what permit type the rehabber has. I can list the permit type in the table as well, but then you have to go into the details panel of the rehabber to view the permit type which can be a little inconvenient. I have looked, but haven't been able to find a method to extract the correct symbol from the legend in order to show it in a div beside the rehabber name. The feature layer with the symbology is published on REST services, so it can't be that hard to access the symbol, just haven't been able to figure it out yet. If anyone knows of a method that does this, or maybe can point me in the right direction on how to approach the scripting that would be great. I know where the script goes and generally how to set it up so that the symbol will appear next to the rehabber name in the feature list, it's just the specific code/method to access the correct legend symbol that is escaping me 🙂 There are actually several places in the 'Near Me' widget item-list.js file where I need to add code, but I am pretty sure the specific code I need for extracting the legend symbol should go here (where I have the question mark): _setItemLegend: function (templateDiv, value) { var divItemLegend = query(".esriCTItemLegend", templateDiv)[0]; if (divItemLegend) { var value = code/method to get legend image? domAttr.set(divItemLegend, "innerHTML", value); domAttr.set(divItemLegend, "Legend", value); } }, Thanks for any ideas!!
... View more
01-17-2018
07:47 AM
|
0
|
2
|
1013
|
|
POST
|
Got it working.The problem seemed to be that it was buried too deeply inside 3 tiers of functions. I created a function called _datepicker in the clazz object containing the datepicker jquery code, then referenced it in the startup function. I also think that being inside the $(document).ready(function) was causing some scope issues, so I am not using it.
... View more
12-28-2017
07:55 AM
|
1
|
0
|
1122
|
|
POST
|
Thanks Robert. I am still getting the same error, but I think you are on the right track and at least it puts me on the right path!
... View more
12-27-2017
01:04 PM
|
0
|
0
|
1122
|
|
POST
|
I have recently updated a web app to WAB 2.4 that pulls black bear sighting data from a server when queried. The query widget has 7 parameters with which to filter results, two of which are a start date and end date. I am using the jquery datepicker for the dates, but I want the app to automatically update the results when the calendar is closed. I already have an "onchange:" event set in the widget html, which works fine for the other parameters, but not with the datepicker. I have been trying to use the onClose method from within the datepicker object to search the database and update the results when the calendar is closed, but when I try and call a function that has been defined outside of the $(document).ready(function), I get a type error: 'this._BBearFetch is not a function'. I am fairly sure this is a scope issue, but I cannot figure out how to solve this. The function I am trying to call is defined as a value in the clazz object, and I located the datepicker in the startup: function(). I hope this makes sense, but I have attached a code snippet for more clarity. Thanks for any advice, I am sure I am missing something obvious.
... View more
12-27-2017
07:02 AM
|
0
|
3
|
1222
|
|
POST
|
I haven't accessed ArcGIS online for a couple of months, and now I can't figure out how to access the 'My Content' tab since esri has changed everything. I used to be able to access it through the Dashboard, but nothing is there anymore. Any help would be appreciated.
... View more
09-14-2017
06:08 AM
|
0
|
0
|
800
|
|
POST
|
I have an app that pulls data from a server whenever queried, and based on the query parameters renders the proper symbology on the map layer. For the initial query, the legend updates just fine, however, on subsequent queries the legend does not automatically update. You have to toggle the layer off, then on again to get the Legend widget to update, as well as the legends in the Layer List widget. Has anyone else ran into this, and is there a way to force the legend to refresh every time there is a new query? In the widget.js file, there is a '_bindEvent' function that appears to do this, and I assume that 'refreshLegend' implies redrawing the legend symbols to reflect the new data rendered in the map layer. I still have a lot to learn with javascript, however, and my understanding isn't that good yet. _bindEvent: function() { if(this.config.legend.autoUpdate) { this.own(on(this._jimuLayerInfos, 'layerInfosIsShowInMapChanged', lang.hitch(this, 'refreshLegend'))); this.own(on(this._jimuLayerInfos, 'layerInfosChanged', lang.hitch(this, 'refreshLegend'))); this.own(on(this._jimuLayerInfos, 'layerInfosRendererChanged', lang.hitch(this, 'refreshLegend'))); } } IF anyone is interested, I got this sorted out by setting the Query widget to clear the preceding query before running a new query. For some reason, the Legend event handlers only see the info changes when the map is clear and is blind to them whenever the layer info changes from an existing query to a new query.
... View more
06-14-2017
08:35 AM
|
0
|
0
|
1418
|
|
POST
|
Thanks Jordan. I like your idea about using the distance between points, it make more sense in terms of consistency since logging based on time doesn't take speed of the person being tracked into account. It was actually more code because of the distance calculation, but it works and that's all that matters!
... View more
06-14-2017
07:16 AM
|
0
|
1
|
1098
|
|
POST
|
Looking for some advice here, as I am still learning Javascript, but have been tasked with making some changes to a widget that was authored by one of my predecessors. The widget tracks your path, logs the positions in a log file, and creates a csv file for export. The watchPosition() method takes positions constantly, which while great for accuracy, creates way too many entries in the log file and the csv file. I am looking for the best way to limit logged entries by either setting some sort of logging interval based on time, or by counting loops. I have been playing around with different scripts, and have found one that works fine in a testing environment, but when I insert it into the widget.js file it doesn't seem to do anything. The script basically takes a time stamp before the loop, and another one each time the loop repeats. I set up an array to capture the 'distance' between each time stamp and to capture only unique values (seconds). I then have it set up to log the position whenever the last added value entered into the array is divisible by 2. The problem I am having is that the variables I defined before the loop aren't being recognized inside the loop, hence the distArray never gets populated. I don't know if this is a hoisting issue, or maybe has to do with the asynchronous nature of the widget.js code. Here is a snippet of my code, and I have also attached the widget.js file. Not looking for anyone to write me code for me, but I am probably must missing something that may be obvious to you guys! Thanks targetlayer.queryFeatures(query, lang.hitch(this, function(featureSet) { var ResultFeatures = featureSet.features; var currenttime = this.TimeStamp(); var distArray = []; var startTime = new Date().getSeconds(); for(var i = 0; i < ResultFeatures.length; i++){ var loopTime = new Date().getSeconds(); var distance = loopTime - startTime; var currentLoc = (currenttime + ',' + PositionSet[0].toPrecision(8) + ',' + PositionSet[1].toPrecision(8) + ',' + targetlayer.name + ',' + ResultFeatures.attributes[resultField]); var currentLocArray = currentLoc.split(","); resultsArray.push(currentLocArray); var logValue = this.Log.value += '\r\n' + currentLoc; if (distArray.indexOf(distance) === -1) { distArray.push(distance); if (distance % 2 == 0) { logValue; } else { continue; } }
... View more
06-12-2017
07:12 AM
|
0
|
3
|
1311
|
|
POST
|
I agree, that sounds like it would be a lot easier, but I don't have that option. There is a lot of information, as well as links, in the widget, and it needs to be dockable in the header controller for easy access by users. The good thing about the panel widget in the head controller is that (when it works), it will dock at the bottom of the screen when the app opens in mobile layout. I can put a smaller logo the head controller and it will work, but unfortunately, the logo is kind of important and needs to be the same no matter the screen size. Actually, I just solved it. The two widgets on the far right are the ones that get grouped together when the screen shrinks, so all I had to do was re-order the widgets so the About widget doesn't get grouped. Duh!
... View more
05-03-2017
07:30 AM
|
0
|
0
|
635
|
|
POST
|
I have my 'About' widget set to open at startup. When in mobile layout, however, it fails to open on startup. I know this because the header controller creates a container in which to place icons when the screen size shrinks to the point that they no longer fit on the header controller. Once the 'About' widget is placed inside the 'more' widgets container, it is no longer located directly on the header controller, which prevents it from opening at startup. At least this is my understanding of what is happening. I am pretty sure I need to modify the Widget.js file in the HeaderController, but any pointers as to what code to look for and how to edit it would be great!
... View more
05-02-2017
01:18 PM
|
0
|
2
|
870
|
| Title | Kudos | Posted |
|---|---|---|
| 8 | 10-28-2025 10:15 AM | |
| 2 | 10-14-2025 06:36 AM | |
| 1 | 09-16-2022 09:31 AM | |
| 1 | 06-13-2024 05:45 AM | |
| 1 | 06-26-2025 06:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-06-2025
04:20 AM
|