POST
|
I have a python script that updates the tiles for a cached basemap using a feature class of polygons for the area of interest. Once the tiles are updated, I would like to update the values in the original feature class, changing the field "Cache" values from yes to no. I have no trouble with updating the tiles based on the feature class. I am having trouble changing the values in the feature class "Cache" field from yes to no. The feature class is in SDE and is versioned. I am using cursors and da.Editor. ArcGIS 10.1. I get this error: Objects in this class cannot be updated outside an edit session [GisWork.SDEADM.SectionsToCache] With this code: edit = arcpy.da.Editor(env.workspace) edit.startEditing(True, True) edit.startOperation() #Use an update cursor to update the values. This cursor gets all the records in the SectionsToCache feature class where CACHE = 'Yes' with arcpy.da.UpdateCursor(inputFeatureClass, fieldName, whereClause) as cursor: # Update the field value to 'No' for row in cursor: print row[0] row[0]= "No" cursor.updateRow(row) edit.stopOperation() edit.stopEditing(True) I have tried placing the start and stop operations inside the for loop. I have tried with startEditing(False, True). I tried using with for the editor since this is supposed to eliminate the need to handle the stop and start, I believe, but had the same error. I have also tried to use CalculateField but the values did not update in the feature class. Since I need to use a Feature Layer, I am not sure if MakeFeatureLayer affects the input feature class. It looks like it did not. I can post my code for this but am more interested in getting this to work using the editor and cursors on the feature class itself. Does anyone else have this working? Thanks for any suggestions! Janice.
... View more
09-05-2013
01:20 PM
|
0
|
1
|
3163
|
POST
|
thanks Tim. The dojo/ready was what was missing and causing the map to wander. The resize event for the mapdiv did not do anything for me. thanks for your help...
... View more
08-08-2013
01:52 PM
|
0
|
0
|
549
|
POST
|
I have an app (arcgis javascript 3.5) that displays a map inside a dojo content pane as the center region of a bordercontainer. When I hit refresh (F5) in IE8, the map shifts a little to the left. This does not happen everytime for a refresh but it did happen the last 5 times while I was creating screen shots! The amount of shift changes with the size of the window... the further out I am zoomed, the larger the shift. For the screen shots, I did not make any changes, I just hit F5. Anyone else run into this issue? I know this is not a problem in other browsers but, need to have this app work in IE8. Thanks, Janice.
... View more
08-05-2013
02:31 PM
|
0
|
4
|
1026
|
POST
|
Wrapping the function which creates the map in a timeout for 500ms seems to help. Now the layout is good but the center of the map keeps "walking" or "shifting" to the upper left. This is also intermittent.
... View more
08-05-2013
11:24 AM
|
0
|
0
|
549
|
POST
|
I am trying to get my app to display correctly in Internet Explorer 8 and am having an intermittent problem with the layout. I am using arcgis javascript 3.5 and dojo. I have a dojo bordercontainer with a toolbar in the top region, a content pane with accordion in the left region, and the map in the center region. This works fine in IE9 and most of the time it works fine in IE8. On occasion, all of the regions in the bordercontainer draw on top of each other in the upper left corner. Has anyone else run into this issue? Any ideas on a solution? (Besides not using IE8!). Thanks, Janice.
... View more
08-05-2013
11:08 AM
|
0
|
4
|
908
|
POST
|
Has anyone run into this issue? I am trying to use the levelChange object when the extent of the map changes. The documentation says that it should be Boolean but I am getting an Extent Object. I am using javascript api 3.3, dojo 1.8, arcgis server 10.1 thanks, Janice.
... View more
05-15-2013
03:54 PM
|
0
|
2
|
840
|
POST
|
Thanks Swingley but I would have to go through the forum posts and find the broken links and send them to you. Dawenx posted one. It redirects you to the Javascript Help Files but not the specific help document you are looking for. Any forum posts dated prior to the move have these broken links. Janice.
... View more
04-18-2013
08:16 AM
|
0
|
0
|
736
|
POST
|
Has anyone at ESRI tried to fix the broken links in Forum Posts? Many users have included links in the threads. Most of these links are useless now... I suppose this is from the files being moved. Is there an easy way to get the links to work again? Thanks, Janice.
... View more
04-18-2013
07:48 AM
|
0
|
7
|
1111
|
POST
|
Hey bgfield, You may need to tweak the height of the print button to get it to be the same size as the other buttons. I set mine to 21px. See the attached file. Janice.
... View more
02-12-2013
12:05 PM
|
0
|
0
|
389
|
POST
|
Jian, Thank-you for all the help! Is there any training that you would suggest that could help a person understand javascript and dojo and how it all fits together? Thanks! Janice.
... View more
02-06-2013
09:44 AM
|
0
|
0
|
1423
|
POST
|
Jian, Thanks for the help. This works for adding the Print Button to the toolbar but is not exactly what I want. I attached a screenshot of what the toolbar looks like after changing my code. I would like to be able to insert the print button between my bookmark button and my help button. All of the other buttons are declaritive (is that what you call it when they are created in HTML?). Do I need to create all of the buttons on the toolbar programmatically to get the level of control that I am looking for? I tried to use navToolbar.addChild(printer, 😎 and did not get any results. It also works how I had it before as long as the print div is without the dijit.form.button part. (<div id="print_button"></div>). However, this causes the Print and the Help Buttons to display below each other. I attached this screen shot as well. Your thoughts on this would be greatly appreciated. Thanks, Janice. //get the toolbar
var theToolBar = dojo.byId("navToolbar");
//create the print dijit
app.printer = new esri.dijit.Print({
"map": app.map,
"templates": templates,
url: app.printURL
}, theToolBar);//.placeAt("navToolbar"); //, //dojo.byId("print_button")); //theToolBar);
// theToolBar.addChild(app.printer, 6);
app.printer.startup();
<div id="navToolbar" data-dojo-type="dijit.Toolbar">
<div data-dojo-type="dijit.form.Button" id="zoomin" data-dojo-props="iconClass:'zoominIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.ZOOM_IN); setActiveTool('zoomin');}">Zoom In</div>
<div data-dojo-type="dijit.form.Button" id="zoomout" data-dojo-props="iconClass:'zoomoutIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.ZOOM_OUT); setActiveTool('zoomout');}">Zoom Out</div>
<div data-dojo-type="dijit.form.Button" id="zoomfullext" data-dojo-props="iconClass:'zoomfullextIcon', onClick:function(){zoomToFullExtent();}">Full Extent</div>
<div data-dojo-type="dijit.form.Button" id="zoomprev" data-dojo-props="iconClass:'zoomprevIcon', onClick:function(){navToolbar.zoomToPrevExtent();}">Prev Extent</div>
<div data-dojo-type="dijit.form.Button" id="zoomnext" data-dojo-props="iconClass:'zoomnextIcon', onClick:function(){navToolbar.zoomToNextExtent();}">Next Extent</div>
<div data-dojo-type="dijit.form.Button" id="pan" data-dojo-props="iconClass:'panIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.PAN); setActiveTool('pan');}">Pan</div>
<div data-dojo-type="dijit.form.Button" id="measure" data-dojo-props="iconClass:'measureIcon', onClick:function(){setActiveTool('measure'); displayMeasure();}">Measure</div>
<div data-dojo-type="dijit.form.DropDownButton" data-dojo-props="iconClass:'bookmarkIcon'">
<span>Bookmarks</span>
<div data-dojo-type="dijit.TooltipDialog">
<div id="bookmarks"></div>
</div>
</div>
<div id="print_button"></div>
<div data-dojo-type="dijit.form.Button" id="help" data-dojo-props="iconClass:'helpIcon', onClick:function(){displayHelp();}">Help</div>
</div>
... View more
02-06-2013
06:04 AM
|
0
|
0
|
1423
|
POST
|
I am using the esri.dijit.Print example for adding templates to the esri print dijit. This gives me a print button so when I add that button to the toolbar, I get a button on top of a button. If I give the toolbar button a class, like I did with the navigation buttons, I get an image added to the button that is behind the Print button. What I would like to do is add the Print Button (esri print dijit) to the toolbar. I understand how to add buttons to the toolbar, I successfully added the bookmarks, help, and measure buttons. What I don't understand is how to add a pre-canned button (the esri print dijit) to the toolbar without the toolbar creating a button for me to use. If I use the button provided by the toolbar and call it 'Print' and then add the print dijit to it, what I get is a button that when clicked brings up another button that has the dropdown list of templates on it. I really do not want a button on a button. Has anyone else successfully added a print dijit to the toolbar as I am describing? Thanks!
... View more
02-05-2013
05:45 AM
|
0
|
0
|
1423
|
POST
|
Here is the button code... <div id="navToolbar" data-dojo-type="dijit.Toolbar"> <div data-dojo-type="dijit.form.Button" id="zoomin" data-dojo-props="iconClass:'zoominIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.ZOOM_IN); setActiveTool('zoomin');}">Zoom In</div> <div data-dojo-type="dijit.form.Button" id="zoomout" data-dojo-props="iconClass:'zoomoutIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.ZOOM_OUT); setActiveTool('zoomout');}">Zoom Out</div> <div data-dojo-type="dijit.form.Button" id="zoomfullext" data-dojo-props="iconClass:'zoomfullextIcon', onClick:function(){zoomToFullExtent();}">Full Extent</div> <div data-dojo-type="dijit.form.Button" id="zoomprev" data-dojo-props="iconClass:'zoomprevIcon', onClick:function(){navToolbar.zoomToPrevExtent();}">Prev Extent</div> <div data-dojo-type="dijit.form.Button" id="zoomnext" data-dojo-props="iconClass:'zoomnextIcon', onClick:function(){navToolbar.zoomToNextExtent();}">Next Extent</div> <div data-dojo-type="dijit.form.Button" id="pan" data-dojo-props="iconClass:'panIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.PAN); setActiveTool('pan');}">Pan</div> <div data-dojo-type="dijit.form.Button" id="measure" data-dojo-props="iconClass:'measureIcon', onClick:function(){setActiveTool('measure'); displayMeasure();}">Measure</div> <div data-dojo-type="dijit.form.DropDownButton" data-dojo-props="iconClass:'bookmarkIcon'"> <span>Bookmarks</span> <div data-dojo-type="dijit.TooltipDialog"> <div id="bookmarks"></div> </div> </div> <div data-dojo-type="dijit.form.Button" id="print_button"> </div> <div data-dojo-type="dijit.form.Button" id="help" data-dojo-props="iconClass:'helpIcon', onClick:function(){displayHelp();}">Help</div> </div>
... View more
02-04-2013
12:09 PM
|
0
|
0
|
1423
|
POST
|
When I add the print button to the nav tool bar, I get an extra button behind the print button. Is there a way to add the print button as shown in the attached screen shot without getting an extra button? thanks, Janice.
... View more
02-04-2013
11:44 AM
|
0
|
12
|
2198
|
Title | Kudos | Posted |
---|---|---|
1 | 06-15-2021 01:59 PM | |
2 | 01-04-2022 03:43 PM | |
1 | 02-02-2021 01:33 PM | |
1 | 01-05-2021 01:59 PM | |
1 | 06-13-2014 07:48 AM |
Online Status |
Offline
|
Date Last Visited |
01-04-2022
05:15 PM
|