Skip to content

Build your personal knowledge base with Trilium Notes

fix(geomap): help for the image map attributes

Elian Doran8463810887b3
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index 60316588a0..0d5d12d9ee 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -789,10 +789,13 @@
"recurrence": "A CalDAV <code>RRULE</code> string making the event repeat. The start is taken from <code>#startDate</code> and <code>#startTime</code>, so the rule leaves <code>DTSTART</code> out.",
"geolocation": "The latitude and longitude the note is placed at on a geo map.",
"geo_shape": "A shape the note is drawn as on a geo map: the kind of shape, then the latitude and longitude of each point, e.g. <code>line:48.85,2.29 48.86,2.35</code> — or a circle as its center and reach in meters, <code>circle:48.85,2.29 500</code>.",
+ "map_position": "The position of the note on an image map, as <code>x,y</code> in the map's coordinates: the pixels of the image, unless <code>map:imageBounds</code> names others.",
+ "map_shape": "A shape the note is drawn as on an image map, in the same format as <code>geoShape</code> but with <code>x,y</code> points, e.g. <code>circle:400,300 50</code>.",
+ "map_image_bounds": "The coordinates of an image map's top-left and bottom-right corners, as <code>x,y x,y</code>, e.g. <code>-512,-512 512,512</code>. Positions on the map are read and written in these coordinates instead of the image's pixels.",
"map_type": "Which note map is drawn: <code>link</code> for the relations between notes, or <code>tree</code> for the hierarchy.",
"map_style": "Which style a geo map is drawn in, chosen from the raster and vector styles offered in the collection properties.",
"map_dark_style": "Tells a geo map that the custom style given in <code>map:style</code> is a dark one, so that the marker titles are drawn light over it. The styles offered in the collection properties say so for themselves and need no such label.",
- "map_scale": "Shows a scale bar on the geo map.",
+ "map_scale": "Shows a scale bar on the geo map, or coordinate rulers along the edges of an image map.",
"map_hide_labels": "Hides the note titles beside the markers on a geo map.",
"map_cluster": "Gathers markers that are drawn close together into a single numbered bubble, which opens when clicked.",
"presentation_theme": "Which theme a presentation is shown with.",
@@ -804,6 +807,7 @@
"internal_link": "A link from this note to another, kept up to date by Trilium so that backlinks and the note map can be drawn.",
"image_link": "An image embedded in this note, kept up to date by Trilium.",
"relation_map_link": "A note placed on this relation map, kept up to date by Trilium.",
+ "map_image": "An image note to draw the geo map over instead of a world map. Markers and shapes are then placed with <code>mapPosition</code> and <code>mapShape</code>.",
"include_note_link": "A note included into this one's content, kept up to date by Trilium.",
"date_template": "Set on a calendar root: the note it points at is applied as <code>~template</code> to each day note generated under it.",
"week_template": "Set on a calendar root: the note it points at is applied as <code>~template</code> to each week note generated under it.",
diff --git a/apps/client/src/widgets/attribute_widgets/attr_help.ts b/apps/client/src/widgets/attribute_widgets/attr_help.ts
index f316b28df3..84dd8f7438 100644
--- a/apps/client/src/widgets/attribute_widgets/attr_help.ts
+++ b/apps/client/src/widgets/attribute_widgets/attr_help.ts
@@ -177,6 +177,9 @@ export const ATTR_HELP: AttrHelpMap = {
recurrence: t("attribute_detail.recurrence"),
geolocation: t("attribute_detail.geolocation"),
geoShape: t("attribute_detail.geo_shape"),
+ mapPosition: t("attribute_detail.map_position"),
+ mapShape: t("attribute_detail.map_shape"),
+ "map:imageBounds": t("attribute_detail.map_image_bounds"),
mapType: t("attribute_detail.map_type"),
"map:style": t("attribute_detail.map_style"),
"map:darkStyle": t("attribute_detail.map_dark_style"),
@@ -216,6 +219,7 @@ export const ATTR_HELP: AttrHelpMap = {
internalLink: t("attribute_detail.internal_link"),
imageLink: t("attribute_detail.image_link"),
relationMapLink: t("attribute_detail.relation_map_link"),
+ "map:image": t("attribute_detail.map_image"),
includeNoteLink: t("attribute_detail.include_note_link"),
dateTemplate: t("attribute_detail.date_template"),
weekTemplate: t("attribute_detail.week_template"),