Local Knowledge Types- Distance

The Distance local knowledge query will find and list every feature within a specified distance of the WebMap user’s location.

Adding a property

In your Local Knowledge SWD, right click on the overlay you wish to add the property to and select Properties:

Then select Properties again in the Overlays dialog:

And finally select Add… to add a new property:

Add this property to the layers you want to query for distance.

Now add the distance to search (e.g. 20 km).

Select the Properties button again and click Add.

Add property to set distance

An additional overlay property can be added to set distance in meters in which features will be displayed.

  • Follow the steps as above to add a new attribute.
  • In the New Attribute dialog, type WML::Knowledge_SearchDistance# into the Name field.
  • Type the number (e.g. 2000) into the Value field.
  • Click OK.

Click OK.

Select the Map Tip tick box for each data column you wish to use.

Distance worked example: How many higher education establishments are within 20km of my location?

  • Open the Local Knowledge SWD. (A sample Local Knowledge SWD is included with standard installations of WebMap 9.1. [C:\inetpub\wwwroot\SISWebMap9.1\SWD\ Local Knowledge 9-1 UK.swd])

  • Add the property and values as above to the layers you want to query for distance. Related Topics Link IconRelated Topics

  • Enable the MapTip option for any of the attributes that you want to see within the results.

Filtering the Results

You can filter all returned results by the Local Knowledge distance query using the property WML::Knowledge_Filter$.

Template

1. Full Example:

<div class="FMNContainer"> <b>{Attributes[Institute]}</b> is in {Attributes[District]}.</div>

2. Summary Example

<div class="FMNSummaryContainer"><i><b>
<div class="FMNOverlayName"><img src="img/MapPins/MapPinGenericPurple.png" height="18" width="18">
These are the Higher Education establishments within 20km:</div></b></i>
<div class="FMNItemContainer"><repeater {Items} ><div class="FMNItem">
<a href="javascript:zoomToFMNItem({OverlayNo}, '{escape(Name)}')" >
{Attributes[Institute]}</a></div></repeater></div><p></div>