Skip to content

Build your personal knowledge base with Trilium Notes

feat(geomap): set custom icon for notes created from within the map

Elian Doran259dcdb56891
diff --git a/src/public/app/widgets/type_widgets/geo_map.ts b/src/public/app/widgets/type_widgets/geo_map.ts
index 9e13f59255..9cdad23a7c 100644
--- a/src/public/app/widgets/type_widgets/geo_map.ts
+++ b/src/public/app/widgets/type_widgets/geo_map.ts
@@ -70,6 +70,7 @@ const TPL = `\
</div>`;
const LOCATION_ATTRIBUTE = "latLng";
+const CHILD_NOTE_ICON = "bx bx-pin";
interface MapData {
view?: {
@@ -252,6 +253,7 @@ export default class GeoMapTypeWidget extends TypeWidget {
content: "",
type: "text"
});
+ attributes.setLabel(note.noteId, "iconClass", CHILD_NOTE_ICON);
toastService.showMessage(t("relation_map.click_on_canvas_to_place_new_note"));