POST
|
Finally I figure it out, the following code from the ArcGIS help: datasets = arcpy.ListDatasets(feature_type='feature') datasets = [''] + datasets if datasets is not None else [] for ds in datasets: for fc in arcpy.ListFeatureClasses(feature_dataset=ds): PATH = os.path.join(arcpy.env.workspace, ds, fc) with arcpy.da.SearchCursor(PATH, ["*"]) as cursor: for row in cursor: tupleList.append(row)
... View more
09-10-2017
06:04 AM
|
2
|
0
|
343
|
POST
|
Hi Jake, I fortunately found this topic but I got an issue while I count not save the map description which I got an error: Traceback (most recent call last): File "<string>", line 254, in run_nodebug File "C:\DEV\CWPP\TileMap.py", line 23, in <module> College_station_mxd.save() File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\utils.py", line 182, in fn_ return fn(*args, **kw) File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\_mapping.py", line 850, in save return convertArcObjectToPythonObject(self._arc_object.save(*gp_fixargs((), True))) IOError: MapDocObject: Unable to save. Check to make sure you have write access to the specified file and that there is enough space on the storage device to hold your document. I don't know how can solve this. Any idea?Thanks, Peter
... View more
03-07-2016
01:10 PM
|
0
|
1
|
830
|
POST
|
Thanks for the suggestion. I got something confused which is how to turn the ArcGIS API for JavaScript Sandbox into a widget code, especially when I plan to have the two functions initToolbar and addGraphic: function initToolbar() { tb = new Draw(map); tb.on("draw-end", addGraphic); // event delegation so a click handler is not // needed for each individual button on(dom.byId("info"), "click", function(evt) { if ( evt.target.id === "info" ) { return; } var tool = evt.target.id.toLowerCase(); console.log(tool); map.disableMapNavigation(); tb.activate(tool); }); } in this function, tb.on("draw-end", addGraphic); I don't know how to invoke the "draw-end" function by calling the addGraphic. function addGraphic(evt) { //deactivate the toolbar and clear existing graphics tb.deactivate(); map.enableMapNavigation(); // figure out which symbol to use var symbol; if ( evt.geometry.type === "point" || evt.geometry.type === "multipoint") { symbol = markerSymbol; } else if ( evt.geometry.type === "line" || evt.geometry.type === "polyline") { symbol = lineSymbol; } else { symbol = fillSymbol; } map.graphics.add(new Graphic(evt.geometry, symbol)); } I am trying to understand the enableMapNavigation() function, it seems that there is not such function anymore. Any idea? Thanks,
... View more
05-26-2015
02:36 PM
|
0
|
0
|
1528
|
POST
|
Hi I am kind of in struggling in simplifying the eDraw example widget for a simple use. What I plan to do is: 1) Draw polygon on the map 2)Turn the draw result (graphics) into feature set, I have seen some code like this: var featureSet = new FeatureSet(); var features = []; features.push(map.graphics.graphics[0]); featureSet.features = features; 3) use derived featureset to clip with other layers(e.g. another polygon layer or point layer) for spatial analyses. However I couldn't figure out how can I accommodate this code into the existing example. Could you provide some hints? Thanks, Peter
... View more
05-22-2015
09:21 AM
|
0
|
2
|
1528
|
POST
|
Never mind, I think now it is working, instead use button, I copied from the eDraw example <input type="button" class="jimu-input blue-button" value="${nls.extract}" data-dojo-attach-event="ondijitclick:extractData"/> and add the extratData function in the Widget.js but I didn't included 'dijit/form/Button' because there is no require keywork anymore. I am kind of still struggling in simplifying the eDraw example widget this time. What I plan to do is not that complex but: 1) Draw polygon on the map 2)Turn the draw result (graphics) into feature set(I have seen some code like this: var featureSet = new FeatureSet(); var features = []; features.push(map.graphics.graphics[0]); featureSet.features = features; However I couldn't figure out how can I accommodate this code into the existing example. Has anyone done this before? Thank you all for so many help.
... View more
05-22-2015
09:17 AM
|
0
|
0
|
804
|
POST
|
Qun Sun I checked the resources that from the eDraw widget and follow your suggestions, however, I still have the problem. How can I the follow the spec that you mentioned(where can I find them, for e.g., if I want to add a button to the widget, how many step I should go through)? Thanks,
... View more
05-21-2015
10:08 AM
|
0
|
0
|
804
|
POST
|
I plan to customize the Draw widget that default from web AppBuilder, I plan to do is copy code from Clip and ship | ArcGIS API for JavaScript to the existing Draw widget, however, I didn't make it working. How can I add the function in the "require" (from the HTML) into the "function" (stemapp\widgets\Draw\Widget.html), I tried to add them in the front, however, I kept getting the message "can not create widget" when re-starting the app. Has anyone have experiences? I looked at the page from the tutorial: Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers , Is there a better way to show my change for the application? currently I am doing is first remove the draw widget from the edit and then add a new one, however, it is kind of slow. Look forward to hearing from you. Peter
... View more
05-19-2015
02:53 PM
|
0
|
4
|
5579
|
POST
|
Hi, did you get this resolved? I looked into an example: Clip and ship | ArcGIS API for JavaScript But was told that the Extract GP Service no longer exists on the sample server, I hope it can be resolved and helps. Peter
... View more
05-15-2015
09:08 AM
|
0
|
0
|
3139
|
POST
|
Can those spatial analyses be customized to a widget for the web appbuilder?
... View more
05-15-2015
09:04 AM
|
0
|
0
|
3139
|
DOC
|
I do find both of the file in the folder your mentioned: a config.json in the \client\stemapp\widgets\PrintPlus folder and the property in the apps\2\config.json file "config": "configs/PrintPlus/config_Print Plus.json" I tried to change the file name from config.json to config_PrintPlus.json However, I still get the same error and the frame(red) not showing up. There is a file named "Configuration Properties for the Print Plus Widget.pdf" in the \client\stemapp\widgets\PrintPlus folder, however, I could not understand "Use this document along with the config.json file in the Widget’s root directory." this sentence, where is the root directory? what means use this document along with?Should I do some change in the config.json file?
... View more
05-14-2015
01:12 PM
|
0
|
0
|
3657
|
DOC
|
I did the step "right click on the "PrintPlus-1.1.2-2015-4-11.zip" link and choose "Save Link As..." and then unzip the contents and copy the PrintPlus folder over to your \client\stemapp\widgets folder", and I created a new app the Print Plus widget, the widget shows up on my application, and I copied the "serviceURL": "http://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" from the config.json to the \client\stemapp\config.jon (Not sure if I am correct), however, there was no the red frame show up and when I click print it says "error, try again", am I doing correct?
... View more
05-13-2015
11:43 AM
|
0
|
0
|
3657
|
POST
|
Is that possible to specify a little bit? which geoprocessing tool should I look at?
... View more
05-12-2015
07:56 AM
|
0
|
0
|
2559
|
POST
|
I also looking into that widget. I truly believe it is a necessary widget with the web appbuilder. Are the widget group working on that? How can I imagine that in the future it will not exist.
... View more
05-07-2015
11:59 AM
|
0
|
0
|
2559
|
Title | Kudos | Posted |
---|---|---|
2 | 09-10-2017 06:04 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|