POST
|
Hi, I am trying to attach "onDblClick" event to feature layer for generating heat map. At the same time "onLoad" event is working fine,Plz find below code. this.featHLayer.on('load', lang.hitch(this,function(){ var query = new Query(); query.where = defExpH; this.featHLayer.queryExtent(query,lang.hitch(this,function(result){ this.map.setExtent(result.extent); }));})); this.eventListner = connect.connect(this.featHLayer, "onDblClick", lang.hitch(this,function(evt) { this.contextDistName = evt.graphic.attributes[this.config.HeatMap.DistrictFldName]; this._getFarmerResults(evt) })); this.featHLayer = new FeatureLayer(this.config.HeatMap.District.url,{ mode: FeatureLayer.MODE_SNAPSHOT, definitionExpression:defExpH, infoTemplate:infoTemplate, outFields:["*"] }); this.map.addLayer(this.featHLayer); this.featHLayer.setRenderer(heatmapRenderer); I am using this code in a widget for WAB 2.13. Kindly help!!
... View more
11-02-2019
07:36 PM
|
0
|
0
|
297
|
POST
|
Hi, I am trying to open the other panel and closing the current panel by using the below code, which is working for Foldable theme in WAB but not working for Box theme correctly. var pm = PanelManager.getInstance(); var layerListWidget = null; layerListWidget = pm.widgetManager.appConfig.widgetPool.widgets[0]; PanelManager.getInstance().closePanel(this.id + "_panel"); PanelManager.getInstance().showPanel(layerListWidget); Do anyone have any idea, how to achieve this for Box Theme?
... View more
10-24-2019
10:54 PM
|
0
|
1
|
497
|
POST
|
Hi, I want to use ArcGIS 10.4 Map Service in OpenLayers to show that in the map. I have seen some articles regarding this but they talking about WMS services, can't we achieve with just map services which are not enabled as WMS? Help me in solving this. Regards, Naveen Kumar.
... View more
12-11-2018
08:25 AM
|
0
|
0
|
583
|
POST
|
Hi, I created custom print button using ' esri/tasks/PrintTask' to print the map with graphics. For small area with graphics, Print tool is working fine but for larger areas with graphics like country/State level graphics, Print tool is not working. I configure the .net proxy in IIS and configure to WAB 2.5 in 'config.json' file. I am getting the "ERR_Connection_ABORTED" error. PFB image for the same. For small area with graphics, GET request is used and works fine. Whereas for bigger area with graphics, POST request method is used automatically. When i checked in ArcGIS server Logs, one warning message was there "Unable to get service usage timeout for . defaulting to server directory timeout.....". Any help !!
... View more
07-18-2018
04:38 AM
|
0
|
1
|
487
|
POST
|
Hi, I have to get the distance from various points plotted on the map from the user point on page load. When i am keeping all the promise in an array, and assigning to dojo/promise/all, it throws an error "Unable to complete operation." below is the code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Create Map and add a dynamic layer</title> <link rel="stylesheet" href="https://js.arcgis.com/3.24/esri/css/esri.css"/> <style> html, body, #mapDiv{ padding: 0; margin: 0; height: 100%; } </style> <script src="https://js.arcgis.com/3.24/"></script> <script> var map; var fromPoint; var task; var toPoints=[]; require([ "dojo/_base/lang", "esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/tasks/GeometryService", "esri/layers/GraphicsLayer", "esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol", "esri/Color", "esri/symbols/SimpleMarkerSymbol", "esri/geometry/Point", "esri/SpatialReference", "esri/graphic", "esri/tasks/DistanceParameters", "dojo/_base/array", "dojo/promise/all" ], function ( lang, Map, ArcGISDynamicMapServiceLayer, GeometryService,GraphicsLayer,SimpleFillSymbol,SimpleLineSymbol,Color,SimpleMarkerSymbol,Point,SpatialReference,Graphic,DistanceParameters,array,all) { map = new Map("mapDiv", { sliderOrientation : "horizontal" }); //Takes a URL to a non cached map service. var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("https://servername:6443/arcgis/rest/services/IndiaMapMMI/MapServer", { }); map.addLayer(dynamicMapServiceLayer); var geometryService = new esri.tasks.GeometryService("https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); var frmGraphicsLayer = new GraphicsLayer(); var toGraphicsLayer = new GraphicsLayer(); var circleSymbF = new SimpleFillSymbol( SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol( SimpleLineSymbol.STYLE_SHORTDASHDOTDOT, new Color([255, 0, 0]),2), new Color([255, 255, 0, 0.25]) ); var symbol2 = new SimpleMarkerSymbol( SimpleMarkerSymbol.STYLE_DIAMOND, 15, new SimpleLineSymbol( SimpleLineSymbol.STYLE_NULL, new Color([0, 0, 0, 0.9]), 1 ), new Color([255, 0, 0, 1]) ); var symbol1 = new SimpleMarkerSymbol( SimpleMarkerSymbol.STYLE_DIAMOND, 15, new SimpleLineSymbol( SimpleLineSymbol.STYLE_NULL, new Color([0, 0, 0, 0.9]), 1 ), new Color([0, 255, 0, 1]) ); var symbol3 = new SimpleMarkerSymbol( SimpleMarkerSymbol.STYLE_DIAMOND, 15, new SimpleLineSymbol( SimpleLineSymbol.STYLE_NULL, new Color([0, 0, 0, 0.9]), 1 ), new Color([0, 0, 255, 1]) ); myObj = {"features":[ { "attributes": { "CaseID": 001, "Latitude": 28.634962, "Longitude": 77.034805, "SerialNo":7557, "Status":"FromPoint" } }, { "attributes": { "CaseID": 002, "Latitude": 28.612663, "Longitude": 77.053215, "SerialNo":7557, "Status":"Pending" } }, { "attributes": { "CaseID": 003, "Latitude": 28.596744, "Longitude": 77.075981, "SerialNo":7557, "Status":"Completed" } },{ "attributes": { "CaseID": 004, "Latitude": 28.615241, "Longitude": 77.061687, "SerialNo":7557, "Status":"Completed" } } ] }; var promises = []; for(i = 0 ; i <myObj.features.length; i++){ if(myObj.features.attributes.Status == "FromPoint"){ fromPoint = new Point(parseFloat(myObj.features.attributes.Longitude),parseFloat(myObj.features.attributes.Latitude),new SpatialReference({wkid:4326})); frmGraphicsLayer.add((new Graphic(fromPoint,symbol2))); } else{ var pt = new Point(parseFloat(myObj.features.attributes.Longitude),parseFloat(myObj.features.attributes.Latitude),new SpatialReference({wkid:4326})); toPoints.push(pt); } } task = array.map(toPoints,lang.hitch(this, function (toPoint) { var distParams = new esri.tasks.DistanceParameters(); distParams.distanceUnit = esri.tasks.GeometryService.UNIT_SQUARE_METERS; distParams.geometry1 = fromPoint; distParams.geometry2 = toPoint; distParams.geodesic = true; return distParams; })); for (i = 0; i < task.length; i++) { promises.push(geometryService.distance(task)); } var iPromises = new all(promises); iPromises.then(lang.hitch(this, function (distance) { if (isNaN(distance)) { distance = 0; } if(distance >70){ toGraphicsLayer.add((new Graphic(pt,symbol3))); } else{ toGraphicsLayer.add((new Graphic(pt,symbol1))); } }), lang.hitch(this, function (err){ console.info(err); })); map.addLayer(frmGraphicsLayer); map.addLayer(toGraphicsLayer); }); </script> </head> <body> <div id="mapDiv"></div> </body> </html> i have referred this thread How to nest dojo async calls and wait until all are complete but no success Thanks, Naveen
... View more
06-26-2018
05:50 AM
|
0
|
1
|
950
|
POST
|
Hi, I have to hide/show some in-panel widget icon itself based on the user logged in. In below screen-shot, i have to hide the toggle-layer widget icon for Normal user while loading the application. This widget will only be available for administrator user: I checked this link Hide widget icon but its not working. I am using WAB 2.5 Regards, Naveen
... View more
06-13-2018
12:31 AM
|
0
|
1
|
1091
|
POST
|
Hi, In Basemap Gallery widget, I am trying to configure two different basemaps: 1) World Imagery and 2) Organization's map which are having wkid: 3857 and wkid: 28355 respectively. While configuring these it's saying, "The basemap you are adding has a different spatial reference from the current map". When I go through the Basemap Gallery widget of Web appBuilder docs,there it's said that 'Basemaps with Different spatial reference is unsupported'. Are there any ways to change the spatial reference and can make it work? Please suggest. Thanks in advance. Regards, Naveen Kumar Kairamkonda.
... View more
05-24-2018
07:27 AM
|
1
|
1
|
714
|
POST
|
Robert, I am having log-in screen, where user will provide credentials to view the application. I believe, in proxy page, static Username & password has to set in the proxy config file to access the secured services. <?xml version="1.0" encoding="utf-8" ?> <ProxyConfig allowedReferers="http://serverName/TokenHtmlPage.html,http://serverName/CBDTMap" mustMatch="false"> <serverUrls> <serverUrl url="https://ServerName/arcgis/rest" username="ABC" password="XYZ" tokenServiceUri="https://ServerName/arcgis/admin/generateToken" matchAll="true"/> <serverUrl url="http://services.arcgisonline.com" matchAll="true"/> </serverUrls> </ProxyConfig> How can i send the user credentials provided in log-in screen to the proxy page? How proxy page will maintain the token for each request or do i need to send user credentials every-time? I can't send as a querystring with the proxy URL due to security reasons. Kindly suggest the best way to achieve this.
... View more
02-28-2018
10:27 PM
|
0
|
1
|
586
|
POST
|
Hi, How can i create token and hide it from the end user ? Aslo how can we verify and reset the ArcGIS token using ArcGIS JavaScript API App? In my case i have to validate the user and generate the token.
... View more
02-28-2018
01:31 AM
|
0
|
3
|
807
|
POST
|
Hi, I have created a context menu on FeatureLayer Load event. It is working as expected. While right click on label, shown for the feature layer, it is not showing context menu. PFB image for the same. Its working, when clicked apart from label. PFB image Is there any solution for this?
... View more
01-01-2018
09:52 PM
|
0
|
3
|
468
|
POST
|
Robert, MapExport Widget(you have shared code with some changes) is executing when we open the widget(onOpen) that means after the page load, but our requirement is Application should convert into an image on load of the page. Requirement: Application URL has 2 parameters (https://machinename:3344/Webappbuilder/apps/#/?obectjID=100&isenable=export) 1) Getting objectID from the URL [code written in index.html]. 2) Querying the feature including graphics of that objectID from the dB [code written in MapManager.js]. 3) if isenable parameter is "export" in the application URL then application should convert into an image on loading of the page. **these all steps should happen while the page is loading and the final url should look like an image(ex .png format). Till step 2 everything is working fine and we have to look at the 3rd step.
... View more
10-30-2017
09:58 PM
|
0
|
1
|
242
|
POST
|
Robert, attached zip file to a discussion as I am unable to add here. Please go through this link: https://community.esri.com/message/724456-is-it-possible-to-show-a-web-appbuilder-application-as-a-image
... View more
10-24-2017
08:44 PM
|
0
|
3
|
496
|
POST
|
Robert, I didn't give that URL anywhere in code, but it's taking like that.
... View more
10-24-2017
08:06 AM
|
0
|
7
|
496
|
POST
|
Robert, Taking the whole URL and throwing below error: init.js:152 POST https://pcw7vm48:3344/webappbuilder/apps/10/http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task/execute 404 (Not Found) init.js:182 n {message: "Unable to load //pcw7vm48:3344/webappbuilder/apps/…ver/Export%20Web%20Map%20Task/execute status: 404", response: {…}, status: 404, responseText: "Cannot POST /webappbuilder/apps/10/http://samplese…Tools/GPServer/Export%20Web%20Map%20Task/execute↵", xhr: XMLHttpRequest, …}
... View more
10-24-2017
06:35 AM
|
0
|
9
|
496
|
Title | Kudos | Posted |
---|---|---|
1 | 05-18-2017 10:53 PM | |
6 | 08-29-2016 10:19 PM | |
6 | 08-29-2016 12:16 AM | |
1 | 05-24-2018 07:27 AM | |
1 | 08-30-2016 12:00 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|