I’m using the IconFile property of MapMarker.
I’ve downloaded a bunch of png
images and stored them in Assets/pins/
My code is as follows :
<Page ux:Name="map" Background="#332A6C">
<NativeViewHost>
<MapView Latitude="48.8639796552" Longitude="2.33559960389" Zoom="12">
<Each Items="{markers}">
<MapMarker Latitude="{lat}" Longitude="{lng}" Label="{title}" IconFile="{icon}"/>
</Each>
</MapView>
where icon
is the path (string) toward a pin icon. I got the following error :
Uno.IO.IOException: Couldn't open file: Assets/pins/pin-b-0.png
at Uno.IO.FileSystemImpl.CppXliOpenRead(string)
at Uno.IO.File.OpenRead(string)
at Fuse.Scripting.JSFileSource.OpenRead()
at Uno.UX.FileSource.ReadAllBytes()
at Fuse.Maps.MarkerSource.get_Path()
at Fuse.Maps.MarkerIconCache.Get(Uno.UX.FileSource)
at Fuse.Maps.iOS.MapView.UpdateMarkers()
at Fuse.Controls.MapView.UpdateMarkers()
at Fuse.Controls.MapView.DeferredMarkerUpdate()
at Fuse.UpdateListener.Invoke()
at Fuse.UpdateManager.Update(Fuse.Stage)
at Fuse.UpdateManager.Update()
at Fuse.AppBase.OnUpdate()
at Fuse.App.OnUpdate()
at Outracks.Simulator.Application.OnUpdate()
at Fuse.App.OnTick(object,Uno.Platform.TimerEventArgs)
at Uno.Platform2.Display.OnTick(Uno.Platform.TimerEventArgs)
Couldn't open file: Assets/pins/pin-b-0.png
When I’m using the same image elsewhere in the code the image is rendered as expected (I tried to use it at a dock-icon).
But this code is working :
<MapMarker Latitude="{lat}" Longitude="{lng}" Label="{title}" IconFile="Assets/pins/pin-b-0.png"/>
But I need to have a different icon for each marker.
I’m using Fuse 0.27.0 on OS X El Capitan.