POST
|
Robert and all, Sorry for the delay, some other more immediate tasks arose that needed to be dealt with. I've managed to get a functional version up and running in-house, and have made that version available on Github in addition to attaching it to this post. I'm very willing to admit that this isn't entirely perfect, or optimal, or anything of the sort, - merely functional - though I'd like to improve upon it when able. I figured that by posting it on Github if there were others who were interesting in working off of this template or altering it that they might be able to do so. I have no idea when I'll be able to go about fixing it up, but it does what we needed it to do for now. If anyone plans on implementing this, go into the setting/Setting.js file and update the line below the TODO with your Portal URL, as well as an email address or other POC in the else clause in onOpen in the Widget.js file. Applications built with this need to be housed on another web server accessible to your users, and a link to that server needs to be created as an item in your Portal. If there are any other questions about the widget or why I made any decisions that I did, feel free to ask. -Nikolas
... View more
03-15-2018
04:50 AM
|
0
|
0
|
1056
|
POST
|
My apologies, I didn't see that config file during testing because I never actually saved the application, I just added the widget and tried to test it immediately. That's actually pretty stupid of me, but I digress... The config json is now correctly being passed to that file, but the changes to that content are not. I initially set the json string to some meaningless value by default, and I update the information in it when the user closes the settings frame, during which time I also call the getter and setter. The instance's config file still contains the default, meaningless values. I haven't looked into this yet, but I'm assuming that I'm running into some issues with the order in which things are being called and executed.I plan on creating a button for the user to manually save the config as opposed to updating it when the user closes the settings. Any other suggestions would be greatly appreciated, however. Thank you!
... View more
03-08-2018
03:24 AM
|
0
|
2
|
1056
|
POST
|
Hello, For my custom widget, I have a config.json sitting in the directory .\arcgis-web-appbuilder-2.7\WebAppBuilderForArcGIS\client\stemapp\widgets\<widget_name> and the Setting.js in .\arcgis-web-appbuilder-2.7\WebAppBuilderForArcGIS\client\stemapp\widgets\<widget_name>\setting The setting.html and setting.js pages are a series of checkboxes with options that, when checked, are stored in an array. I turn this array into a .json. I'd like to have this .json be referenced by the widget when it's running in an application, and have this selection be unique for every instance of this widget instantiated on any application. I intend to do this by writing over the config.json, which I'm assuming is unique to each and any instance. Is this a correct assumption, and does this seem to be an effective way of going about doing this? Does altering the this.config in setting.js directly alter the config.json for that instance of the widget, or for the whole widget template? Thank you!
... View more
03-05-2018
03:37 AM
|
0
|
4
|
1056
|
POST
|
I'm having trouble getting a json created in the settings.js to communicate with the actual widget.js in my custom widget. I've got a widget I'm working on that allows the user to specify some settings when it's first created in the Web Appbuilder. When the settings is closed, it creates a json representation of the settings and replaces the (initially empty) config.json file with the new one. This appears to function correctly when I log everything to the console in the settings.js, but when I try to load the config from the widget.js, all I'm seeing is the initially empty json. I'm not sure how I'm supposed to go about overriding the getConfig and setConfig functions in the settings.js to get the new json to replace the empty one. As it stands right now, those two methods exist in the settings.js and look like this: setConfig: function(config){ this.config = config; }, getConfig: function() { this.config.users = outFinal; return this.config; }, where outFinal is the json. This is also the argument being passed to setConfig. Anyone have any support regarding something like this? Am I on the right track or going in a completely incorrect direction? Thank you!
... View more
03-02-2018
07:55 AM
|
0
|
6
|
1495
|
POST
|
The boundary line and the reservoir pool polygons are zippped shapefiles (using 7-zip, saved as .zip) that I've loaded into the map from my computer using the Map Viewer's "Add Layer From File" tool. The point features are from a GDB. When I find the time, I'll toy around with changing some of those data types and see if I can't get something working. Thank you and Rupert for the help!
... View more
02-06-2018
03:36 AM
|
0
|
1
|
519
|
POST
|
Hoping that digging up a year-old unanswered issue isn't a bad idea, here goes: I'm running into the same issue as described in the initial post. I saved the story map a bunch of times prior to this, and now I'm going back in to edit the descriptions with a link. Unfortunately, every time I click save, it says it's saving, I wait, and then it says "Save failed, please try again." I've tested this with Chrome Version 63.0.3239.108 (Official Build) (64-bit) and Firefox 57.0.2 (32-bit) so far with no results. Neither of the console logs provide any information relevant to the issue, unless the mixed content is the cause. The application is available here for your viewing pleasure. If this is deserving of a new post instead of reviving this one, please let me know.
... View more
02-05-2018
05:05 AM
|
0
|
4
|
519
|
POST
|
My organization would like to have Applications that are available to view by all Users within our Portal, but have editing privileges for the Layer(s) available only to named Group(s) and/or named User(s). My plan to go about doing this is to create a custom Widget to incorporate into all such Applications through which the publisher can specify either named Group(s) and/or User(s), as well as the Layer(s) that can be edited through the Application. I'm not very far along on this project, but I'd like to get some information before beginning: Is this an effective solution to solving the problem? Are there other existing solutions to this problem that would be easier to incorporate? Would is be easier to create a wrapper widget that simply verifies that the current user is approved, then enables the out-of-the-box editor widget? Any other advice or thoughts? Thank you!
... View more
01-26-2018
06:04 AM
|
0
|
2
|
845
|
POST
|
Alright, this worked. Thank you very much for all the help! I am going to mark your other reply as the correct answer just to encourage better practices. I'll see if I'm able to transition my work into something more along those lines. That said, this solution did resolve my issues with trying to post through jQuery and whatnot. Thanks again!
... View more
08-07-2017
03:32 AM
|
0
|
0
|
992
|
POST
|
I was having trouble getting it to work with the server you provided, unfortunately. I keep getting a vague 500 error {"error":{"code":500,"message":"Unable to complete operation.","details":[]}} with no details when trying to post the feature to that server, whether through the function below or the actual addFeatures link. As a result, this may not be 100% reproducible, for which I apologize. Regardless, here's the function where I'm running into trouble. I stole the jquery posting from another Geonet thread. If there's anything else I can try to supply for you, please let me know. Assume that the arguments "author" and "comment" are user-defined strings, and that "latitude" and "longitude" are stored as numerical representations of coordinates, such as 21.107012104600532. function addComment(latitude, longitude, author, comment) { var url = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0/addFeatures"; //again, I was unable to get this function to work with this server var feature = { "geometry" : {"type" : "Point", "x": longitude, "y":latitude }, "attributes" : { "name" : author, "comments": comment }, }; $.post(url, { features: JSON.stringify([feature]), f: "json" }) .done(function(results) { console.log(results); }) .fail(function(error) { console.log(error); }); } This function works to post it to the server I'm working with, but when it does, I believe all the coordinates are read in as measurements in meters as opposed to latitude and longitude coordinates because they're all around the origin. I've tried multiplying by different values to get closer to where these points should be, but I feel like that's not the most effective way to solve this problem. I've also tried specifying a spatialReference and wkid for the feature, but that wasn't helpful either.
... View more
08-04-2017
06:18 AM
|
0
|
2
|
992
|
POST
|
So, I've got a feature service that I'd like to be able to add a feature to through a Leaflet map. I've got it set up so that when the user clicks anywhere on the map, a Bootstrap modal pops up and lets them enter information about that point, to be added as attributes. The points are added to the map with all the appropriate attributes, but they're all clustered around the origin (equator, prime meridian). I assumed this was an issue with the spatial reference, so I explicitly set it to a different spatial reference, but that didn't help. I then attempted to convert from decimal degrees to meters with some rough math, which got it away from the origin, but not anywhere near close to where it should be. Is there a way to convert from decimal degrees through either the Esri Javascript API or Esri Leaflet API? Are there other ways to make sure the correct spatial reference is being used? Are there simple mathematical formulas to convert from degrees to meters? Any other suggestions?
Thank you in advance!
... View more
08-02-2017
08:06 AM
|
0
|
5
|
1689
|
POST
|
I noticed while trying to recreate the map using the .csv that I was presented with the warning "This file contains invalid characters or is missing some location data. Not all features have been added to the map." I suppose that the application may still be reading the invalid characters used in the .csv somehow.
... View more
02-10-2017
05:15 AM
|
0
|
0
|
599
|
POST
|
Thanks for the information Mark. I'll contact my superiors and see what I can do on my end to help you out.
... View more
02-10-2017
03:22 AM
|
0
|
0
|
599
|
POST
|
Recently, while altering the content in a Shortlist Story Map, I've noticed that, on occasion, my map will fail to load any of the locations saved to a tab. In every instance of this, it has been the case that all of my tabs, save for the first one, have failed to load their content. I was able to recover everyhting a few times by simply closing the application without saving and reopening it, and my content would load correctly when reopened. However, the last time, because I was editing the first tab, I failed to notice that the other tabs had deleted/failed and I saved the application. I believe that this permanently deleted my content. Fortunately, I have several copies of the map so it won't be too horrible to recover from, but I doubt that this functionality is intended. The content originated from a .csv which used to create a map, which was then used to create the application, with every field imported to the Story Map. Interestingly enough, when the same .csv was used to create a Series Story Map, there were several locations within it that were also unintentionally deleted (this was before I started on the project, so I can't provide more detail on how these may have been deleted). Similarly, when I used that same .csv to create my first Shortlist, prior to the incident described in the paragraph above, the same locations that were deleted in the Series deleted themselves from the Shortlist. Has anyone else encountered anything similar occurring with their content? Are there any plans to address such an issue? Has anyone run into issues occurring with other story map templates?
... View more
02-09-2017
08:03 AM
|
1
|
7
|
1078
|
POST
|
I was wondering if there was any way to select which tab is displayed initially in the Shortlist builder. I wanted to access the same application from different links corresponding with the different tabs in the app, while still letting the user change which tab is displayed after the initial one. Is it possible to do this with the builder, or is it always the case that when linked to the application opens whichever tab is ordered as the first tab?
... View more
12-15-2016
11:01 AM
|
0
|
3
|
693
|
Title | Kudos | Posted |
---|---|---|
1 | 02-09-2017 08:03 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|