Integration with Embedded Map
The recommended way to integrate iShare with your Fault logging form is by using an embedded map. This is achieved by using supplied Logger jQuery events to display and communicate with the map.
Astun supply a sample LoggerEmbedded.html which you may copy for your integration. This may be found in the WebApps\Web subfolder under your iShare installation folder e.g. D:\Astun\iShare\n.n\WebApps\Web.
This example displays as follows:
The LoggerEmbedded.html contains a form which holds the fault description from the user and some generated hidden values: layer (fault type), fault location etc. This is generally configured by editing the logger_options variable that is found under the pageLoad javascript function. Edit the logger_options to alter the Map Source and Position [Easting / Northing] & Zoom [scale] of the initial map.
There are various steps that you will need to perform but they will differ depending upon your configuration.
Load the map
This will be a requirement for every integration and is loaded by the Logger pageLoad function.
Configure Layers
- The Logger loadSelect function will automatically load the list of available layers from which a user may select in the "Select Report Type".
- You can also use the logger_setlayer jquery event to set the correct map layer to be displayed. See Logger JQuery Events for details.
Listen for the caseupdated event
You need to listen for the logger_caseupdated jquery event and when that happens the returned information can be used in form. See Logger JQuery Events for details.
Update Data Share
- If you wish you can then update Data Share with the fault information which can then be shown on the map. This would be done using the Locate web service CreateFaultReport method.
- Once the fault has been fixed this can be archived in Data Share using the Locate web service ArchiveFaultReportUniqueId method.
Other Data Request tools
Other useful Data Request tools are the following:
- The LocalInfo Data Request returns Layer information for a given position or UPRN.
- The Getdata Web Service - Address Search returns a list of addresses based upon a search string or UPRN.
- The Lookup SOAP Web Service returns a list of Layer Groups and then a list of Layers in a selected Layer Group by using the GetGroupNames and GetLayers methods respectively.