Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

Database queries allow you to query a table, view or stored procedure in the database selected.  To get started click New Database Query in the top left.

In this section:

Need Help?

Email LocalMaps Support to ask a question or request assistance.

Create a Database Query

Query a Table\View

  1. To define the table to query against, fill in the details below. 
  • Datasource: The database that contains the table you want to query.
  • Query Types: Select whether you would like to perform the query on a table or use a stored procedure.
  • Table\View\Stored Procedure:The table, view or stored procedure to use.
  • Optional
    • Include a Group by clause e.g if the database table already has an aggregation field you may wish to use this count in your feature query clause. 
    • Include an Order by clause e.g this will define the queries are ordered in the popup i.e for resource consents on a property, you may wish to see the most recent consents first. By using the date field in your order by clause, you can achieve this.

Example of a MySQL Table feature query.

Click to enlarge image


2. Select the fields you wish to include in the Feature Query. Note that the Alias can be altered here for Database Queries. 

  • Query name:The title that will appear in the Popup
  • Select: This box will be populated as you create your query from the table fields.
  • Fields:The fields you wish to display in the popup

3. Reorder how the fields are presented in the popup by clicking the dotted icon and dragging the field to a new position

Click to enlarge image


4. Review your clause and save the new Feature query. This will then be added to the main table. If you wish to change your configuration set up at any stage in the wizard, simply click on the dot symbol above each step to go back (as per the below image).

Click to enlarge image

Query a Stored Procedure

  1. To use a stored procedure in a feature queries, select it as the query type and select your stored procedure from the drop down.

Click to enlarge image


2. In the next step, set the name that will appear in the popup for your feature query. By default, this is populated with the Stored Procedure title, this can be changed by typing in a new name. 

3. Save to create your new feature query. This will then be added to the main table.

Click to enlarge image

Assign a feature query to a map

Once created, feature queries must be assigned to a layer. This will allow the information to be displayed in the layers popup. To see how to add a feature feature to a layer in your map, head toselectfeaturequeriesConfigure Widgets

There are no related labels.


  • No labels