Plugin options

May 20, 2026 ยท View on GitHub

Pass options to the geo plugin via Yasgui's standard plugin-config slot:

const yasgui = new Yasgui(document.getElementById('yasgui'), {
  yasr: {
    pluginOrder: ['table', 'response', 'geo'],
    defaultPlugin: 'geo',
    plugins: {
      geo: {
        defaultColor: '#ff5722',
        defaultBasemap: 'CartoDB Voyager',
        initialView: { center: [48.8566, 2.3522], zoom: 11 },
        maxZoom: 18,
        minHeight: 600,
        latLonAutoDetect: true,
        // Replace the bundled basemaps entirely:
        basemaps: {
          'My tiles': L.tileLayer('https://my.tiles/{z}/{x}/{y}.png'),
        },
      },
    },
  },
});

Available options

OptionTypeDefaultDescription
defaultColorstring (CSS color)#3388ffColor used for features without a ?wktColor binding.
defaultBasemapstring'openStreetMap'Name of the basemap to activate at startup. Must be a key of basemaps.
initialView{ center: [lat, lon], zoom: number }Belgium @ 5Map center and zoom when no features are present.
maxZoomnumber14Upper bound applied when auto-fitting bounds to features.
minHeightnumber (px)500Minimum height of the map container.
latLonAutoDetectbooleantrueAuto-detect numeric lat/lon column pairs and synthesize a WKT POINT column.
basemaps{ [name]: L.TileLayer }built-inReplace the bundled basemap dictionary.
styleControlbooleantrueShow the compact style control for default color, opacity, fill, stroke width and marker radius.
styleStorageKeystring | nullquery hashOverride the localStorage key used to persist style-control values.
simplifyTolerancenumber0Initial turf-simplify tolerance in degrees.
simplifyControlbooleantrueShow a live simplification tolerance slider.
simplifyMaxTolerancenumber0.05Maximum tolerance exposed by the slider.
simplifyStepnumber0.0001Slider step size.
timeSliderbooleantrueShow a temporal slider when result rows contain time/date-like bindings.
timeBindingNamesstring[] | nullcommon namesOverride temporal binding names (time, date, datetime, timestamp, start, startDate).
timeMode'cumulative' | 'instant''cumulative'Show all features up to the selected time, or only features at the exact selected time.
permalinkbooleanfalsePersist center, zoom, basemap and visible geometry columns in the URL hash.

Styling

The style control persists default visual settings in localStorage, keyed by the current endpoint/query when YASQE is available. A per-row ?wktColor binding still overrides the selected default color for that feature.

Simplification

The simplification slider adjusts turf-simplify tolerance for line and polygon features. Points are never simplified. A value of 0 disables simplification.

Time Slider

When result rows contain a ?time, ?date, ?datetime, ?timestamp, ?start, or ?startDate binding, the plugin displays a time slider. The default cumulative mode shows all dated features up to the selected value; undated features remain visible.

Convention-based per-feature controls

Bindings the plugin recognizes when present in result rows:

BindingEffect
?wktColorOverride fill/stroke color for that feature.
?wktLabelPlain-text popup content (replaces the default key/value table).
?wktTooltipHover tooltip text.

Supported geometry literal datatypes

DatatypeParsed as
http://www.opengis.net/ont/geosparql#wktLiteralWKT / CRS-prefixed WKT
http://www.openlinksw.com/schemas/virtrdf#GeometryWKT
http://www.w3.org/2003/01/geo/wgs84_pos#geometryWKT (common DBpedia style)
http://www.opengis.net/ont/geosparql#geoJSONLiteralGeoJSON geometry
http://www.opengis.net/ont/geosparql#gmlLiteralGML geometry
http://www.opengis.net/ont/geosparql#geoHashLiteralGeoHash center point