TorbenK / TK.CustomMap

Extended Map Control
MIT License
142 stars 109 forks source link

App crashes when changing Pin Icon #323

Open salvad0rml opened 6 years ago

salvad0rml commented 6 years ago

Hi, I'm having problems when I want to change the default icon, i get the error : "The provided image must be a Bitmap." Here is my code:

new TKCustomMapPin { Title = shipment.ShipmentID + " (" + shipment.VehicleAlias + ")", Subtitle = shipment.LastReport, Position = new Position(shipment.Latitude, shipment.Longitude), ID = shipment.ShipmentID, Image = ImageSource.FromFile("ic_truck_top.png") });

What am I missing?

vincentcastagna commented 6 years ago

Hello, What version of TK are you using ? Do you get this error on iOS or Android or both ?

ChaseFlorell commented 6 years ago

I'm seeing this error on Android

  <package id="TK.CustomMap" version="2.0.1" targetFramework="monoandroid71" />

strike that, PEBKAC I imported the resources into iOS but not the Android project. The images didn't even exist.

poseydonfba commented 6 years ago

Tente usar:

            new TKCustomMapPin
            {
                Title = shipment.ShipmentID + "(" + shipment.VehicleAlias ​​+")",
                Subtítulo = shipment.LastReport,
                Position = new Posição(shipment.Latitude, shipment.Longitude),
                ID = shipment.ShipmentID,
                Image = "ic_truck_top.png"
            });