Local Knowledge Types- Nearest N

The NearestN local knowledge query will find the N amount of features closest to 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 attribute:

Add this attribute to the layers you want to query for nearestN and click OK.

Add property to set number of features

An additional overlay property can be added to set the number of features to be displayed.

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

NearestN worked example: Which are my 5 nearest NHS centers?

In this example, a Local Knowledge template is used to display the nearest 5 NHS facilities and the distance to these centers from the clicked location on the map. Enter the title text, headers and select the relevant schema column from the database to display results that are comprehensive and precise.