POST
|
I'm to trying to migrate from arcmap to arcgis pro(2.6). After importing the mxd, some annotation feature classes get huge on the screen(Annotation reference scale update fails also..). After using 'upgrade dataset' tool, the annotations disappear. I'm trying the recreate them, but i don't see it's possible, or not this way. The attributes of an annotation feature: Textstring: "<FNT name="Tahoma" size="5,00">SOMETEXT</FNT> More text" FontSize:3 FontName:Arial ect.. Is it possible to do this with arcgis pro, or it cannot handle this type of properties?
... View more
08-10-2020
05:50 AM
|
0
|
0
|
546
|
POST
|
Thank you so much! It was not working because the infotemplate is infoTemplate But finally we (you two) solved the case here Just for the record: function getWebmapOperationalLayerById (layerId) { var instance = LayerInfos.getInstanceSync(); var layerFound = null; instance.traversalLayerInfosOfWebmap(function (aLayer) { if (aLayer.id === layerId) { layerFound = aLayer; console.log("found") return; //get out of traversalLayerInfosOfWebmap() } }); return layerFound; } var layerId = 'LayerID'; var operationalLayer = getWebmapOperationalLayerById(layerId); console.log(operationalLayer) operationalLayer.getLayerObject().then(function(layerObject){ var title = 'Popup title'; var content = 'Custom description. You can use HTML here. <br> And access attribute value like this ${SOME_ATRIBUTE}'; var sublayerId = 0; if(!layerObject.infotemplates){ layerObject.infoTemplates = {}; } layerObject.infoTemplates[sublayerId]= { infoTemplate: new InfoTemplate(title, content) } });
... View more
08-06-2020
01:15 PM
|
1
|
0
|
609
|
POST
|
Totally right! Are there any methods to deal with them? Sorry, that i didn't know that this is a big difference. i tought a sublayer is a featurelayer. Services served from arcmap mxd-s contain featurelayers..
... View more
08-06-2020
11:50 AM
|
0
|
0
|
1900
|
POST
|
Thanks for the snippet! I got back a circular object, but after getLayerObject method, it became the same empty promise. WAB env. is not for the beginners but i won't give up!
... View more
08-06-2020
11:35 AM
|
0
|
2
|
1900
|
POST
|
Sorry for the delay, i just finished work, when you answered. I get back a layernode: id: "alallomas_9075_0" map: {_plugins: {…}, _internalLayerIds: Array(1), _layers: Array(0), _layerDivs: Array(0), _basemapPending: false, …} subId: 0 title: "Alállomás" _layerInfo: {originOperLayer: {…}, layerObject: {…}, map: {…}, title: "Alállomás", id: "alallomas_9075_0", …} __proto__: Object and now an object also as the featurelayer. but its not so right. JSON.stringify(featureLayer) // {"url":"https:/webserver.local/arcgis/rest/services/alallomas/MapServer/0","empty":true} I have no clue why it is empty.
... View more
08-06-2020
11:08 AM
|
0
|
2
|
1900
|
POST
|
Robert, Probably i should quit my job, because i'm stupid, i tried, googled, read for hours without success, I don't return my feature layer, maybe that's my problem. Please, show my more info. featureLayer's console log: "Error at Object._getLayerObject (/jimu.js/LayerInfos/LayerInfoForDefaultService.js?wab_dv=2.15:187:17) at Object.getLayerObject (/jimu.js/LayerInfos/LayerInfoForDefaultService.js?wab_dv=2.15:208:19) at Object.getLayerObject (/jimu.js/LayerNode.js?wab_dv=2.15:200:30) at Object.startup (/widgets/CustomPopup/Widget.js?wab_dv=2.15:178:40) at Object.advice (https://js.arcgis.com/3.31/init.js:121:101) at Object.c [as startup] (https://js.arcgis.com/3.31/init.js:120:393) at Object.openWidget (/jimu.js/WidgetManager.js?wab_dv=2.15:540:18) at Object.<anonymous> (/jimu.js/layoutManagers/BaseLayoutManager.js?wab_dv=2.15:208:32) at https://js.arcgis.com/3.31/init.js:64:337 at m (https://js.arcgis.com/3.31/init.js:108:248)"
... View more
08-06-2020
07:14 AM
|
0
|
4
|
1900
|
POST
|
I made a custom popup for a specific layer. But my method is really not good for Web Appbuilder/WebMap environment. Section from the customPopup widget: map = new Map("map", { infoWindow: infoWindow, }); //create a popup to replace the map's info window var infoWindow = new InfoWindow({ domNode: domConstruct.create("div", null, dom.byId("map")), }); var popupTemplate = new InfoTemplate(); popupTemplate.setContent(_getTextContent); var featureLayer = new FeatureLayer(substationURL, { mode: FeatureLayer.MODE_SNAPSHOT, infoTemplate: popupTemplate, outFields: ["*"], }); this.map.addLayer(featureLayer); featureLayer.on('load', lang.hitch(this, function() { console.log("load"); LayerInfos.getInstance(this.map, this.map.itemInfo).then(lang.hitch(this, function(layerInfos) { var featureLayerInfo = layerInfos.getLayerInfoById(featureLayer.id); featureLayerInfo.title = 'Title'; })); This way, i have to remove the layer from the webmap to avoid duplication. I would rather modify programmatically the original layer's infoWindow. But i cannot find any documentation for this. How can i reference existing objects? Every tutorial or sample creates new ones... I tought something like this will work: this.layerStructure = LayerStructure.getInstance(); var featureLayer = this.layerStructure.getNodeById(subLayerID); featureLayer.infoWindow = popupTemplate
... View more
08-05-2020
07:36 AM
|
0
|
12
|
2770
|
POST
|
I have similar problem. ArcGIS Pro 2.4 with Oracle database connection with 2800 tables. I can see all of the tables in Catalog View, but not in Catalog Pane. Feature or bug? Any hidden setting?
... View more
07-29-2020
07:00 AM
|
0
|
0
|
675
|
DOC
|
Hi Robert, I would like to toggle between two layers. Is it possible to turn off visibility of a layer while turning on visibility of another layer?
... View more
07-23-2020
01:46 AM
|
0
|
0
|
3008
|
POST
|
Hello! I'm trying to make the table editable, but i cannot use somewhy ajax post request. how do you send the edits to the server? table.MakeCellsEditable({ onUpdate: applyEdits, inputCss: "my-input-class", columns: [3, 4], confirmationButton: { confirmCss: "my-confirm-class", cancelCss: "my-cancel-class", }, inputTypes: [ { column: 3, type: "text", options: null, }, { column: 4, type: "list", options: [ { value: "1", display: "Progress }, { value: "2", display: "Done" }, { value: "3", display: "Error" }, ], }, ], }); function applyEdits(updatedCell, updatedRow) { console.log("The new value for the cell is: " + updatedCell.data()); console.log("The values for each cell in that row are: " + updatedRow.data()); $.ajax({ type: "POST", url: errorReportsUrl, data: updatedCell.data(), success: function(updatedCell){alert(updatedCell.data())}, dataType: "application/json; charset=utf-8" }); }
... View more
06-10-2020
07:57 AM
|
0
|
0
|
479
|
POST
|
I know this question's scope is bigger than some lines of code, but maybe somebody did this already. We have like 40 webmap's and i'm trying to add the editable feature layer with the edit widget, because it's just an error reporting layer, so the user doesn't really need to see it all the time. I configured the edit widget with it's config, i see the printed parameters, if i open the widget. Any idea what i missed? This is how i load it: addErrorReportLyr: function(){ var featureLayer = new FeatureLayer("https://hostname.local/arcgis/rest/services/errorReports/FeatureServer/0", {id:"errorReports"}); this.map.addLayer(featureLayer); console.log('addlayer'); featureLayer.on('load', lang.hitch(this, function() { LayerInfos.getInstance(this.map, this.map.itemInfo).then(lang.hitch(this, function(layerInfos) { var featureLayerInfo = layerInfos.getLayerInfoById(featureLayer.id); featureLayerInfo.title = ''; featureLayerInfo.loadInfoTemplate().then(lang.hitch(this, function() { console.log(featureLayerInfo); })); })); })); }, And how i call it(i know it's not nice, but has to be first i think): _prepareCreating: function() { // beginEditingByFeatures can be called from outside, // so _init must be called before userDef resolved. this.addErrorReportLyr(); this._init(); this.loading.show(); allowCreate: true //This is my print from _getLayerInfosConfig allowDelete: true disableGeometryUpdate: false featureLayer: {id: "errorReports"}//my current map's print btw: graphicsLayerIds: (2) ["graphicsLayer1", "errorReports"] fieldInfos: (5) [{…}, {…}, {…}, {…}, {…}] __proto__: Object length: 1 __proto__: Array(0) _getLayerInfosInConfig: function() { ... else if(this._configEditor.layerInfos.length > 0) { // configured and has been checked. //layerInfos = this._getDefaultLayerInfos(); layerInfos = this._converConfiguredLayerInfos(this._configEditor.layerInfos); console.log("3",layerInfos);
... View more
05-18-2020
06:44 AM
|
0
|
0
|
361
|
POST
|
I was trying to understand the file's communication rather. And some minutes ago a solved it like this, but i will use your answer in the future for sure. _init: function() { var webMapID= this._editWidget.map.itemInfo.item.id; dojo.connect(dijit.byId('dijit_form_ValidationTextBox_3'), 'onChange', function () { var mapid=dijit.byId("dijit_form_ValidationTextBox_1").attr("value"); console.log("itemid:"+webMapID) console.log(mapid); var update = mapid.replace(mapid, webMapID); console.log(update); dojo.byId('dijit_form_ValidationTextBox_1').value = update; }); }, Unfortunately, i realised that it fills the inputbox, but if the user doesn't modify the string, it doesn't save the string what is inside the dijit_form_ValidationTextBox_1 so i need to figure out how to pass this value to the system. But a thousand thanks for your help!
... View more
05-14-2020
05:35 AM
|
0
|
0
|
391
|
POST
|
I have programing theory question. I need to develop the editor widget, to fill out input boxes automatically with webmapID, date, ect. I'm trying to follow the widget's techniques, but i'm unsuccesfull. So here i want to get the webmapid in widget.js, but probably it's already not good, because i don't have 'map' in that scope. In the widget.js's startup function i call this method "this.getWebMapId(); And it returns the value. My big problem,(except that i'm really new in programming) is how to call this method in the RelatedRecordsEditor.js's "_init" function. Should i declare it like the Clazz object's property? What should i do with the _editWidget object in RelatedRecordsEditor? What i have done: widget.js: /******************************* * Public methods * *****************************/ getWebMapId: function() { var webMapID = this.map.itemInfo.item.id; console.log("webmapid: "+ webMapID); return webMapID; }, RelatedRecordsEditor.js: dojo.connect(dijit.byId('dijit_form_ValidationTextBox_1'), 'onChange', function (webMapID) { var mapid=dijit.byId("dijit_form_ValidationTextBox_1").attr("value"); console.log(mapid); var webMapID; webMapID = this._editWidget.getWebMapId(); var update = mapid.replace(mapid, webMapID); console.log(update); dojo.byId('dijit_form_ValidationTextBox_1').value = update; }); (_editWidget is undefined here.)
... View more
05-14-2020
02:11 AM
|
0
|
2
|
453
|
POST
|
Could you help me in this? I'm trying the same method, without luck. I'm trying to add progammatic values to the editor widget's input box, because i don't know how to store webmap itemID in a better way. I tried some method, but no success. in RelatedRecordsEditor.js: _init: function() { this.refDomNode = this.editorATI.domNode; this.originalLayer = this.originalFeature.getLayer(); this.layerInfosObj = jimuLayerInfos.getInstanceSync(); this.originalJimuLayerInfo = this.layerInfosObj.getLayerOrTableInfoById(this.originalLayer.id); this.undoManager = new UndoManager(); this._temporaryData = { eventHandles: [], dijits: [] }; this._tempPopup = new Popup({/*titleInBody: false*/}, html.create('div')); this._tempPopup.show(); var mapIDbox = dojo.byId("dijit_form_ValidationTextBox_1"); console.log(mapIDbox) mapIDbox.set('value', 'myValue'); document.getElementById("dijit_form_ValidationTextBox_1").value = "myValue"; //dojo.byId("dijit_form_ValidationTextBox_1").value = "myvalue"; //mapID.setValue = "myValue"; console.log: <input class="dijitReset dijitInputInner" data-dojo-attach-point="textbox,focusNode" autocomplete="off" type="text" tabindex="0" id="dijit_form_ValidationTextBox_1" maxlength="50" aria-required="false" value="" aria-invalid="false">
... View more
05-06-2020
02:09 AM
|
0
|
0
|
543
|
POST
|
The widget cannot load "dojo/node!fs" for me, even if i define('dojo/require'). I'm working in WAB environment. Could you give me a workaround? Thank you!
... View more
04-27-2020
12:16 AM
|
0
|
1
|
1110
|
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
|