Linking and Downloading Files from Locations on the Map Widget

<< Click to Display Table of Contents >>

 >Enterprise > Widgets > Map >

Linking and Downloading Files from Locations on the Map Widget

Files can be linked to download from locations on the Map widget using the custom info template. Supported file types include GIF, JPG, SHP, TXT, and XLSX. The steps to create links to download files are outlined below:

1.Determine the path of the desired Enterprise site. For example: http://localhost/equis7.

2.Determine the FILE_ID of the desired file from either the DT_FILE table or the Explorer widget (see the article Using DT_FILE Images in the HTML Widget for obtaining the File ID).

3.Append the FILE_ID to the file path (i.e., [site]/api/download/file/[FILE_ID]) or directly use the URL from Step 2. For example: http://localhost/equis7/api/download/file/12024.

4.Add the file path to DT_LOCATION.CUSTOM_FIELD_1 (or any other custom field) for the SYS_LOC_CODE (i.e., location) from which the file will be downloaded.

5.Navigate to the desired dashboard and Map widget.

6.Open the Widget Editor by selecting the More Options Ent-More_Options-Icon icon in the upper right corner of the widget to display the drop-down menu and then select the Edit menu option.

7.On the General tab, check the Custom Info Template box. A list of available fields shows on the right-hand side, including the custom field used in the DT_LOCATION table (Step 4).

8.Depending on the desired file type, add the appropriate script to the custom info popup template to link the file for downloading. Ensure that the field name used in the custom info template matches the available field name displayed in the right-hand side column and the field name used in the DT_LOCATION table.

For a GIF file: <a href = {customField1}>.GIF FILE</a>

For a JPG file: <img src = {customField1}>

For a SHP file: <a href = {customField1}>.SHP FILE</a>

For a TXT file: <a href = {customField1}>TEXT FILE</a>

For a XLSX file: <a href = {customField1}> .XLSX FILE</a>

Ent-Map_Widget_Locations_Custom_Info_Template

9.Refresh the widget to see the changes.

 

 

Note: The format of the field names displayed in the custom info template within the Map Widget Editor has changed from Enterprise v6.6 to Enterprise 7. For example, the field name was "custom_field_1" in Enterprise v6.6 and is "customField1" in Enterprise 7.

 

As result of the change in the format of the field name and the URL format used to link files in Enterprise 7, any links created in earlier versions of Enterprise will need to be re-created.