Angular google maps hide show marker

Angular google maps question!/

Is it possible to hide and show individual markers that has been added to ui-gmap-markers?

I found the solution.

In html I added options="‘markerOptions’"

        <ui-gmap-markers models='markers' coords="'coords'" options="'markerOptions'" idkey="">
                <ui-gmap-windows show="show">
                    <div ng-non-bindable>{{title}}</div>

In javascript I added markerOptions:

                 var marker_visible = false;

                 if (condition)
                     marker_visible = true;

                     coords: {
                         longitude: val.lng
                     title: infowindow,
                     dizi_id: val.dizi_id,
                     markerOptions: { visible: marker_visible }
1 Like