Chart in Map Tip
I have a layer with map tips enabled. When 'View Additional Info' is clicked in the map tip, a simple bar chart that I configured is displayed. Is it possible to include the chart in the map tip instead of in the 'View Additional Info' panel?
0
-
Hi Lisa,
I know this is an older post, but the question came up again today during a training course, and I'd like to provide a complete answer that everyone can access.
This isn't an out of the box option for the HTML5 viewer. We do have a feature request (GVH-4539) filed for tracking it. If you're interested, posting it as an idea (https://support.geocortex.com/GSCIdeas?c=09a6000000008RsAAI&filter=1&categ=all&sub-nav=ideas&main-nav=essentials&page=1) would help other users to vote for it as well and might increase its visibility.
There is a workaround that might work, depending on your charts- create a png report that displays the chart, and then include the chart in the feature description for the map tip:- Create report in Report Designer.
- Right click the header/footer and remove them.
- Drag a Picture control onto the report
- For the picture's properties, set the DataField to the ID of the chart you have configured, and the SizeMode to Stretch
- In File > Report Settings > Page Setup, change all the margins to 0. Then click the Printer Settings tab. Change Paper Size to Custom paper, and enter 1.5 for both the width and height. You can try different sizes if you like, but this seems like a good approximate size for a map tip.
- Save the report. In Essentials Manager add the report to the layer that has the chart
- In the settings for the report in Essentials Manager, change the Output Formats to PNG only
- In Essentials Manager, navigate back to edit the layer details
- In Feature Description or Feature Long Description (whichever one your viewer uses for Map Tips), include the image tag, which will run the report and generate the image. Here's my example using the LA County demo site:
<img src="http://[servername]/Geocortex/Essentials/REST/sites/LA_County/map/mapservices/Dynamic/layers/15/reports/0/run?outputFormat=Png&where=OBJECTID+%3D+{OBJECTID}&f=file">http://[servername]/Geocortex/Essentials/REST/sites/LA_County/map/mapservices/Dynamic/layers/15/reports/0 is the path to the report's REST endpoint, which you should replace with your own url. If you are navigating your site REST endpoint, you can find it from: Map > Layer (that has the chart) > Reports (from the very bottom of the page). If you have a different capitalization for the layer's objectid (eg, Objectid instead of OBJECTID) you will want to correct that in the image tag as well.
_img_ alt="Map Tip chart" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000GsAK&feoid=Body&refid=0EM60000000UkIU" _/_img_
Hope that helps!
Amanda0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar