|
POST
|
I need to use a time slider in WAB to show the accident within certain years. First, I created a time-awareness layer in ArcMap and everything goes correctly. Second, I upload it to the server as a feature layer and it works great. However, when I added the Time Slider widget to the Web application, the time range of the slider is wrong. It always pre-defines the time period from 01/01/2015 to 12/31/2015 even though my data is from 01/03/2011 to 12/31/2015. I can not find the option to set the time slider such as the time range, interval, and etc. as in the ArcMap. I just want to make sure if this widget in WAB has this function or not since I found previous post which said no.
... View more
09-21-2016
01:24 PM
|
0
|
2
|
1333
|
|
POST
|
We have the same problem with time slider widget in WAB
... View more
09-20-2016
02:03 PM
|
0
|
0
|
2247
|
|
POST
|
Hi, I have a one to many relation between a car accident and several involved drivers (eg. driver 1, driver 2, ... etc.). I made a point feature layer, in which each point represents an accident at a specific location. What I need is: if I click the accident point, a pop-up panel will appear and show the common information about this accident. Then I can use a pop-up list to choose a driver and then see the unique information about this driver. Is there any way that WAB can do this? Thanks!
... View more
07-08-2016
08:47 AM
|
0
|
2
|
2058
|
|
POST
|
We need to show a plot which indicates the results from a model(function) using a widget. The figure1 shows we could calculate the results from the model at present. The figure2 is our expected plot. Any suggestions to achieve this goal?
... View more
05-17-2016
09:05 AM
|
0
|
1
|
2233
|
|
POST
|
Hi Robert, Thanks for your sample! It works well in our web application. But when we copy the widget file to the samplewidgets files( follow the link:Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers ), it can not work in the demo widget. The error is as follow: Error: dijit._WidgetsInTemplateMixin: parser returned unfilled promise (probably waiting for module auto-load), unsupported by _WidgetsInTemplateMixin. Must pre-load all supporting widgets before instantiation. Thanks, Junxuan
... View more
05-15-2016
05:23 PM
|
0
|
1
|
1836
|
|
POST
|
I need to create a custom widget that could calculate the value according to a model( function). For example, the user enters two values for the parameter a and b, then we need to display the result of f(a,b). Is there any sample code to recommend?
... View more
05-14-2016
06:43 AM
|
0
|
4
|
5683
|
|
POST
|
Hi Robert, Thanks for your help during these days and now the code works quite well! You help our project a lot! Junxuan
... View more
04-19-2016
07:07 AM
|
0
|
0
|
703
|
|
POST
|
At first, we found a related code on https://community.esri.com/thread/88541#comment-366869 , but it uses http://js.arcgis.com/3.8/js/esri/css/esri.css. Then we modified this code to 3.16 version(See the attachment 1). Next, we want to make it as a widget. Now we have two versions, the first one, it can do routing but can not draw the polygons; the second one(according to your guide), it can draw the polygon, but can not do the routing. Thanks, Junxuan
... View more
04-18-2016
01:09 PM
|
0
|
2
|
703
|
|
POST
|
Currently, it is difficult for us to get your points. 1. What is Alert? How can I check that? 2. What does "identity manager stuff in code" mean? When I click the Solve Route Button, there is a pop-up window which asks me to enter the account information and that's it. Thanks, Junxuan
... View more
04-18-2016
08:24 AM
|
0
|
4
|
1761
|
|
POST
|
Hi Robert, I think I have provided a token for the Route Task. Do you mean the Interface like this? Thanks, Junxuan
... View more
04-17-2016
07:42 PM
|
0
|
6
|
1761
|
|
POST
|
Hi Robert: Thanks for your information. I modified the showRoutes function code, but it still can not show the routes, even though it seems that there is no error. showRoute:function(evt) { this.clearRoutes(); array.forEach(evt.result.routeResults, lang.hitch(this, function(routeResult, i) { this.routes.push( this.map.graphics.add( routeResult.route.setSymbol(this.routeSymbols[routeResult.routeName]) ) ); })); var msgs = ["Server messages:"]; array.forEach(evt.result.messages, lang.hitch(function(message) { msgs.push(message.type + " : " + message.description); ! })); if (msgs.length > 1) { alert(msgs.join("\n - ")); } }
... View more
04-17-2016
03:46 PM
|
0
|
8
|
1761
|
|
POST
|
Hi Robert, Thanks for your detail explanation and example. Our final goal is to find the routes but avoid certain area or specific points. Currently, the widget works well except the routes can not be showed on the map. The error is can not read property 'push' of undefined in showRoute function(this.routes.push). Attached is our code. Thanks in advanced! Junxuan
... View more
04-17-2016
07:09 AM
|
0
|
10
|
1761
|
|
POST
|
Currently, we want to create a custom widget to draw polygon on the map(arcgis web appbuilder 1.3). But it shows that the Uncaught TypeError: Can not read property 'activate' of undefined. (In Widget.js file ) The related line is drawToolbar.activate(esri.toolbars.Draw.POLYGON); Here is my code: define(['dojo/_base/declare', 'jimu/BaseWidget', 'esri/urlUtils', 'esri/config', 'esri/map', 'esri/graphic', 'esri/tasks/RouteTask', 'esri/tasks/RouteParameters', 'esri/tasks/FeatureSet', 'esri/symbols/SimpleMarkerSymbol', 'esri/symbols/SimpleLineSymbol', 'esri/Color', 'dojo/_base/array', 'dojo/on', 'dojo/dom', 'dojo/domReady!', 'dijit/registry', 'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'dijit/form/HorizontalSlider', 'dijit/form/HorizontalRuleLabels', 'esri/toolbars/draw', 'esri/tasks/GeometryService', 'esri/symbols/SimpleFillSymbol', 'esri/tasks/DataFile', 'dojo/_base/connect' ], function(declare, BaseWidget,urlUtils, esriConfig, Map, Graphic, RouteTask, RouteParameters, FeatureSet, SimpleMarkerSymbol, SimpleLineSymbol, Color, array, on, dom, registry, Draw, GeometryService,SimpleFillSymbol,DataFile,connect ) { return declare([BaseWidget], { baseClass: 'jimu-widget-MyWidget', name: 'MyWidget', startup: function(){ var map, Draw, routeTask, routeParams, routes= []; var drawToolbar; var geometryService; var stopSymbol, barrierSymbol, polygonBarrierSymbol,routeSymbols; var mapOnClick_addStops_connect, mapOnClick_addBarriers_connect,mapOnClick_addPolygonBarriers_connect; geometryService = new GeometryService("https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); map = this.map; routeTask = new RouteTask("https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World"); routeParams = new RouteParameters(); routeParams.polygonBarriers = new FeatureSet(); routeParams.outSpatialReference = {"wkid":102100}; var polygonBarrierSymbol= new esri.symbol.SimpleFillSymbol(); routeSymbols = { "Route 1": new SimpleLineSymbol().setColor(new Color([0,0,255,0.5])).setWidth(5), "Route 2": new SimpleLineSymbol().setColor(new Color([0,255,0,0.5])).setWidth(5), "Route 3": new SimpleLineSymbol().setColor(new Color([255,0,255,0.5])).setWidth(5) }; on(dom.byId("addpolygonBarriersBtn"), "click", addpolygonBarriers); on(dom.byId("clearpolygonBarriersBtn"), "click", clearpolygonBarriers); function createToolBar(){ drawToolbar = new esri.toolbars.Draw(map); drawToolbar.on("draw-end", addToMap); } function activateTool(){ drawToolbar.activate(esri.toolbars.Draw.POLYGON); map.hideZoomSlider(); } function addToMap(evt) { drawToolbar.deactivate(); routeParams.polygonBarriers.features.push( map.graphics.add(new esri.Graphic(evt.geometry, polygonBarrierSymbol)) ); } var node = dojo.byId("addpolygonBarriersBtn"); dojo.connect(node, "click", activateTool); map.on("load", createToolBar); //Begins listening for click events to add polygonbarriers function addpolygonBarriers() { removeEventHandlers(); mapOnClick_addPolygonBarriers_connect = on(map, "onclick", addPolygonBarrier); } //Clears all polybarriers function clearpolygonBarriers() { removeEventHandlers(); for (var i=routeParams.polygonBarriers.features.length-1; i>=0; i--) { map.graphics.remove(routeParams.polygonBarriers.features.splice(i, 1)[0]); } } // Add Polygon function addPolygonBarrier(evt) { drawToolbar.activate(esri.toolbars.Draw.POLYGON); var drawEnd_connect = dojo.connect(drawToolbar, "onDrawEnd", function(geometry) { routeParams.polygonBarriers.features.push( map.graphics.add(new esri.Graphic(geometry, polygonBarrierSymbol)) );}); } function removeEventHandlers() { if (mapOnClick_addPolygonBarriers_connect) { mapOnClick_addPolygonBarriers_connect.remove(); } } } }); });
... View more
04-15-2016
02:31 PM
|
0
|
12
|
5367
|
|
POST
|
How can I modify the Direction widget to achieve the routing function with adding some roadblocks or avoiding some certain areas?
... View more
03-29-2016
01:11 PM
|
0
|
0
|
1641
|
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:25 AM
|