diff --git a/src/app/components/map/LeafLetMap.js b/src/app/components/map/LeafLetMap.js
index 699463a..a025cdf 100644
--- a/src/app/components/map/LeafLetMap.js
+++ b/src/app/components/map/LeafLetMap.js
@@ -1,5 +1,6 @@
import { Asset } from "expo-asset";
import * as FileSystem from "expo-file-system";
+import Base64 from "Base64";
const HTML_FILE_PATH = require(`./Map.html`);
@@ -43,20 +44,30 @@ function handleEvent(event) {
return code_to_function[payload.code](payload);
}
-function insertMarker(mapRef, ID, cords) {
- mapRef.injectJavaScript(`
+function insertMarker(mapRef, ID, cords, icon) {
+ console.log(icon);
+ mapRef.injectJavaScript(
+ `
+ let customIcon = L.divIcon({
+ html: '` +
+ icon +
+ `',
+ iconSize: 10,
+ });
+
+
// Check if there is no other marker with same ID already in map
if (!(${ID} in markers)) {
// Creates marker object
- markers[${ID}] = L.marker([${cords.lat}, ${cords.long}],
- {ID: ${ID}});
+ markers[${ID}] = L.marker([${cords.lat}, ${cords.long}], {ID: ${ID}, icon: customIcon });
// Add marker to map and bing callback event to its function
markers[${ID}].addTo(map).on('click', onPopupClick);
}
- `);
+ `
+ );
}
export { loadHTMLFile, handleEvent, insertMarker, goToRegion };
diff --git a/src/app/components/map/Map.html b/src/app/components/map/Map.html
index 7f375b7..ef17f18 100644
--- a/src/app/components/map/Map.html
+++ b/src/app/components/map/Map.html
@@ -5,11 +5,11 @@
-
+
+
+
+
+