|
POST
|
I did get my graphics to start drawing/working again. The issue seemed to be that I had a mismatch in the order of all the dojo declare items at the top of the javascript. Very frustrating to find it was something so simple, but I'll consider it an expensive lesson learned as I move forward with dojo. Very sneaky that it doesn't give any kind of error related to the order of the declares, it just fails to work right. Grrrr...
... View more
11-10-2015
01:31 PM
|
0
|
0
|
735
|
|
POST
|
I've been attempting to load graphics to my map programmatically, and I think I've finally figured out that it only fails if I have the jQuery library loaded as part of the define statement in the widget. (e.g. the UseJQuery demo widget, or the custom widget I've been working on.) example code (the show-id just refers to a button on the html): define(['dojo/_base/declare', 'jimu/BaseWidget','esri/geometry/Point', 'esri/symbols/SimpleFillSymbol', 'esri/symbols/SimpleMarkerSymbol', 'esri/symbols/SimpleLineSymbol', 'esri/layers/ArcGISDynamicMapServiceLayer', 'esri/graphic', 'dojo/_base/Color', 'esri/SpatialReference', 'jimu/loaderplugins/jquery-loader!https://code.jquery.com/jquery-git1.min.js'], function (declare, BaseWidget, Point, SimpleLineSymbol, return declare(BaseWidget, { startup: function(){ var map = this.map; $('.jimu-widget-use-jquery .show-id').click(function () { var ptSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 32, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color("#00FF00"), 1), new Color("#00FF00")); var testPt = new Point(-8442027.57807591, 4910634.987265695, new SpatialReference(102100)); var testG = new Graphic(testPt, ptSymbol); $('.jimu-widget-use-jquery .my-title').text('title added by jquery.'); } }); }); The same lines that define the ptSymbol, testPt, and testGraphic work in the Draw widget. So my question is this - Is the use of jQuery necessarily separate from creating graphics on the map, and do I have to use some other method of calling my REST endpoints that is dojo-specific to still be able to interact with the map? Thanks in advance, Mikkel
... View more
11-04-2015
01:17 PM
|
0
|
1
|
3657
|
|
POST
|
Thanks for the confirmation – I was thinking that was the case. Mikkel
... View more
11-04-2015
11:11 AM
|
0
|
1
|
1549
|
|
POST
|
One other question, Robert – is it possible to deploy the custom widgets in an app hosted on AGOL? We are trying to host the app I’m working on there, but the only help items listed for deployment look like I need to copy the widgets folder into my web application, which implies to me that I can only use custom widgets if we host through our own webserver, and not through AGOL. Is this the case? Mikkel
... View more
11-04-2015
10:15 AM
|
0
|
3
|
1549
|
|
POST
|
I don't know about dojo templates, and agree that so far they are difficult to work with (not having all the declares match something in my function declaration, for instance, was a trip up). As for a javascript API documentation link, I have the following bookmarked, and have been able to get some basic custom functionality going based on that: ArcGIS API for JavaScript
... View more
11-03-2015
02:41 PM
|
0
|
1
|
1857
|
|
POST
|
I can see in WAB where i can flag the results of one of my fields as a link. If the data in my features doesn't actually contain a URL, however, is there a way to put one of the fields into a format string so that I can build a URL based on it? For instance, if the feature returned has a field called docId and I want to pass that to an external URL that uses that in the query string to find a document, (ie end result is http://mydoclibrary.com/documents.aspx?docid=12345) how can I build that into my widget? I know i could create a full URL field as a calculated field in the feature class and link that, but I'd rather not have to mess with the underlying data, as I don't strictly have control over that. Thanks for any ideas, Mikkel
... View more
11-03-2015
02:12 PM
|
0
|
6
|
3861
|
|
POST
|
I've been working on a solution similar to this, as I have client that needs to query by values in the related tables. I'm pursuing the route of running a query against the REST endpoint of the related table (which is not a feature class with geometry in my case) to bring back a list of parent IDs, which I will then query against that endpoint to get the geometries I need. I've not found a pre-built way to do it, so it has all been custom js/jquery so far in a custom widget. If there are other ideas, I'm open...
... View more
11-03-2015
02:05 PM
|
0
|
4
|
1552
|
|
POST
|
One other note - the jqeury and dijit work ok together, but apparently the order in which the declare statements are added matters - the dijit needs to come AFTER the jquery: define(['dojo/_base/declare', 'jimu/BaseWidget', 'jimu/loaderplugins/jquery-loader!https://code.jquery.com/jquery-git1.min.js', 'dijit/form/ComboBox' ],
... View more
10-30-2015
11:51 AM
|
0
|
0
|
1516
|
|
POST
|
Yep, putting the identify in the root did the trick. Thanks very much. Mikkel
... View more
10-30-2015
09:21 AM
|
0
|
1
|
1516
|
|
POST
|
It's been a little of both - I can get a custom widget to display including with a dijit combobox now, as long as I'm not trying to also load the jquery library in the declare statement: 'jimu/loaderplugins/jquery-loader!https://code.jquery.com/jquery-git1.min.js', This I find strange because the same line works fine in the UseJQuery sample widget. Yesterday, I tried to put your Identify (copied in the whole directory) in the directory: C:\arcgis-web-appbuilder-1.2\client\stemapp\widgets\samplewidgets The identify icon then comes up in the webappviewer toolbar as expected, but will not execute. The only message the displays is a popup that says "Create widget error: Widgets\samplewidgets\Identify\Widget" I'm continuing to wade through all this, but just wanted to see if that was something that had come up in the past. I'm guessing just I have some configuration item set incorrectly, as all the tutorials appear to make it fairly easy to build custom stuff.
... View more
10-30-2015
09:08 AM
|
0
|
3
|
1516
|
|
POST
|
Robert, I love all the widgets, and they are very helpful. I'm having issues, however, with running any of them on my local webappviewer that contain Dojo/Dijit modules. Do you have any suggestions on what may be causing that? I've tried unsuccessfully adding script tags at the top of the Widget.html files to force load dojo: <script>dojoConfig = {parseOnLoad: false}</script> <script src='http://dojotoolkit.org/reference-guide/1.9/_static/js/dojo/dojo.js'></script> In trying to step through the js in developer mode, it jumps right over the define statement at the top of Widget.js, so nothing within it executes. If i put a basic dijit combo box in a regular HTML page that runs through my IIS, it will load as expected. It appear to have problems only within my WAB instance. Thanks, Mikkel
... View more
10-30-2015
08:38 AM
|
0
|
5
|
1344
|
|
POST
|
Amy, Did you end up finding a way to make the attribute table widget refresh with newly added tables? I'm trying to build up a web app as I get the layers in and published, and if I have to wait until the end that's one thing, but it would be a PITA if that's the case. Thanks, Mikkel
... View more
10-27-2015
12:01 PM
|
0
|
2
|
2687
|
|
POST
|
I realize that this post is over two years old now, but I'm trying to run this script using 10.3 - has this requirement to be logged in through ArcMap been corrected? I'm trying to set up exactly the situation you described - a nightly auto-update. Any ideas are greatly appreciated..
... View more
10-14-2015
03:45 PM
|
0
|
0
|
2067
|
|
POST
|
The filter on a query is pretty clear on how to add a drop down for user to select from the unique values in a field. What I would like to do, however, is add an item at the top of the list for 'All Values', so that the user could either select something specific or not select any item at all. I've found where the filter item is created in the configuration JSON, but it just appears to have a type of unique that finds the values from the field in the feature layer, but is it possible to add to the list? Example JSON for the filter: "filter": { "logicalOperator": "AND", "parts": [ { "fieldObj": { "name": "DEVICE_TYPE", "label": "DEVICE_TYPE", "shortType": "string", "type": "esriFieldTypeString" }, "operator": "stringOperatorIs", "valueObj": { "isValid": true, "type": "unique", "value": "Pole" }, "interactiveObj": { "prompt": "Device Type is", "hint": "type of device" }, "caseSensitive": false, "expr": "DEVICE_TYPE = 'Pole'" } ], "expr": "DEVICE_TYPE = 'Pole'" },
... View more
10-01-2015
02:57 PM
|
0
|
1
|
2600
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-04-2017 08:50 AM | |
| 1 | 02-01-2017 08:58 AM | |
| 1 | 01-30-2017 12:32 PM | |
| 1 | 12-17-2015 03:10 PM |
| Online Status |
Offline
|
| Date Last Visited |
02-28-2024
12:30 PM
|