diff --git a/examples/README.md b/examples/README.md index 223d3d0..6d606f0 100644 --- a/examples/README.md +++ b/examples/README.md @@ -183,6 +183,19 @@ Any messages containing "delete" will be removed by the client. +
+Send a location to a room + +[View JSON](send-location-to-room.json) + +Sends an `m.location` event (a map pin) for the country of Norway to the configured room. Element and other matrix-react-sdk clients render it as a pin on the map with the label *"Norway"*; clients without map rendering see an auto-generated text fallback. + +Update the `Send Location` node's Room ID to your own room before deploying. The inject node is configured to fire a bare message (no payload, no topic), so the Send Location node falls back to its configured values for everything: asset type `m.pin`, description `Norway`, and geo URI `geo:60.4720,8.4689`. + +![send-location-to-room.png](send-location-to-room.png) + +
+ ### Event Handling
diff --git a/examples/send-location-to-room.json b/examples/send-location-to-room.json new file mode 100644 index 0000000..e0472be --- /dev/null +++ b/examples/send-location-to-room.json @@ -0,0 +1,69 @@ +[ + { + "id": "222bb5ef43d621b4", + "type": "group", + "z": "f025a8b9fbd1b054", + "name": "Send location to room", + "style": { + "label": true + }, + "nodes": [ + "ee742dfa934b4892", + "1ef540382789ff9d" + ], + "x": 354, + "y": 5279, + "w": 392, + "h": 82 + }, + { + "id": "ee742dfa934b4892", + "type": "matrix-send-location", + "z": "f025a8b9fbd1b054", + "g": "222bb5ef43d621b4", + "name": "", + "server": "", + "roomId": "!example:test.org", + "latitudeType": "msg", + "latitudeValue": "latitude", + "longitudeType": "msg", + "longitudeValue": "longitude", + "altitudeType": "msg", + "altitudeValue": "altitude", + "geoUriType": "str", + "geoUriValue": "geo:60.4720,8.4689", + "descriptionType": "str", + "descriptionValue": "Norway", + "assetTypeType": "str", + "assetTypeValue": "m.pin", + "timestampType": "msg", + "timestampValue": "timestamp", + "textType": "msg", + "textValue": "payload", + "x": 640, + "y": 5320, + "wires": [ + [], + [] + ] + }, + { + "id": "1ef540382789ff9d", + "type": "inject", + "z": "f025a8b9fbd1b054", + "g": "222bb5ef43d621b4", + "name": "", + "props": [], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "x": 460, + "y": 5320, + "wires": [ + [ + "ee742dfa934b4892" + ] + ] + } +] \ No newline at end of file diff --git a/examples/send-location-to-room.png b/examples/send-location-to-room.png new file mode 100644 index 0000000..613cd03 Binary files /dev/null and b/examples/send-location-to-room.png differ