VQL Documentation - URL Parameters

This documentation describes the URL parameters that can be used to configure the VQL application.

Configuration Parameters

The application can be configured using the p or s URL parameters.

Parameter Description Example
p Use for special modes or connecting to a port on localhost.
  • A port number (e.g., 3000).
  • web: Activates web channel mode.
  • map: Activates map service mode.
?p=3000
s Use to provide a full URL to a VQL server endpoint. ?s=https://my-vql-server.com/VQL

Note

If no configuration parameter is provided, the application defaults to http://localhost:3000 (default VQL Dev Server).

Web Channel Mode (p=web)

Web channel mode enables communication between the VQL client and a VQL server running in a different browser tab. This is primarily used for development to connect the UI to a local test server without cross-origin (CORS) issues.

To use this mode, you must have the server environment running on the server.html page in a separate tab.

Map Service Mode (p=map)

Map mode is a special mode for developers. It allows you to connect to any standard VQL instance without running the local development server, and manually define a list of adapters that the instance should use. This is useful for testing or connecting to remote VQL endpoints with a custom adapter configuration.

When using p=map, the following additional parameters are available:

Parameter Description Example
ml Comma-separated list of map layer names. If not provided, the user will be prompted to enter them. ?ml=layer1,layer2
mp Map port or full URL for the map service's VQL endpoint. This is a required parameter when in map mode. If not provided, the user will be prompted. ?mp=8080
mb A JSON string representing a body object to be sent with every VQL request. This can be used for things like authentication tokens or other server-required parameters. ?mb={"token":"your-auth-token"}

Usage Examples

Connect to local server on port 3000

$host/?p=3000

Connect to a remote server

$host/?s=https://my-vql-server.com

Use Web Channel Mode

$host/server.html

$host/?p=web

Use Map Service Mode

$host/?p=map&ml=buildings,roads&mp=8080&mb={"token":"abc"}