0
votes

i want to change the Colors for Markers/Pins on Google Map Chart, this is how i am doing it. I am unable to display any marker, with customize image/color.

<script>
        google.load("visualization", "1", {packages:["map"]});
        google.setOnLoadCallback(drawMap);
        function drawMap(dataArray) {
            var pinColor = "FE7569";
            var pinImage = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|" + pinColor,
            new google.maps.Size(21, 34),
            new google.maps.Point(0,0),
            new google.maps.Point(10, 34));
            var pinShadow = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_shadow",
            new google.maps.Size(40, 37),
            new google.maps.Point(0, 0),
            new google.maps.Point(12, 35));
            var data = google.visualization.arrayToDataTable(dataArray);
            var map = new google.visualization.Map(document.getElementById('map_div'));
            map.Marker({
                position: new google.maps.LatLng(0,0), 
                map: map,
                icon: pinImage,
                shadow: pinShadow
            });
            var options = {mapType: 'terrain',showTip: true,useMapTypeControl:true};

            map.draw(data,options);
        }
    </script>
1
I think link and link will help you a lot.Ram Patidar
@RamPatidar: i already tried this link stackoverflow.com/questions/7095574/…, that you suggested and most of my code is done with its help but still i cant figure out the problemnoobie-php
The Google Maps visualization for the Visualization API does not support most the Google Maps features, including modifying the markers. You have to use Google Maps directly (not through the Visualization API) if you want to use these features.asgallant

1 Answers

0
votes