|
POST
|
Hi , Below is the code I am using it for PrintTask var url = "https://servername:6443/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"; var printTask = new PrintTask(url); var params = new PrintParameters(); var template = new PrintTemplate(); template.format = "PDF"; template.layout = "MAP_ONLY"; template.preserveScale = false; template.layoutOptions = {"legendLayers": [], "titleText": "Map Print", "authorText": "AAAAA", "copyrightText": "BBBBB", "scalebarUnit": "Kilometers"}; params.map = this.map; params.template = template; printTask.execute(params, lang.hitch(this, this._printResult),lang.hitch(this, this._printResultError)); _printResultError:function(err) { debugger; alert(err); }, _printResult:function(res){ debugger; window.open(res.url, "_blank") }, I am getting the following error "Error executing tool. Export Web Map Task : Layer "ServiceName": Unable to connect to map server at https://servername:6443/arcgis/rest/services/ServiceName/MapServer. Failed to execute (Export Web Map). Failed to execute (Export Web Map Task)."
... View more
12-06-2017
03:00 AM
|
0
|
3
|
1474
|
|
POST
|
Sorry for the confusion . Yes I want to do it WAB .
... View more
12-06-2017
02:54 AM
|
0
|
5
|
1563
|
|
POST
|
Hi, I am using custom basemap(contains 4 scales 1:500000,1:200000,1:100000,1:50000) in my javscript application and doing attribute query in operational layer and got the results. The result(featureset) extent is falling 1 : 20000 scale , is it possible to zoom 1:20000 ? . I guess it is not possible , want to know if there are any workaround for this issue .
... View more
12-04-2017
10:40 PM
|
0
|
9
|
1713
|
|
POST
|
Hi Robert, After including the parseFloat the label is working . Thanks for the Help.
... View more
11-16-2017
09:05 PM
|
0
|
0
|
974
|
|
POST
|
Hi Robert, The above code is working for me if I use esri base map . My scenario is my base map using geographic coordinate system(gcs)4326 . If i use the above code for gcs base map label is not displaying and only points are showing on the map. I have created a map service(gcs) in arcgis server and using that service as a base map in my web app builder application . This is how I am consuming the base map , is that anything wrong in this approach ?
... View more
11-15-2017
11:04 PM
|
0
|
2
|
974
|
|
POST
|
Already I have set that property , see the below code attached. . Label is working for dynamic polygon layer (same code) . Its not working for the dynamic point layer. "map": { "3D": false, "2D": true, "position": { "left": 0, "top": 40, "right": 0, "bottom": 0 }, "itemId": "056a31fb8e614c06b69cf0c5ff9ca0d8", "mapOptions": {"showLabels":true}, "id": "map", "portalUrl": "https://servername:7443/arcgis" },
... View more
11-14-2017
08:51 PM
|
0
|
4
|
974
|
|
POST
|
Hi Robert, No sensitive information. This widget will read the excel file and display on the map. To read the excel file "jquery.min.js" and "xlsx.core.min.js" files needs to be added in the application. As you know we also need to modify the "main.js" file .Java script files( Reading excel) can be found in "ToReadExcelFile" folder. Also you can find the sample.xlsx file in “ToReadExcelFile" folder . Let me know if you need any further infomation is required.
... View more
11-13-2017
08:22 AM
|
0
|
8
|
1543
|
|
POST
|
Yes Robert I will share my widget . Here is holiday so I can share it on Monday(11/13) only . My email id is mohannainar@gmail.com . Is it ok if I can send the code through email ? .
... View more
11-10-2017
08:13 PM
|
0
|
10
|
1543
|
|
POST
|
Hi Robert, Yes only points are showing up in the map. I am creating dynamic feature layer(point), so I guess show label option will not visible in layer list widget. Am attaching the screen shot of Layer list widget. When I debug the code its not giving any error message . The same code(displaying label) is working for polygon dynamic layer.
... View more
11-09-2017
09:17 PM
|
0
|
12
|
1543
|
|
POST
|
Hi Robert, I changed to Graphic , still i could not able to see the label information on the map.
... View more
11-08-2017
09:44 PM
|
0
|
14
|
1543
|
|
POST
|
The below labeling code is working for polygon layer (created dynamically) but not the point layer(created dynamically). var statesColor = new Color("#060606"); var statesLabel = new TextSymbol().setColor(statesColor); statesLabel.font.setSize("12pt"); statesLabel.font.setFamily("arial"); var json = { "labelExpressionInfo": {"value": "{ENTITY_FIELD}"},"labelPlacement":"above-right" }; var labelClass = new LabelClass(json); labelClass.symbol = statesLabel; this.temporalLayer.setLabelingInfo([ labelClass ]); this.map.addLayer(this.temporalLayer); Complete code for point layer is below . The dynamic layer is geographic coordinate system . var pt = null; var jsonFS = new Object(); jsonFS.geometryType = "esriGeometryPoint"; var features = []; renderer = new SimpleRenderer(new SimpleMarkerSymbol()); renderer.symbol.setColor(selectedColor); for (i = 0; i < this.fromExcel.length; i++) { var attributeObj = new Object(); attributeObj.OBJECTID = i+1; attributeObj.LATITUDE = this.fromExcel[this.config.LAT_FIELD]; attributeObj.LONGITUDE = this.fromExcel[this.config.LONG_FIELD]; attributeObj[this.mainField] = this.fromExcel[this.mainField]; attributeObj[this.config.TIME_FIELD]= this.fromExcel[this.config.TIME_FIELD]; attributeObj[this.config.SLIDER_FIELD]= this.fromExcel[this.config.SLIDER_FIELD]; attributeObj[this.config.ENTITY_FIELD]= this.fromExcel[this.config.ENTITY_FIELD]; var feature = new Object(); feature.attributes = attributeObj; pt = new Point(this.fromExcel[this.config.LONG_FIELD],this.fromExcel[this.config.LAT_FIELD],this.map.spatialReference); feature.geometry = pt; features.push(feature); } jsonFS.features = features; var featureSet = new FeatureSet(jsonFS); var infoTemplate = new InfoTemplate(this.mainField + " : ${"+ this.mainField +"}", this.config.ENTITY_FIELD + " : ${"+ this.config.ENTITY_FIELD +"}<br>" + this.mainField + " : ${"+ this.mainField +"}<br>" + this.config.LAT_FIELD + " : ${"+ this.config.LAT_FIELD +"}<br>"+ this.config.LONG_FIELD + " : ${"+ this.config.LONG_FIELD +"}<br>"+ this.config.TIME_FIELD + " : ${"+ this.config.TIME_FIELD +"}<br>"); var featureCollection = { layerDefinition: { "displayFieldName": this.mainField, "geometryType": "esriGeometryPoint", "spatialReference": { "latestWkid": 4326, "wkid": 4326 }, "fields": [ { "name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "OBJECTID" }, { "name": this.config.LAT_FIELD, "type": "esriFieldTypeString", "alias": this.config.LAT_FIELD }, { "name": this.config.LONG_FIELD, "type": "esriFieldTypeString", "alias": this.config.LONG_FIELD }, { "name": this.mainField, "type": "esriFieldTypeInteger",//"esriFieldTypeInteger", "alias": this.mainField }, { "name": this.config.TIME_FIELD, "type": "esriFieldTypeDate",//"esriFieldTypeInteger", "alias": this.config.TIME_FIELD }, { "name": this.config.SLIDER_FIELD, "type": "esriFieldTypeString", "alias": this.config.SLIDER_FIELD }, { "name": this.config.ENTITY_FIELD, "type": "esriFieldTypeString", "alias": this.config.ENTITY_FIELD }, { "name": "shape", "type": "esriFieldTypeGeometry", "alias": "shape" } ] }, featureSet: featureSet, "exceededTransferLimit": false }; var featureLayerOptions = { mode: FeatureLayer.MODE_SNAPSHOT, outFields: ["*"], infoTemplate: infoTemplate, id: "ENTITY DATA" }; this.temporalLayer = new FeatureLayer(featureCollection,featureLayerOptions); var extent = graphicsUtils.graphicsExtent(featureSet.features); this.map.setExtent(extent.expand(1.2)); this.temporalLayer.setRenderer(renderer); var statesColor = new Color("#060606"); var statesLabel = new TextSymbol().setColor(statesColor); statesLabel.font.setSize("12pt"); statesLabel.font.setFamily("arial"); var json = { "labelExpressionInfo": {"value": "{ENTITY_FIELD}"},"labelPlacement":"above-right" }; var labelClass = new LabelClass(json); labelClass.symbol = statesLabel; this.temporalLayer.setLabelingInfo([ labelClass ]); this.map.addLayer(this.temporalLayer);
... View more
11-08-2017
04:31 AM
|
0
|
16
|
2902
|
|
POST
|
The below code is working for geographic coordinate system(Both base map and operational layers are in GCS) . But when i switch to Projected coordinate system (both basemap and operational layer) the label is not working but rendering is happening. The temporal layer i am creating dynamically , not from the mapservice . Renderer : function (){ var statesColor = new Color("#060606"); var statesLabel = new TextSymbol().setColor(statesColor); statesLabel.font.setSize("14pt"); statesLabel.font.setFamily("arial"); var json = { "labelExpressionInfo": {"value": "{POPULATION}"} }; var labelClass = new LabelClass(json); labelClass.symbol = statesLabel; this.temporalLayer.setLabelingInfo([ labelClass ]); this.map.addLayer(this.temporalLayer); smartMapping.createClassedColorRenderer({ layer: this.temporalLayer, field: "POPULATION", basemap: "streets", classificationMethod: this.checkClassificationType.value, numClasses: this.checkClassificationNumber.value }).then(lang.hitch(this, function (response) { var colorArray = this.interpolateColors("rgb(" + this.fromColor.color.r + "," + this.fromColor.color.g + "," + this.fromColor.color.b +")", "rgb(" + this.toColor.color.r + "," + this.toColor.color.g + "," + this.toColor.color.b + ")", this.checkClassificationNumber.value); for (var i = 0; i < colorArray.length ; i++) { response.renderer.infos.symbol.color.r = colorArray[0]; response.renderer.infos.symbol.color.g = colorArray[1]; response.renderer.infos.symbol.color.b = colorArray[2]; } this.temporalLayer.setRenderer(response.renderer); this.temporalLayer.redraw(); })); }, interpolateColors : function (color1, color2, steps) { var stepFactor = 1 / (steps - 1), interpolatedColorArray = []; color1 = color1.match(/\d+/g).map(Number); color2 = color2.match(/\d+/g).map(Number); for (var i = 0; i < steps; i++) { interpolatedColorArray.push(this.interpolateColor(color1, color2, stepFactor * i)); } return interpolatedColorArray; }, interpolateColor:function (color1, color2, factor) { if (arguments.length < 3) { factor = 0.5; } var result = color1.slice(); for (var i = 0; i < 3; i++) { result = Math.round(result + factor * (color2 - color1)); } return result; },
... View more
10-06-2017
05:42 AM
|
0
|
0
|
571
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-30-2016 12:41 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-29-2025
06:43 AM
|