|
|
@ -1,6 +1,5 @@ |
|
|
|
import { Asset } from "expo-asset"; |
|
|
|
import * as FileSystem from "expo-file-system"; |
|
|
|
import Base64 from "Base64"; |
|
|
|
|
|
|
|
const HTML_FILE_PATH = require(`./Map.html`); |
|
|
|
|
|
|
@ -45,23 +44,19 @@ function handleEvent(event) { |
|
|
|
} |
|
|
|
|
|
|
|
function insertMarker(mapRef, ID, cords, icon) { |
|
|
|
console.log(icon); |
|
|
|
console.log(ID); |
|
|
|
mapRef.injectJavaScript( |
|
|
|
`
|
|
|
|
let customIcon = L.divIcon({ |
|
|
|
html: '` +
|
|
|
|
icon + |
|
|
|
`',
|
|
|
|
iconSize: 10, |
|
|
|
}); |
|
|
|
|
|
|
|
var customIcon = L.divIcon({ |
|
|
|
className: 'marker-class', |
|
|
|
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}, icon: customIcon }); |
|
|
|
|
|
|
|
markers[${ID}] = L.marker([${cords.lat}, ${cords.long}], {icon: customIcon, ID: ${ID}}); |
|
|
|
|
|
|
|
// Add marker to map and bing callback event to its function
|
|
|
|
markers[${ID}].addTo(map).on('click', onPopupClick); |
|
|
|