POST
|
I have a versioned GDB (Postgresql) and I have versions DEFAULT-> A -> B. Version A modifies two poly lines and version B modifies one of the two that is modified in version A. In ArcMap, even though I have "List by source" selected and have selected the source (which also shows the selected version), I do not get "Post" nor "Reconcile" buttons enabled in the versioning toolbar when either version A or B is selected. Am I missing something or this is a bug?
... View more
01-15-2015
01:30 PM
|
0
|
0
|
3072
|
POST
|
In ArcGIS documentation, I cannot find any references to cloning a transactional version. Is there a built in method for it? I think I know how to do it manually in Arcpy, basically creating a new state branching from a parent and copying all the deltas with the given state (clone source) to the new state (clone) and of course adding the new state to the version tree under the parent, but I am wondering if there is a more neat way of doing it.
... View more
01-12-2015
03:13 PM
|
0
|
0
|
3979
|
POST
|
I have a versioned database in ArcGIS and I am wondering how can I tell arcpy what version to query. The closest I have got to an answer has been building a particular connection file that specifies the version to connect to, or use `ChangeVersion_management` which only works on layers and views. I can easily do that in a published map on the web using ArcGIS JS API by setting the version using layer.setGDBVersion(version)
... View more
11-26-2014
05:52 PM
|
0
|
1
|
3793
|
POST
|
I have a map for which I have created feature templates, originally based on different values for a field. I have published the map to my ArcGIS server and the templates worked perfectly. Now, I want to consolidate those templates into one, i.e. have just one template for that layer. But when I delete the other unwanted ones, save the map and publish it again (even if I delete the map from the server rather than over writing it), those unwanted templates still show up. I have checked the REST API interface of the map, and it still has all the templates. In ArcMap, I can only see my desired templates, so I do not know how to find and delete those unwanted types/templates. Here is the part of the REST API interface that shows the unwanted templates are there: Types: ID: B Name: 1 PH Domains: phasecode: Inherited equipref: Inherited phase: Inherited Templates: Name: 1 PH Description: Prototype: phase: 6 secname: null parentsec: null phasecode: B equipref: null otype: null sub: null bay: null Drawing Tool: esriFeatureEditToolLine ID: C Name: 1 PH Domains: phasecode: Inherited equipref: Inherited phase: Inherited Templates: Name: 1 PH Description: Prototype: phase: 6 secname: null parentsec: null phasecode: C equipref: null otype: null sub: null bay: null Drawing Tool: esriFeatureEditToolLine ID: BC Name: 2 PH Domains: phasecode: Inherited equipref: Inherited phase: Inherited Templates: Name: 2 PH Description: Prototype: phase: 6 secname: null parentsec: null phasecode: BC equipref: null otype: null sub: null bay: null Drawing Tool: esriFeatureEditToolLine ID: AB Name: 2 PH Domains: phasecode: Inherited equipref: Inherited phase: Inherited Templates: Name: 2 PH Description: Prototype: phase: 6 secname: null parentsec: null phasecode: AB equipref: null otype: null sub: null bay: null Drawing Tool: esriFeatureEditToolLine ID: ABC Name: 3 PH Domains: phasecode: Inherited equipref: Inherited phase: Inherited Templates: Name: Conductor Description: Prototype: phasecode: ABC equipref: #1/0 ACSR 6/1 otype: wire phase: null bay: null secname: null parentsec: null sub: null Drawing Tool: esriFeatureEditToolLine ID: AC Name: 2 PH Domains: phasecode: Inherited equipref: Inherited phase: Inherited Templates: Name: 2 PH Description: Prototype: phase: 6 secname: null parentsec: null phasecode: AC equipref: null otype: null sub: null bay: null Drawing Tool: esriFeatureEditToolLine ID: A Name: 1 PH Domains: phasecode: Inherited equipref: Inherited phase: Inherited Templates: Name: 1 PH Description: Prototype: phase: 6 secname: null parentsec: null phasecode: A equipref: null otype: null sub: null bay: null Drawing Tool: esriFeatureEditToolLine
... View more
11-12-2014
11:06 AM
|
1
|
0
|
2304
|
POST
|
Just for the record, here is the final code that works: somewhere in a function I have:
uploadFile( 'importBillingFile', 'importBillingFileForm' , uploadSucceeded, uploadFailed);
where `'importBillingFile` is the name of the GP service to which file is being uploaded and:
function uploadFile( svcName, form , uploadSucceeded, uploadFailed){
gpUploadURL = "http://"+gisServer+":6080/arcgis/rest/services/"+svcName+"/GPServer/uploads/upload";
console.log('Uploading file...', gpUploadURL);
esri.request({
url: gpUploadURL,
form: dojo.byId(form),
content: { f: "json" },
handleAs : "json",
},{usePost: true, useProxy:true}).then(uploadSucceeded, uploadFailed);
}
function uploadSucceeded(response){
billingFileItemId= response["item"].itemID;
registry.byId('ibfok').set("disabled", false);
console.log('File uploaded successfully, item ID:', billingFileItemId);
}
function uploadFailed(response){
console.log('Upload failed: ', response);
}
and the HTML part:
<form id="importBillingFileForm" style='padding:4px;' method="post" enctype="multipart/form-data" onchange="importBillingFile();">
<input type="file" name="file" id="inFile" size="50" />
</form>
... View more
10-16-2014
12:51 PM
|
0
|
0
|
1126
|
POST
|
That is very interesting, your code is exactly the same as mine. I just changed `useProxy:true` and now it works perfectly. I cannot tell what has corrected it though b/c I have done a lot of things since when I started working on it (including changing my JSAPI version to 3.11) but what ever has happened, I can see things going through the proxy now without any issues. Maybe that is the `content` parameter which I think was set as jsonp before… Anyways, thanks a lot for the help!
... View more
10-16-2014
10:29 AM
|
0
|
0
|
1126
|
POST
|
Did you use a proxy? Can you please post your code so that I can try it on my side?
... View more
10-15-2014
08:16 PM
|
0
|
2
|
1126
|
POST
|
Thanks for the links, I have seen and read the first one already and the second one seems to be different from the simple thing I want to do and it is working with ArcGIS online. I can get it working without using proxy. Here is the working code I have: somewhere in a function I have:
uploadFile( 'importBillingFile', 'importBillingFileForm' , uploadSucceeded, uploadFailed);
where `'importBillingFile` is the name of the GP service to which file is being uploaded and:
function uploadFile( svcName, form , uploadSucceeded, uploadFailed){
gpUploadURL = "http://"+gisServer+":6080/arcgis/rest/services/"+svcName+"/GPServer/uploads/upload";
console.log('Uploading file...', gpUploadURL);
esri.request({
url: gpUploadURL,
form: dojo.byId(form),
content: { f: "json" },
handleAs : "json",
},{usePost: true, useProxy:false}).then(uploadSucceeded, uploadFailed);
}
function uploadSucceeded(response){
billingFileItemId= response["item"].itemID;
registry.byId('ibfok').set("disabled", false);
console.log('File uploaded successfully, item ID:', billingFileItemId);
}
function uploadFailed(response){
console.log('Upload failed: ', response);
}
and the HTML part:
<form id="importBillingFileForm" style='padding:4px;' method="post" enctype="multipart/form-data" onchange="importBillingFile();">
<input type="file" name="file" id="inFile" size="50" />
</form>
... View more
10-15-2014
02:01 PM
|
0
|
4
|
1126
|
POST
|
Has anyone successfully used the file upload of ArcGIS's REST API using their JS API though a proxy? I have used all the samples and read through esri.request documentation and still cannot get it working. Here is quick look at my file uploader code: function uploadFile( svcName, form , uploadSucceeded, uploadFailed){ gpUploadURL = "http://"+gisServer+":6080/arcgis/rest/services/"+svcName+"/GPServer/uploads/upload"; console.log('Uploading file...', gpUploadURL); esri.request({ url: gpUploadURL, form: dojo.byId(form), //callbackParamName: "callback", //content: { f: "jsonp" }, handleAs : "json", }/*,{usePost: true, useProxy:true}*/).then(uploadSucceeded, uploadFailed); }
... View more
10-14-2014
09:30 AM
|
0
|
7
|
5391
|
POST
|
Kevin Hibma How would this change if I am using proxy. This sample that you have used does not work, even without a proxy. Can you please post a minimally "working" sample? I get error 400 on the following uploader code:
function uploadFile( svcName, form , uploadSucceeded, uploadFailed){
gpUploadURL = "http://"+gisServer+":6080/arcgis/rest/services/"+svcName+"/GPServer/uploads/upload";
console.log('Uploading file...', gpUploadURL);
esri.request({
url: gpUploadURL,
form: dojo.byId(form),
//callbackParamName: "callback",
content: { f: "jsonp" },
handleAs : "json",
}/*,{usePost: true, useProxy:true}*/).then(uploadSucceeded, uploadFailed);
}
... View more
10-14-2014
09:16 AM
|
0
|
0
|
1478
|
Title | Kudos | Posted |
---|---|---|
1 | 11-12-2014 11:06 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|