I have a problem that I don't know if it's related to uibuilder or not, but since I tried elsewhere and that problem didn't exist, I decided to ask here.
I have designed a ui using uibuilder that loads all logos and icons easily. I have used a map with openlayers.
const iconFeature = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([51.338743, 35.699819])),
name: 'Azadi',
});
const map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.OSM(),
}),
new ol.layer.Vector({
source: new ol.source.Vector({
features: [iconFeature]
}),
style: new ol.style.Style({
image: new ol.style.Icon({
anchor: [0.5, 2],
anchorXUnits: 'fraction',
anchorYUnits: 'pixels',
src: '../images/layout_img/map_icon.png'
// src: "https://openlayers.org/en/latest/examples/data/icon.png"
})
})
})
],
view: new ol.View({
center: ol.proj.fromLonLat([51.338743, 35.699819]),
zoom: 12
})
});
However, when I try to change its marker icon, it cannot read the icon and gives the following error.
can not GET http://127.0.0.1:1880/images/layout_img/map_icon.png
I changed URI to /platform/src/images/layout_img/map_icon.png
and again not worked. Can not GET http://127.0.0.1:1880/platform/src/images/layout_img/map_icon.png
I searched a lot about it and couldn't find anything, also to make sure I wrote a small test server to make sure the problem wasn't my code (which it wasn't), so I guessed that the problem was with my referencing type in the URI or from the node-red side.