POST
|
I'm using the Javascript API 3.4 and am really having problems getting addAttachment to work. I'm using the Safari browser on an IPad 5 and have tried several different configurations: 1. Published the feature class to ArcGis online with attachments enabled. When the addAttachment method was called, the error callback was invoked with Code=400 and the messgage "Unable to add attachment to the feature". However when using chrome on a Windows laptop and this exact same web page and script, the attachment was saved fine. 2. Published the feature class to our local ArcGIS Server, and using proxies since the GIS server is not externally visible. When the addAttachment method was called, the error callback was invoked with Coe=500 and the message "Unable to load ./proxy.ashx?http:// ...../FeatureServer/0/4414/addAttachment status:500 ". I'm able to bring up access this directly from the browser (i.e., http://webserver/wwwroot/proxy.ashx?http://...../FeatureServer/0/4414/addAttachment ), so I know the proxy is set up correctly. (Also I've disabled the proxy and accessed the web page from an internal address where the proxy isn't needed and got the same error, except it didn't include the proxy in the error message, so it doesn't look like this is a proxy issue). Does the image get uploaded into a temporary directory where I need privileges? As a separate issue, when I save an image as an attachment using Chrome on Windows and then bring back that attachment in Safari, it is unable to that image. It does continue displaying when retrieved from Chrome. This may or may not be an ArcGIS Javascript API issue, but I thought I'd throw this out in case anyone else has come across it. If anyone is familiar with these issues and can give me some help, I'd really appreciate it. Thanks, Chris Musial cmusial@nhs-stl.com
... View more
05-13-2013
11:26 AM
|
0
|
0
|
2274
|
POST
|
Not sure if this is exactly what you want but try this link: http://blogs.esri.com/esri/arcgis/2010/09/01/building-web-applications-for-ios-and-android-using-dojox-mobile/ When you scroll down it describes ways to make the camera accessible to your device. I am hoping to do something similar for an iPad so let us know how it goes. Thanks for the reply. Making the camera accessible to the device isn't the problem for me - my issue is that I grab the images from the camera and store them as an object in memory, but the addAttachment method seems to require them to be in a file which the user then has to browse for and select. The example you provided follows this same approach: the user needs to browse for the pictures and then select them. My application allows the user to snap pictures and places them in a gallery of thumbnails on the web page. The user can remove images from that gallery or continue snapping pictures to add to the gallery. Once done, they can click 'Save', and this should upload all the images in the gallery as attachments to the current feature. It wouldn't make sense to require the user to the go and individually browse for and select image files for each image in the gallery.
... View more
04-04-2013
05:01 AM
|
0
|
0
|
192
|
POST
|
I'd like to use a mobile device's camera to capture an image and then upload that image as a feature attachment. No problem getting the image from the camera. I create an <img> tag, and set the src to be a data URI, and show it on the web page in a gallery. Once satisfied, I'd like to upload each image as an attachment to the selected feature. They're obviously not stored on disk, so how can I upload the images when the API requires that the attachment be specified using a file upload field in a form? Appreciate any insight!
... View more
04-03-2013
01:27 PM
|
0
|
3
|
449
|
POST
|
I've been getting this error using the Javascript API when trying to update a feature - I was able to add one fine but could not update it. Finally found the reason (in my case anyway), so I thought I'd pass it on. The OBJECTID attribute needs to be a number. I was doing an identify, grabbing the feature that was returned, changing one of the attributes, and using FeatureLayer.applyEdits: featLayer.applyEdits (null, [feature], null); However if I converted the OBJECTID to a number first it worked fine: feature.attributes['OBJECTID'] = Number(feature.attributes['OBJECTID']); featLayer.applyEdits (null, [feature], null); Hope this helps someone out there. Chris
... View more
03-19-2013
12:26 PM
|
0
|
0
|
981
|
POST
|
None of the ArcGIS Online geocoders seem to allow an option for specifying a side or end offset. A field is returned indicating whether the address was on the left or right side of the street, but not knowing the segment orientation, this information isn't particularly helpful. I can build my own local address locator and specify this, but I would really like to use the online geocoder since it is much more accurate. Three questions: 1. Are there any plans to add the side and end offset options to the ArcGIS online geocoders? 2. Are there any other publically available locators accessible from ArcGIS desktop that allow this (Bing?) 3. Is there a way of making use of the 'Side' attribute returned from the geocoder that I'm missing? Thanks, Chris Musial
... View more
11-06-2012
12:03 PM
|
0
|
1
|
445
|
POST
|
I've created an ArcMap 10 toolbar in C#. The tool is operating on a geometric network and an edit session is open. In some of the tools, it needs to create some new objects and also perform spatial queries that may return those new objects (among others). The problem is that when the Search on the Feature Class is performed, it does not return those new features that were created in the same tool invocation (By tool invocation, I mean the code that's executed when the user clicks on a custom toolbar button in ArcMap). When control returns from the tool, if I perform that same search (by clicking on the same or a different toolbar button), then the new features are found. It only seems to have a problem when the new feature is created (and .Store 'd) and the search is performed in the same tool invocation. I've tried putting the create and store of the feature in 1 edit operation and the search in a different one, but that doesn't seem to help. It seems that there must be some cleanup or updating of indices done behind the scenes when the tool completes that I'm not aware of. I've also tried emptying the spatial cache, but that doesn't work. Can anyone point me to what I should be doing so that spatial searches can find the new features? Thanks, Chris Musial
... View more
03-19-2012
05:25 AM
|
0
|
0
|
337
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|