|
POST
|
If the new data sources are SDE databases, I have had better luck updating each individual layers using replaceDataSource. Here is a sample: for fileName in os.listdir(path):
fullPath = os.path.join(path, fileName)
if os.path.isfile(fullPath):
basename, extension = os.path.splitext(fullPath)
if extension.lower() == ".mxd":
mxd = arcpy.mapping.MapDocument(fullPath)
for lyr in arcpy.mapping.ListLayers(mxd):
if lyr.supports("DATASOURCE"):
#add some code here to check if the old database is being used
#update the layer datasource if necessary
lyr.replaceDataSource(newSdeCnctPath, "SDE_WORKSPACE", newDataLayerName, False)
mxd.saveACopy(os.path.join(output, fileName))
del mxd
... View more
05-28-2015
08:33 AM
|
2
|
1
|
1098
|
|
POST
|
You may want to try checking if the 'fc' exists. If not, you know you're dealing with a pathing issue. for fc in fclist:
print fc, arcpy.Exists(fc)
... View more
05-27-2015
08:12 AM
|
1
|
1
|
10043
|
|
POST
|
Since the error is "Cannot open 'Roads'", it seems as though it might be having trouble finding the dataset. I get the same error if I run the following lines: import arcpy
with arcpy.da.SearchCursor('NonExistantFC',('ObjectId')) as cursor:
for row in cursor:
print row
... View more
05-27-2015
07:11 AM
|
0
|
0
|
10043
|
|
POST
|
I run update cursors on SDE fairly often without a problem. Nothing special about it from my perspective. Are you passing the full path to the feature class, or setting the workspace and passing the fc name? I almost always pass the full path and haven't had a problem.
... View more
05-26-2015
02:26 PM
|
0
|
4
|
10043
|
|
POST
|
I don't think you can get to the raw code in a tbx file. You might, however, be able to convert the tbx to a pyt using the following tool: http://www.arcgis.com/home/item.html?id=83585412edd04ae48bdffea3e1f7b2e7. I haven't tried it, so I'm not sure what complexity it will introduce. Once the tool is in the pyt, updating the scripts paths should be relatively simple.
... View more
05-19-2015
09:11 AM
|
1
|
0
|
1958
|
|
POST
|
Is your transactional database registered as a datastore within ArcGIS server? If not, the publishing process is likely copying the data from the join to the server.
... View more
05-14-2015
10:48 AM
|
0
|
0
|
1036
|
|
POST
|
The OP was referring to an ArcGIS online organization account. Maintaining group layers is not possible on ArcGIS online...I assume because services get published as feature services, not map services. It is possible on ArcGIS server, however.
... View more
05-13-2015
09:16 AM
|
1
|
0
|
1884
|
|
POST
|
I don't believe so. You will need to use the geoprocessing service's upload function to get the file to the server.
... View more
05-04-2015
12:19 PM
|
2
|
0
|
793
|
|
POST
|
I would really like to start adding layers to my applications using Dynamic Layers and the QueryDataSource class. This would allow me to display some relatively complex relationships on the fly with minimal input from users and without having to pre-symbolize and anticipate all possible combinations in a map service beforehand. My only concern is that exposing SQL queries through a client-side application might open us up to SQL injection. Is anyone out there working with the QueryDataSource class? Are there any built-in safegaurds against SQL injection?
... View more
02-04-2015
07:21 AM
|
0
|
2
|
4479
|
|
POST
|
We have a large number of map services (~40) and GP services (>10) on our GIS server (10.1 Linux, virtual with 4 cores). Since we have a finite amount of memory (20Gb), and most of our map services see relatively little usage, we decided to take a conservative approach when applying service setting. For low usage services, we use the following settings: Low isolation 0 minimum instances 4 maximum instances Max 4 instances/process This ensures that none of our low usage service ever spawn more than one process and we generally have plenty of memory in reserve. The problem is...these services seem to be crashing a lot. I did a bit of sleuthing and found that the services crashes seem to occur when 0 instances (and therefore 0 processes) are running and 2 services requests come in at the same time (or very close to). I think the server might be "tripping over itself" as it tries to start up 2 instances under a single non-existent process. Does this seem logical? If so, I see 2 potential solutions: Set the services to high isolation with 0 minimum instances. Leave the services at low isolation, but set the minimum instances to >= 1. If I were to go this route, is there any benefit to waiting to start up all of the instances associated with a process. From my testing, there doesn't seem to be much difference (in memory used) between a low isolation process with a single running instance and a low isolation process with 4 running instances. Thanks is advance, Bill
... View more
01-30-2015
01:05 PM
|
1
|
0
|
4102
|
|
POST
|
Good example John. I would, however, like something a little more generic since I have a number of differently developers that have implemented my map code in a number of different ways. I use the load script to handle idiosyncrasies as they crop up. Ideally I would like to check if the parent div is displayed when the createMap function is called and add a listener for a generic listener for a style change if it's not. Unfortunately, most browser don't support the onresize event on dom elements. An iterative timeout is the best I could come up with. map in hidden container - JSFiddle Any other suggestions?
... View more
01-15-2015
03:43 PM
|
0
|
1
|
2694
|
|
POST
|
Hmm….it may indeed. The map I have in the IFrame uses a load script. I think can update the load script to defer map loading if the parent(s) are not visible when the page loads. I like it. I’ll give it a shot. Good find!
... View more
01-15-2015
01:57 PM
|
0
|
0
|
2694
|
|
POST
|
Yup. This is the same error you get in all browser if you try loading a map without a defined height and width.
... View more
01-15-2015
12:17 PM
|
0
|
2
|
2694
|
|
POST
|
Not really. The map works, but the container doesn’t collapse. It’s just hidden. http://jsfiddle.net/uo0f0xzn/3/
... View more
01-15-2015
12:11 PM
|
0
|
0
|
2694
|
|
POST
|
We are working on implementing a responsive design to our website. Much of our content is now nested in css-based accordian panes. We have some maps that are nested in accordion panes. In Firefox (I have 31.4 ESR version), the map won't load if the accordion pane is originally collapsed. The problem appears to be that the map frame is missing dimension when the parent container is hidden. Internet explorer must handle hidden content differently; it works fine in IE9. The following example should demonstrate the problem. As it is, the example will fail in FF. Edit fiddle - JSFiddle Our website content manager would like the map to be collapsed when the page opens. I'm not sure how to make this happen in FF. Any suggestions?
... View more
01-15-2015
11:45 AM
|
0
|
9
|
6680
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-21-2017 10:00 AM | |
| 1 | 09-11-2015 08:24 AM | |
| 1 | 01-25-2016 12:30 PM | |
| 1 | 05-27-2015 08:12 AM | |
| 1 | 06-09-2015 03:28 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|