Select to view content in your preferred language

Attachements in a Map Service with Identify?

1137
2
07-28-2011 01:00 AM
AxelSchaefer
Emerging Contributor
Hi.

I want to view the attachments of my feature in the JS-API. But I see a gap between the provided samples and the functionality I want to have.

My JS-API application shows several map-services, one of them has an attachment. I have implemented an Identify on all visible map-services, showing the results in a table (not with popups because I needed to have a robust, conservative interface).

The identify doesn't show attachments, even not the info if a feature has an attachment.

The samples in the JS-API use the attachment functionality only in editing scenarios, with the Attachment Editor widget (and there inserting/deleting attachments is solved really trivial. I played around with that and didn't find a way to make it read-only, except hacking the css). Also, you need a feature-service, which I can't do and can't provide.

So, based on my map-services: Which way should I go to view attachments? Is there a path in the JS-API to get to my feature with attachments?

One possible way for discussion:


But it's a lot of implementation to do and you have to dig deep in the identify functionality until any response is shown in the interface. Also you have to access the REST-URLs by hand.

Do you know any better solutions? Any implementations how you did that? Did you ever used an additional feature-service that you asked for that?

I appreciate any help and discussion on that topic (and don't bother about my implementation with the tables, because it's also missing for the standard identify widgets). For me it's a missing link to the standard identify in an ArcMap session (where the attachments are listed simply in the identify). Providing the access only with feature-layers and in an editing-workflow is a bit to short, I guess. So: Any idea to get to a workflow for that would be really helpful for all, I hope. 🙂

Thanks and best regards,
Axel
0 Kudos
2 Replies
JackZHANG
Frequent Contributor
Hi Axel,

I found your thread after search the answers for a similar question like yours. Don't know if you have read the REST API about the attachment as the link below, though not sure if that helps.
http://atlas.resources.ca.gov/arcgis/SDK/REST/index.html?msattachment.html

Though the given example in the above link work successfully. I tried making my own one but for it didn't work. The feature class that has attachment (a photo) is in a File Geodatabase. When click on the link of the attachment in the REST page http://xxx/ArcGIS/rest/services/Testing/JZ_map/MapServer/0/1225/attachments/1, I got the the following error message

Error
Server Error - The remote server returned an error: (404) Not Found.

Code: 500


Wondering why? Does the Feature class having attachment needs to be in ArcSDE? Or it's because there's something need to be configured in IIS? Can anyone please provide some suggestion? Thanks.
0 Kudos
AurelijusDeksnys
Emerging Contributor
Yes  attachment needs to be in ArcSDE
0 Kudos