Dynamic Google Map Pins - Google Map API jQuery

Dynamic Google Map Pins - Google Map API jQuery

Ok, so im not sure how common this question is but here goes...
Im developing a map module that uses that Google Map API, with map pins, im using jQuery at the moment to display the page, with multiple pins as below.

My question is, im wanting to make the jQuery dynamic if that possible?
So i will have filters etc that will show a certain amount of pins depending on category etc, if that makes seance?
Im guessing c# or some kind of vb will have to run onclick, but can c# change the content of jQuery?

 var map; var infowindow;
    function InitializeMap() {
        var latlng = new google.maps.LatLng(53.801279, -1.548567);
        var myOptions =
        {
            zoom: 14,
            center: latlng,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        map = new google.maps.Map(document.getElementById("map"), myOptions);
    }


    function markicons() {

        InitializeMap();

        var ltlng = [];

        ltlng.push(new google.maps.LatLng(53.803489443287994, -1.5435791015625));
        ltlng.push(new google.maps.LatLng(53.80300790573159, -1.542806625366211));
        ltlng.push(new google.maps.LatLng(53.80034667740131, -1.5411114692687988));
        ltlng.push(new google.maps.LatLng(53.79975104602529, -1.5412616729736328));


        map.setCenter(ltlng[0]);
        for (var i = 0; i <= ltlng.length; i++) {
            marker = new google.maps.Marker({
                map: map,
                position: ltlng[i]
            });

            (function (i, marker) {

                google.maps.event.addListener(marker, 'click', function () {

                    if (!infowindow) {
                        infowindow = new google.maps.InfoWindow();
                    }

                    infowindow.setContent("Shop Info Here" + i);

                    infowindow.open(map, marker);

                });

            })(i, marker);

        }

    }

    window.onload = markicons;