Enable iShare GIS Feedback Plugin

Overview

The Feedback Report plugin for iShare GIS allows a user to provide Feedback in the form or an email using their default email client. The To, CCSubject Body may be auto populated.

The following is a list of the current Plugins available for iShare GIS.

PluginDefinition
Drilldown Allows a user to draw a Polygon on the map and then Drill down to display the details for the configured Layers in the Information Browser.  From the Information Browser the Results may then be exported.  A typical example would be for Local Authority Planners to be able to return information on all planning constraints (often over 15 individual layers) data even without the user needing to remember to have all the layers visible in the map.
Site Report Allows a user to create a Report detailing all of the Active layers enabled for Info Click in the current Map Window extents together with a map. This Report may then be printed, or if using Chrome as your browser saved to PDF.
Predefined Site ReportAllows a user to select an area of interest over which to create a Report on any number of predefined Layers within a single Map Source (Profile) within iShare GIS, without the user needing to remember to have all the layers visible in the map. This Report may then be printed, or if using Chrome as your browser saved to PDF.
FeedbackAllows a user to provide Feedback in the form or an email using their default email client. The To, CCSubject Body may be auto populated.

Setting the scene

You may wish to use the Feedback button to allow users to report on any issues with access to data or even new layers they may like access to. One or more secondary buttons may be configured to allow users to provide different types of feedback to different email recipients.

Steps for enabling the “Feedback” button

Step 1 - Download the Plugin

Download the iShareGIS-Feedback plugin.

Step 2 - Copy Plugin to custom\plugins folder

In order to prevent your custom plugins being lost when you upgrade your version of iShare GIS, they should be kept under the \web\custom\plugins folder

Create a Feedback folder under this folder and add the downloaded Feedback files e.g.

D:\Astun\iShareGIS\n.n\WebApps\Web\custom\plugins\Feedback

Step 3 - Add to list of Plugins

Navigate up one folder level to the \custom\plugins folder. This folder must contain at least one XML file defining however many custom plugins are required. If this is the first plugin you are adding then you will need to create this file, otherwise you just need to add a new entry for the Feedback plugin. The file should contain the following:

CustomPlugins.xml
<PluginView>
  <Plugin>Feedback</Plugin>
</PluginView>

For each custom plugin you would need to add a new <Plugin> entry. 

This <Plugin> entry needs to match exactly the folder name you created in Step 2.

There is a CustomPlugins.xml file provided in the .zip file which you could copy if you wish.

Save your changes.

The plugin buttons are loaded in the order that the plugins are specified in the XML file.

Step 4 - Enable Plugin for a Map Source

In order for iShare GIS to load your custom plugins, you will need to manually add a PluginViews section, pointing to both the default iShareGIS.xml and your CustomPlugins.xml file, to any Map Source where you wish the plugins to be available as shown here.

<MapSource version="200" guid="012345678-9abc-def0-1234-56789abcdef">
  <Layers>
    ...
  </Layers>
  <PluginViews>
    <PluginView>plugins/iShareGIS</PluginView>
	<PluginView>custom/plugins/CustomPlugins</PluginView>
  </PluginViews>
</MapSource>

The PluginView value (custom/plugins/CustomPlugins) is the path the to XML file (without the .xml extension) which will be read in and added to iShare GIS for this Map Source.

Save your changes.

Step 5 - Change Plugin button position - Optional

The default for the Feedback plugin is to display the button on the left hand side of the toolbar. If you wish this to appear on the right you will need to edit the Feedback.xml file and change the Category entry from "advanced" to "standard" e.g.

<Plugin>
	<Name>Feedback</Name>
	<Description>Send email to support</Description>
	<Category>standard</Category>
</Plugin>

Save your changes.

Step 6 - Configure Feedback options

When you click on the Feedback button you may configure one or more secondary buttons for different types of Feedback e.g.

The Feedback plugin comes with two buttons configured as above and in the code below. These are configured in the Feedback.js e.g.

Astun.JS.Plugins.installDialog("feedbackDialog", function() {
	return {
		buttons: [
			{
				name: "",
				text: 'GIS Team',
				click: function() {
					var emailTo = 'gis@somecouncil.gov.uk';
					var emailCC = ' ';
					var emailSub = 'iShareGIS';
					var emailBody = 'Dear Sir/Madam';
					location.href = "mailto:"+emailTo+'?cc='+emailCC+'&subject='+emailSub+'&body='+emailBody;
				}
			},{
				name: "",
				text: 'Dave',
				click: function() {
					var emailTo = 'trigger@somecouncil.gov.uk';
					var emailCC = ' ';
					var emailSub = 'iShareGIS';
					var emailBody = 'Dear Sir';
					location.href = "mailto:"+emailTo+'?cc='+emailCC+'&subject='+emailSub+'&body='+emailBody;
				}
			}
		]
	};
});

 Each secondary button has its own configuration. If you wish to add more buttons simply add a comma and repeat the following entries changing the details for they type of Feedback you wish to configure.

Secondary Button configuration
{
				name: "",
				text: 'GIS Team',
				click: function() {
					var emailTo = 'gis@somecouncil.gov.uk';
					var emailCC = ' ';
					var emailSub = 'iShareGIS';
					var emailBody = 'Dear Sir/Madam';
					location.href = "mailto:"+emailTo+'?cc='+emailCC+'&subject='+emailSub+'&body='+emailBody;
				}
			}

Edit the Feedback.js and change any of the following entries for your secondary Feedback button(s):

VariableDescriptionExample
textThis is the text that will appear on the secondary buttonGIS Team
emailToThe recipient email address. If you wish to specify more than one To email address then add a comma followed by the next email address (no spaces).gis@somecouncil.gov.uk
emailCCThe default CC recipient if required. If you wish to specify more than one CC email address then add a comma followed by the next email address (no spaces). This must contain a space if you don't wish to configure any CC recipient.
emailSubThe default Subject for the email.iShare GIS
emailBodyThe default text for the email Body. If you wish to insert a line break in the email body you should use <br> or even better %0D%0A.Dear Sir/Madam

Save your changes.

Step 7 - Change Plugin button Text & Tooltip - Optional

This step is only required if you wish to change the default text for the Button and Tooltip e.g.

Edit the Feedback.js and scroll to the bottom of the file. If you want to change the Button label or Tool Tip for the button then you will need to change the text and tooltip  / tooltipTitle entries respectively.

installButton
Astun.JS.Plugins.installButton(
	{
		name: 'feedbackButton',
		type: 'quickdialog',
		dialog: Astun.JS.Plugins.dialogs.feedbackDialog,
		hideOnEmptyDialog: false,
		text: 'Feedback',
		tooltip: 'Use these email links to talk to support',
		tooltipTitle: 'Feedback'
	}
);

Save your changes.

Step 8 - Test the Plugin

The Feedback plugin should now be configured. 

You may need to clear the browser cache before the “Feedback” button is displayed.