Closed ShyshkovOleg closed 5 years ago
The author closed issue without providing any solution. This code below works for me (NS 5.4).
import { Image } from "tns-core-modules/ui/image";
import { ImageSource } from "tns-core-modules/image-source";
...
const imageSource = new ImageSource();
imageSource.loadFromFile("~/images/icons/success.png");
const icon = new Image();
icon.imageSource = imageSource;
let marker = new Marker();
marker.icon = icon;
Marker Icon Do not work NS+ Angular (tested on android). marker.icon suport only string. I've tried to conver to base64, but without a succes. Would appreciate any help.
myImageSource: ImageSource = fromFile("~/images/markergreen.png"); const icon = this.myImageSource.toBase64String("png"); marker.icon = icon;