Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This is my markercluster code : i need information window for the markercluster icon as well as marker icon, i have another cluster.js file,

can some one please tell me how can i show the information window for cluster icon when single mouse clik, and same for the marker icon

function initialize(doc) {
    var mapDiv = document.getElementById('logitmap');
    var latlng = new google.maps.LatLng(37.4419, - 122.1419);
    var options = {
        center: latlng,
        zoom: 2,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    // Creating the map
    map = new google.maps.Map(mapDiv, options);
    bounds = new google.maps.LatLngBounds();
    var jsonData = eval("(" + doc + ")");
    var markers = [];
    var markerIconURL;
    markerIconURL = jsonData[0].markerIconURL;
    for (var i = 1; i < jsonData.length; i++) {
        var input = jsonData[i];
        var gtype = input.Gtype;
        if (gtype == "marker") {
            var latLng = new google.maps.LatLng(input.latitude, input.longitude);
            var marker = new google.maps.Marker({
                position: latLng
            });
            markers.push(marker);
        }
    }
    var markerClustererOptions = {
        imagePath: markerIconURL,
        zoomOnClick: false
    };
    var markerCluster = new MarkerClusterer(map, markers, markerClustererOptions);
}
share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.