@ldforge/editor 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/renderers.md +19 -16
- package/package.json +3 -3
package/docs/renderers.md
CHANGED
|
@@ -25,32 +25,35 @@ The tab appears for results declaring `geometry`. Use `# view=geo` to activate i
|
|
|
25
25
|
|
|
26
26
|
### Map display modes
|
|
27
27
|
|
|
28
|
-
The
|
|
28
|
+
The compact button group offers **Normal**, **Grouped**, and **Heatmap** (localized in Dutch). Normal draws each feature. Grouped uses Supercluster to combine nearby points, shows their counts, and expands clusters on click or zoom. Heatmap uses simpleheat to show point density with equal weight per point. MultiPoint members are individual observations. Lines and polygons remain visible in all modes and are not interpreted as point observations. When there are only shapes, the original geometry is shown without loading a mode library.
|
|
29
29
|
|
|
30
|
-
Choose the initial mode with `# view=geo;
|
|
30
|
+
Choose the initial mode with `# view=geo; mode=grouped` or `mode=heatmap`; the host option `mode` supplies the default. `geo-mode` remains supported as an alias; `mode` takes precedence when both are supplied. Invalid mode directives fall back to Normal. Switching modes preserves map position. Supercluster 8.0.1 and simpleheat 0.4.0 are separate pinned external ESM downloads that happen only when that mode is first selected. Configure `clusterLibraryUrl`/`heatLibraryUrl` or inject `loadClusterLibrary`/`loadHeatLibrary` for self-hosting. Failed mode loads can be retried; late completions after another selection or cleanup cannot replace the active view. Supercluster is ISC licensed and simpleheat is BSD-2-Clause licensed.
|
|
31
31
|
|
|
32
|
-
###
|
|
32
|
+
### OpenStreetMap example
|
|
33
33
|
|
|
34
|
-
Endpoint: `https://
|
|
34
|
+
Endpoint: `https://api.triplydb.com/datasets/osm/osm/services/osm/sparql` (GET). This query retrieves features tagged `leisure=track` with their WKT geometry and an optional name, falling back to “Atletiekbaan”. It starts in Heatmap mode and has no sport filter or result limit. The demo's **Map example (athletics tracks)** selects this endpoint and query.
|
|
35
35
|
|
|
36
36
|
```sparql
|
|
37
|
-
# view=geo; geo-title=
|
|
38
|
-
PREFIX
|
|
39
|
-
PREFIX
|
|
40
|
-
PREFIX
|
|
41
|
-
PREFIX
|
|
42
|
-
PREFIX
|
|
37
|
+
# view=geo; mode=heatmap; geo-title=Atletiekbanen in Nederland
|
|
38
|
+
PREFIX geo: <http://www.opengis.net/ont/geosparql#>
|
|
39
|
+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
40
|
+
PREFIX osmt: <https://data.osm.pldn.nl/wiki/Key:>
|
|
41
|
+
PREFIX track: <https://data.osm.pldn.nl/wiki/Tag:leisure=track>
|
|
42
|
+
PREFIX athletics: <https://data.osm.pldn.nl/wiki/Tag:sport=athletics>
|
|
43
|
+
|
|
43
44
|
SELECT ?place ?geometryLabel ?geometry WHERE {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
?place
|
|
45
|
+
?place osmt:leisure track: ;
|
|
46
|
+
geo:hasGeometry/geo:asWKT ?geometry .
|
|
47
|
+
|
|
48
|
+
OPTIONAL {
|
|
49
|
+
?place skos:prefLabel ?name .
|
|
49
50
|
}
|
|
51
|
+
|
|
52
|
+
BIND(COALESCE(?name, "Atletiekbaan") AS ?geometryLabel)
|
|
50
53
|
}
|
|
51
54
|
```
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
The source supplies geometry through `geo:hasGeometry/geo:asWKT`. Other projections must first be converted to WGS84/CRS84.
|
|
54
57
|
|
|
55
58
|
This deterministic query demonstrates all three basic types on any SPARQL 1.1 endpoint:
|
|
56
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldforge/editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "LDForge editor: composable SPARQL tooling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "EUPL-1.2",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@codemirror/lint": "^6.9.8",
|
|
36
36
|
"@codemirror/state": "^6.7.6",
|
|
37
37
|
"@codemirror/view": "^6.43.15",
|
|
38
|
-
"@ldforge/core": "^0.1.
|
|
39
|
-
"@ldforge/prefixes": "^0.1.
|
|
38
|
+
"@ldforge/core": "^0.1.4",
|
|
39
|
+
"@ldforge/prefixes": "^0.1.4",
|
|
40
40
|
"@lezer/common": "^1.5.5",
|
|
41
41
|
"codemirror-lang-sparql": "^2.1.0",
|
|
42
42
|
"sparql-formatter": "^1.0.2"
|