1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Unable to add color to the pointer(marker) in mapbox map flutter

Discussão em 'Mobile' iniciado por Stack, Outubro 10, 2024 às 06:42.

  1. Stack

    Stack Membro Participativo

    I am unable to add color to the marker in mapbox map I've used mapbox_maps_flutter: ^2.3.0 plugin to load pointer(marker),and Everything is working perfact but when I set marker color, It always take black color and don't take given color.

    Please If you have used color in pointer(marker) then please answer this question.

    I have provided code to add marker to the mapbox map below.

    List<mapbox.PointAnnotationOptions> markerOptions = [];

    void addToMarkerOptions(MarkerModel marker) {
    var tempPointAnnotations = mapbox.PointAnnotationOptions(
    geometry: mapbox.Point(
    coordinates: mapbox.Position(
    marker.longitude ?? 0,
    marker.latitude ?? 0,
    ),
    ),
    iconSize: 1.8,
    image: marker.rowImage,//Uint8List Image
    textColor: marker.selectedColor,
    iconColor: Colors.red.value,
    iconHaloColor: marker.selectedColor,
    );
    markerOptions.add(
    tempPointAnnotations,
    );
    }


    For showing multiple marker in mapbox I've used createMulti method.

    pointAnnotationManager?.createMulti(markerOptions);


    Please let me know in comment If you need any further detail from me.

    Continue reading...

Compartilhe esta Página