4

This bit of information caught my eye today as I was reading about Feature Services in the ArcGIS Server .NET help:

Feature services also support HTML pop-ups setup in ArcMap. HTML pop-ups are a powerful and easy way to share HTML formatted information about features. They work much like the Identify tool, except that the information display can be customized HTML.

I set up the HTML popup in ArcMap and it worked as expected, and then I published a map service. The REST endpoint of my service now shows esriServerHTMLPopupTypeAsURL as the HTML Popup Type, however, I can't seem to find a sample, etc. that shows how to display the popup in a web application.

Does anyone have a link to a sample, or some sample code, that can show me how to do this? I have looked through the JavaScript API samples/reference and didn't find what I was looking for (or what I thought I should be looking for).

Thanks, Tim

Edit: Thanks to those who supplied answers for the links. I think I need to re-phrase the question: I'm not having problems getting the popup to display - that is working fine. My HTML popup type is set as PopupTypeAsURL, so I was expecting the popup to display the contents of the URL, say http://whateversite.com. Essentially I want the popup to display a web page or web form. Is this possible?

nmtoken
13.6k5 gold badges39 silver badges91 bronze badges
asked Apr 6, 2011 at 22:05

3 Answers 3

3

FeatureServers expose an htmlPopup resource for each feature. Displaying the popup using Javascript would be very easy. Simply send a get request with a format parameter of "json." The "content" key in the returned object contains the full HTML markup for the popup window.

The see an HTML popup example, go to http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/1/1/htmlPopUp

To see the JSON version of the same popup resource, go to http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/FeatureServer/1/1/htmlPopUp?f=json

You might also consider the InfoWindow dijit in the Javascript framework API. This window gives you a configurable way to display attribute information for features loaded from a FeatureService and it works with the IdentifyTask which is a plus. Be aware, however, that the IdentifyWindow does not look at the htmlPopup that you have configured for a feature class.

answered Apr 7, 2011 at 11:46
1
answered Apr 7, 2011 at 9:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.