POST
|
Hi Xander! The scheduled task with a python script is working like I hoped! Thank you for the suggestion!
... View more
09-16-2016
07:46 AM
|
0
|
1
|
647
|
POST
|
Xander! Thanks for the reply! The Feature Service actually already has the field that I'd like to populate with the concatenation of three other fields. What we're doing is building a URL in that field from a point ID (one field), and two auto populated URL pieces (fields two and three). The final product is a functional URL. The point ID is specified by a user with the editor widget when they add a location to the map. When the new location is created, the two parts to the URL are auto populated in their fields. The next final step would be to run the geoprocessing widget to populate the final field with the combined three pieces. When I run the model that I'm publishing as a Geoprocessing Service locally, it works great at generating the correct URL. What's confusing me is that in the Geoprocessing Widget, the input and the output are the same feature service. When I publish the model as a GP, it runs in the Geoprocessing Widget, but does not concatenate. Below is a screen grab of the field calculator. Thanks!!!
... View more
09-14-2016
10:33 AM
|
0
|
3
|
647
|
POST
|
Hello!! I'm looking to create a Geoprocessing Service that uses the field calculator tool to concatenate fields. The original feature service is the output.
... View more
09-14-2016
09:59 AM
|
0
|
5
|
1507
|
POST
|
Wow! Thanks Robert!! I was able to get a jquery version working as well, but it's really messy! Your version is much more straight forward. I really appreciate your help! I learned a bunch about the internal workings of WAB. Thanks again!!! Stephen
... View more
11-27-2015
10:22 AM
|
0
|
1
|
361
|
POST
|
Hi Robert! I'm 99 percent of the way there with the Navigation widget. It now deactivates onclose, and I added in the remaining navigation functions. The last thing I'm trying to accomplish is to have the buttons change color when selected. I figured that jQuery was the best approach. What I have below works in JSFiddle, but not in WAB Developer. If you have a second, do you see what I'm missing or doing wrong? Also, once this is done, I'd like to post this widget to the custom widget resource section of GeoNet if that's OK. Thanks again!!! JS: define([ 'dojo/_base/declare', 'dojo/_base/lang', 'jimu/BaseWidget', 'dojo/on', 'esri/toolbars/navigation', 'jimu/loaderplugins/jquery-loader!https://code.jquery.com/jquery-git1.min.js' ], function(declare, lang, BaseWidget, on, Navigation, $) { var clazz = declare([BaseWidget], { name: 'Navigation', baseClass: 'widget-Navigation', navToolbar: null, startup: function() { this.navToolbar = new Navigation(this.map); this.own(on(this.zoomIn, 'click', lang.hitch(this, function() { this.navToolbar.activate(Navigation.ZOOM_IN); }))); this.own(on(this.zoomOut, 'click', lang.hitch(this, function() { this.navToolbar.activate(Navigation.ZOOM_OUT); }))); this.own(on(this.zoomPrevious, 'click', lang.hitch(this, function() { this.navToolbar.zoomToPrevExtent(); }))); this.own(on(this.zoomNext, 'click', lang.hitch(this, function() { this.navToolbar.zoomToNextExtent(); }))); $('.main .btn').click(function (evt) { $('.selected').not(this).removeClass('selected'); $(this).toggleClass('selected'); }); $(document).click(function () { $('.main .btn').removeClass('selected'); }); }, onClose: function() { this.navToolbar.deactivate(); } }); return clazz; }); HTML: <div class='main'> <label><b>${nls.selectNavigation}</b></label> <br/><br/> <div data-dojo-attach-point="zoomIn" class='btn'> <img src='widgets/sNavigation/images/zoom-in.png' style='width:35px; height:35px; margin:5px;'> </img> </div> <br/> <div data-dojo-attach-point="zoomOut" class='btn'> <img src='widgets/sNavigation/images/zoom-out.png' style='width:35px; height:35px; margin:5px;'> </img> </div> <br/> <div data-dojo-attach-point="zoomPrevious" class='btn'> <img src='widgets/sNavigation/images/zoom-previous.png' style='width:35px; height:35px; margin:5px;'> </img> </div> <br/> <div data-dojo-attach-point="zoomNext" class='btn'> <img src='widgets/sNavigation/images/zoom-next.png' style='width:35px; height:35px; margin:5px;'> </img> </div> </div> CSS: .widget-Navigation .selected { color: rgba(255, 255, 255); background-color: #999; background-color: rgba(0, 0, 0, 0.4); width: 45px; height: 45px; } .widget-Navigation { font-size:medium; } .widget-Navigation .btn{ background-color: #ccc; background-color: rgba(0, 0, 0, 0.2); border: 1px solid #000000; border: 1px solid rgba(0, 0, 0, 0.4); width: 45px; height: 45px; } .widget-Navigation .btn:hover{ color: rgba(255, 255, 255); background-color: #999; background-color: rgba(0, 0, 0, 0.4); width: 45px; height: 45px; }
... View more
11-25-2015
02:30 PM
|
0
|
4
|
361
|
POST
|
Thank you! Got it, match in order of listing! Now I remember that rule from the pre-webapp builder use of ArcGIS JavaScript API. I should have known that! I'll take a shot at navToolbar.deactivate() onClose next. Thank you! Stephen
... View more
11-23-2015
02:37 PM
|
0
|
0
|
361
|
POST
|
Hi Robert, Here's where I'm currently at in JavaScript: define([ 'dojo/_base/declare', 'dojo/_base/lang', 'jimu/BaseWidget', 'dojo/on', 'dijit/registry', 'esri/toolbars/navigation' ], function(declare, lang, BaseWidget, Navigation, registry) { var clazz = declare([BaseWidget], { name: 'sNavigation', navToolbar: null, startup: function() { this.navToolbar = new Navigation(this.map); registry.byId("zoomIn").on("click", function () { navToolbar.activate(Navigation.ZOOM_IN); }); }, }, }); return clazz; }); HTML: <div> <label>${nls.selectNavigation}</label> <div> <input type="button" value="Publish Data" id="zoomIn" data-dojo-attach-event="onclick:_onPublishClick"> <span data-dojo-attach-point="pubInfoNode"></span> </div> </div> Getting more lost by the day. Thank you, Stephen
... View more
11-23-2015
01:43 PM
|
0
|
7
|
542
|
POST
|
Thank you Robert. That makes sense to me! I recreated the zoomIn button in the widget.html with data-dojo-attach-point="zoomIn". Looks good! Now I'm focusing on just the zoom in part first. I'm trying to rework the original navtoolbar code to work with webapp builder. Original navToolbar = new Navigation(map); on(navToolbar, "onExtentHistoryChange", extentHistoryChangeHandler); registry.byId("zoomin").on("click", function () { navToolbar.activate(Navigation.ZOOM_IN); }); Reworked navToolbar = newNavigation(map); on(this.zoomIn, 'click', function(evt){ navToolbar.activate(Navigation.ZOOM_IN); }); No error when I run the widget, but it definitely is not right!
... View more
11-17-2015
12:25 PM
|
0
|
9
|
542
|
POST
|
Thanks Robert! I now see how weird my code was working. So, I'm breaking out the domConstruct stuff over to the widget.html now. After that, I'll try to determine the pointer to the button DOM to run the original navtoolbar. As soon as it's running, I'll make sure to mark the question as answered. If it's OK, I'd like to keep it open for a bit, just in case. Thanks! Stephen
... View more
11-13-2015
10:06 AM
|
0
|
11
|
542
|
POST
|
Hi Robert! Thank you for the reply! I apologize for the messy code. I should have used a global variable for navToolbar all along. I played around with: navToolbar = new Navigation(this.map) but since it was working, I wasn't to keen on tweaking too much yet. Thanks for the tip about moving the domConstruct stuff over to the widget.html. I'll most definitely do that. Thank you as well for the info about narToolbar being a private variable. I'm showing how new I am to this! It make sense now why the onClose function can't see navToolbar.deactivate(). I'll use your suggestions and see what happens! Thanks again, Stephen
... View more
11-12-2015
12:08 PM
|
0
|
13
|
542
|
POST
|
Hi All! I have a quick question about deactivating the navtoolbar (navToolbar.deactivate();) on a panel close in webapp builder. I can seem to tweak the attached widget to work. The functionality is all there, but it stays live when I exit out of the widget. I've looked at how the draw widget deactivates with no luck. Any suggestions would be greatly appreacited!! Best as always, Stephen
... View more
11-12-2015
09:47 AM
|
0
|
16
|
4069
|
Online Status |
Offline
|
Date Last Visited |
12-20-2022
09:00 PM
|