From f41e71299b1a49b65baa23651b22b4352ca4e047 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Tue, 11 Apr 2023 18:13:58 +0100 Subject: [PATCH] Add a geomap layer demo --- plugins/tiddlywiki/geospatial/docs/geomap.tid | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/plugins/tiddlywiki/geospatial/docs/geomap.tid b/plugins/tiddlywiki/geospatial/docs/geomap.tid index dedf10d91..fd0c5ea42 100644 --- a/plugins/tiddlywiki/geospatial/docs/geomap.tid +++ b/plugins/tiddlywiki/geospatial/docs/geomap.tid @@ -33,7 +33,7 @@ The following attributes are supported: <$testcase> <$data title="Description" - text="Map with geomarkers" + text="Map with geomarker" /> <$data title="Oxford" @@ -50,3 +50,45 @@ The following attributes are supported: """/> <$data $tiddler="$:/plugins/tiddlywiki/geospatial"/> + +<$testcase> +<$data + title="Description" + text="Map with geolayer" +/> +<$data + title="Layer" + tags="$:/tags/GeoLayer" + type="application/json" + color="red" + text="""{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": "An example geolayer feature", + "properties": { + "custom": "A custom property of this feature" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [-90,35], + [-90,30], + [-85,30], + [-85,35], + [-90,35] + ] + ] + } + } + ] +}"""/> +<$data title="Output" text="""<$geomap + state=<> + layers="[all[tiddlers+shadows]tag[$:/tags/GeoLayer]]" +/> +"""/> +<$data $tiddler="$:/plugins/tiddlywiki/geospatial"/> +