POST
|
Hello! I'm looking for a solution for a long time... I have a WAB app, with a point feature query widget. we're using dynamicsMapServiceLayers. You can see here, how i show my results. But how can a syncronise this with the Attribute table widget? Right now, every point is listed in the table. The best would be if i could show only the queried ones. But selection is also good. Any idea? var pointLayer = new GraphicsLayer();
var infoTemplate = new InfoTemplate("${name}","${*}");
pointLayer.setInfoTemplate(infoTemplate);
//CODE.................................
pointLayer.clear();
map.graphics.clear();
for (var i = 0; i < features.length; i++) {
if(!features[i].attributes['SDE.LineLayer.OBJECTID']) {
pointLayer.add(features[i]);
}
else {
map.graphics.add(features[i]);
}
}
map.addLayer(pointLayer)
... View more
05-13-2021
07:07 AM
|
0
|
1
|
445
|
POST
|
Is there any way for me, as a programmer, to delete Arcgis Portal site domain?
... View more
03-19-2021
06:11 AM
|
0
|
0
|
716
|
POST
|
I could use the PopupManager.js's methods to call the RelatedRecordsPopupProjector.js after the new infotemplate creation. Just it's needed to add the esriViewPopup class to the popup div.
... View more
11-24-2020
12:39 PM
|
0
|
0
|
591
|
POST
|
Do you have any tricks here to leave the related records section untouched when i'm resetting the infotemplate object?
... View more
11-24-2020
07:46 AM
|
0
|
1
|
593
|
POST
|
So I'm trying to make a relationship query, but i run into an error: h.join is not a function. what can be the problem? My related tables doesn't have objectId-s, they are just simply imported into the mxd. var layerList = []; var layerStructure = LayerStructure.getInstance(); //No layer ID passed in, just get all layers. layerStructure.traversal(function(layerNode) { layerList.push(layerNode._layerInfo.layerObject); }); console.log(layerList[14]) let graphicAttributes = graphic.attributes let params = new RelationshipQuery(); params.relationshipId= 1, params.outFields= ["*"], params.objectIds= graphicAttributes["alap_ep_PT.OBJECTID"] console.log(params) layerList[14].queryRelatedFeatures(params) .then(getResults) .otherwise(promiseRejected); function getResults(response) { console.log("results", response); } function promiseRejected(err) { console.error("Promise rejected: ", err.message); } layerList[14] is an object, it has a key, relationships: relationships: Array(2) 0: {id: 0, name: "DBNAME.ESRI_EP_TABLE_MV", relatedTableId: 39, role: "esriRelRoleOrigin", keyField: "DBNAME.TABLE.LOCATION", …} 1: cardinality: "esriRelCardinalityOneToMany" composite: false id: 1 keyField: DBNAME.TABLE.LOCATION"LOCAT name: DBNAME.TABLENAME" relatedTableId: 38 role: "esriRelRoleOrigin"
... View more
11-03-2020
04:20 AM
|
0
|
0
|
559
|
POST
|
I've buildt a halfly harcoded popup builder widget, but i don't know how to push fields from relationships into my popup div. I know how to do it in the ObjOriented way, but it's not right for me. Example: ```
var popupTemplate = new PopupTemplate({
"title": "Beverly Hills Trees By Block",
"fieldInfos": [{
"fieldName": "Point_Count",
"label": "Count of Points",
"format": {
"places": 0,
"digitSeparator": true
}
}, {
"fieldName": "relationships/0/Point_Count_COMMON",
"label": "Sum of species tree count",
"format": {
"places": 0,
"digitSeparator": true
},
``` I show my scructure: first function creates the popup content div, the second calls it, if i want popup. But i couldnt find the documentation, how to get a graphic's relationships, i can only get the attributes. Any idea? ```
function _getPopupTextContent(graphic) {
let popupContent = ""
popupContent += "<div style='padding:5px;background-color:rgb(251,183,46)'><b>" +
"</b></div>" +
"<table style='width:100%;'>"
console.log(graphic)
//popupContent += "<tr>"+graphic.attributes["relationships/1/FIELD"]+"</tr>" not working //undefined
for (var property in graphic.attributes){
console.log((property.toString()).split(/[.]/))
var dbName = (property.toString()).split(/[.]/)[1]
if (dbName !== undefined){
var dbTableName = dbName.split(/[_]/)[3];
//console.log(maximoTableName)
var fieldName = (property.toString()).split(/[.]/)[2];
let value = graphic.attributes["DB.DB_ESRI_V_"+dbTableName+"_TT."+fieldName]
if(fieldName == 'FIELDNAME1'&& value !== undefined){
popupContent += "<tbody><tr><td id = 'attrtd'><b>Label</b></td><td id = 'attrtd''>" +
value
}
if(fieldName == 'FIELDNAME2'&& value !== undefined){
popupContent += "<tr><td id = 'attrtd'><b>Label</b></td><td id = 'attrtd''>" +
value
}
if(fieldName == 'FIELDNAME3'){
popupContent += "<tr><td id = 'attrtd'><b>Label</b></td><td id = 'attrtd''>" +
value
}
if(fieldName == 'FIELDNAME4'&& value !== undefined){
popupContent += "<tr><td id = 'attrtd'><b>Label</b></td><td id = 'attrtd''>" +
value
}
}
popupContent += "</td></tr>" +
"</td></tr>" +
"</a></td></tr>" +
"</tbody></table>"
return popupContent;
}
function _joinAndCreateInfoTemplate(){
var mainLayer = _getWebmapOperationalLayerById(subStationLyrId);
for(var title in popupSubIdDict){
var popupName = _removeAccents(title).toLowerCase(); // subLayertitle
var subId = popupSubIdDict[title]; //sub id
mainLayer.getLayerObject().then(function (subLyrObj) {
if (popupName == 'sublayer'){
popupName = new InfoTemplate();
popupName.setTitle(title);
popupName.setContent(_getPopupTextContent);
}
subLyrObj.infoTemplates[subId] = {
infoTemplate: new InfoTemplate(popupName)
};
```
... View more
11-02-2020
12:31 AM
|
0
|
1
|
576
|
POST
|
I'm trying to minimalize this widget totally, but i feel it's not possible to easily add an event listener what fires the the apply button's function (click:setFilterLayerDef). Maybe i'm missing an easy solution. I'm looking at the js code for hours... just for presentation purpose: <div class="container" data-dojo-attach-point="filterBlock" data-dojo-attach-event="change:setFilterLayerDef" id="filterBlock"> <div class="filter-block" data-dojo-attach-point="filterBlockInner" id="filterBlockInner"> <table id="tblPredicates" class="tableFormat" border=0 cellspacing="0" cellpadding="0"></table> </div> </div>
... View more
09-03-2020
06:09 AM
|
0
|
0
|
265
|
POST
|
I'm trying to get working a floor selector widget, but it's doesn't do any visible change on the map, just gives me back a the queried features. (localLayer_filter widget, what i modified, and also i changed a webscene widget to my 2d case: SceneLayer filter and query | Sample | ArcGIS API for JavaScript 4.16 But none of them showing only the selected features. I'm making this in WAB environment, with a webmap, what contains arcgisDynamicMapServiceLayers with several sublayers. The question is, how to setup the webmap (should i make a layers with FLOOR field visible or not by default)? How to force my app, to show only the queried features, how to force the app request again the tiles from the server whet the definiton changes? How did you set up the localLayer_filter's config? I would love to hear any suggestion!
... View more
08-27-2020
02:17 AM
|
0
|
1
|
520
|
POST
|
I extended these timeouts, but i still got timeout after 5mins(300sec/300000milisec), so i searched for this number in the app, and in the jimu.js/main.js if found this at line 94 (wab 2.15): esriRequest.setRequestPreCallback(function(ioArgs) { if (ioArgs.content && ioArgs.content.printFlag) { // printTask ioArgs.timeout = 300000; } So i overwrote this number to 1200000 and finally i could export A0 size pdf (with PrintPlus widget, but probably this works with normal Print widget). Probably this is not the answer for this question, but maybe a helpful info.
... View more
08-24-2020
06:57 AM
|
0
|
0
|
1981
|
POST
|
in _FeatureTable.js you can console.log(header) and you can see the classes of your headers, so you can be more specific in the css. like this: capital letters are sample values for the scheme. .field-SDE-TABLE-FIELD{ width: 600px!important; }
... View more
08-13-2020
05:32 AM
|
0
|
0
|
973
|
POST
|
Totally hardcoded option: add this to the AT widget's style.ccs: the number is your cloumn .dgrid-column-field3{ width: 500px !important; }
... View more
08-13-2020
05:21 AM
|
0
|
1
|
973
|
POST
|
I would modify the column width to get automatically resized to content, what is maybe too much. But a hardcoded (specify field names) version would be better. Just i cannot find my way to the columns creation. Any idea to stop long string's breakings in the cells? This code is just theoretical: aspect.around(this.grid, "renderColumns", function(original) { return function(object) { var column = original.apply(this, arguments); console.log(columns); if(object['SDE.TABLE.FIELD']){ console.log('found');//object is the row data object so change the field name to your own html.addClass(columns, 'wideColumn'); } return columns; }; }); console.log("run"); this.grid.refresh(); style: .wideColumn { width:400px !important; }
... View more
08-13-2020
04:17 AM
|
0
|
2
|
1002
|
POST
|
PNG export worked, but it created a 27000x19000px file.. (probably it's the full extent of the map.) So do you think it's not possible to export gif from map series only with the dataframe's content, like datadrivenpages worked?
... View more
08-11-2020
04:04 AM
|
0
|
0
|
940
|
POST
|
So... I could squeeze out an invalid gif file (green nothing) p = arcpy.mp.ArcGISProject('current') l = p.listLayouts()[0] mapframe = l.listElements('MAPFRAME_ELEMENT')[0] print(mapframe.name) #mapframe.exportToGIF("D:\\arcgis_data\\Migrate\\pageName.gif") but it's still not mapseries export.
... View more
08-11-2020
01:21 AM
|
0
|
2
|
940
|
POST
|
I'm migrating to arcgis pro, and i cannot find working documentation about this problem. I'd like to export only the dataframe of the layout, i commented out the old method. Any idea? It's a printing tool for many map series projects with more layouts. p = arcpy.mp.ArcGISProject(pPath) for l in p.listLayouts(): fileName = l.name ms = l.mapSeries #df = arcpy.mapping.ListDataFrames(p, "Layers")[0] for pageNum in range(1, ms.pageCount + 1😞 if outFormat == "GIF" and noFrame == "true": #l.exportToGIF(pdfRootName +"_"+ gifpageName + "_data.gif", df, df_export_width=2560, df_export_height=1920) l.exportToGIF(destination + "\\" + gifpageName + ".gif", clip_to_elements=True, resolution=300)
... View more
08-10-2020
09:43 AM
|
0
|
4
|
988
|
Title | Kudos | Posted |
---|---|---|
1 | 02-19-2020 06:07 AM | |
1 | 08-06-2020 01:15 PM |
Online Status |
Offline
|
Date Last Visited |
05-27-2021
08:46 AM
|