I am trying to improve my Google Map and add there Marker Cluster function but I really do not know how to continue. It still give me gray map (nothing shown).
Is there anyone whould could check the code and give me tips?
Thanks.
This is code I use (sorry for large array):
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js"></script>
<script type="text/javascript">
var infowindow = null;
$(document).ready(function () { initialize(); });
function initialize() {
var centerMap = new google.maps.LatLng(95.32, 14.82);
var myOptions = {
zoom: 0,
center: centerMap,
mapTypeId: google.maps.MapTypeId.HYBRID }
var map = new google.maps.Map(document.getElementById("map_radius_canvas"), myOptions);
var markerCluster = new MarkerClusterer(map, sites);
setMarkers(map, sites);
infowindow = new google.maps.InfoWindow({
content: "loading..."
});
var LatLngList = new Array (
new google.maps.LatLng(11.0168445, 76.9558321), new google.maps.LatLng(11.0168445, 76.9558321), new google.maps.LatLng(11.0168445, 76.9558321), new google.maps.LatLng(11.0168445, 76.9558321), new google.maps.LatLng(-3.7318616, -38.5266704), new google.maps.LatLng(21.3967, -157.8994), new google.maps.LatLng(45.4278901, -75.6958523), new google.maps.LatLng(26.8465108, 80.9466832), new google.maps.LatLng(30.9602, -85.1639), new google.maps.LatLng(33.9737, -87.0043) );
var bounds = new google.maps.LatLngBounds ();
for (var i = 0, LtLgLen = LatLngList.length; i < LtLgLen; i++) {
bounds.extend (LatLngList[i]);
}
map.fitBounds (bounds);
var bikeLayer = new google.maps.BicyclingLayer();
bikeLayer.setMap(map);
}
var sites = [
['Hyper Active / Dyslexia / No Speech / Speech Therapy in Residential School', 11.0168445, 76.9558321, '<div style="width:300px;max-width:300px;display:block;height:70px;max-height:70px;overflow: hidden;"><a style="width:28%;float:left;clear:both;" href="http://your_site.com/classes/tutoring-private-lessons/hyper-active-dyslexia-no-speech-speech-therapy-in-residential-school_i171"><img style="width:100%;height:auto;border:1px solid #ddd;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;" src="http://your_site.com/oc-content/uploads/1/46_thumbnail.jpg"/></a><a style="margin-left:2%;font-weight:bold;width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;float:left;color:#333;text-decoration:underline;font-size:13px;margin-bottom:4px;" href="http://your_site.com/classes/tutoring-private-lessons/hyper-active-dyslexia-no-speech-speech-therapy-in-residential-school_i171">Hyper Active / Dyslexia / No Speech / Speech Therapy in Residential School</a><a style="margin-left:2%;width:70%;float:left;color:#777;height:34px;line-height:12px;font-size:11px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;" href="http://your_site.com/classes/tutoring-private-lessons/hyper-active-dyslexia-no-speech-speech-therapy-in-residential-school_i171">Nothing to Worry. Divine, Holistic Meditation Yoga and occupational speech, Akarshane therapies and lots more would give your wards the best life and ...</a></div>', 'http://your_site.com/oc-content/plugins/radius_search/img/marker-red.png']
, ['RESIDENTIAL SCHOOL ADMISSIONS / SECURING THE HIGHEST RESULTS IN XII EXAMS', 11.0168445, 76.9558321, '<div style="width:300px;max-width:300px;display:block;height:70px;max-height:70px;overflow: hidden;"><a style="width:28%;float:left;clear:both;" href="http://your_site.com/classes/tutoring-private-lessons/residential-school-admissions-securing-the-highest-results-in-xii-exams_i170"><img style="width:100%;height:auto;border:1px solid #ddd;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;" src="http://your_site.com/oc-content/uploads/1/45_thumbnail.jpg"/></a><a style="margin-left:2%;font-weight:bold;width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;float:left;color:#333;text-decoration:underline;font-size:13px;margin-bottom:4px;" href="http://your_site.com/classes/tutoring-private-lessons/residential-school-admissions-securing-the-highest-results-in-xii-exams_i170">RESIDENTIAL SCHOOL ADMISSIONS / SECURING THE HIGHEST RESULTS IN XII EXAMS</a><a style="margin-left:2%;width:70%;float:left;color:#777;height:34px;line-height:12px;font-size:11px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;" href="http://your_site.com/classes/tutoring-private-lessons/residential-school-admissions-securing-the-highest-results-in-xii-exams_i170">Behaviour Issues in YOUR CHILDREN - In IX, X standards as well XII - The Children are not listening to the Parents, screaming, shouting etc, while you...</a></div>', 'http://your_site.com/oc-content/plugins/radius_search/img/marker-red.png']
, ['LOW BUDGET HOSTEL STUDIES AVAILABLE FOR MATRICULATION BOARD CHILDREN', 11.0168445, 76.9558321, '<div style="width:300px;max-width:300px;display:block;height:70px;max-height:70px;overflow: hidden;"><a style="width:28%;float:left;clear:both;" href="http://your_site.com/classes/tutoring-private-lessons/low-budget-hostel-studies-available-for-matriculation-board-children_i169"><img style="width:100%;height:auto;border:1px solid #ddd;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;" src="http://your_site.com/oc-content/uploads/1/44_thumbnail.jpg"/></a><a style="margin-left:2%;font-weight:bold;width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;float:left;color:#333;text-decoration:underline;font-size:13px;margin-bottom:4px;" href="http://your_site.com/classes/tutoring-private-lessons/low-budget-hostel-studies-available-for-matriculation-board-children_i169">LOW BUDGET HOSTEL STUDIES AVAILABLE FOR MATRICULATION BOARD CHILDREN</a><a style="margin-left:2%;width:70%;float:left;color:#777;height:34px;line-height:12px;font-size:11px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;" href="http://your_site.com/classes/tutoring-private-lessons/low-budget-hostel-studies-available-for-matriculation-board-children_i169">Are your children studying good and because of your Financial issues? Are you getting shuffled between your job, your house and Responsibilities? If ...</a></div>', 'http://your_site.com/oc-content/plugins/radius_search/img/marker-red.png']
, ['Want Admissions in Higher Secondary for Biology Group / First Group in XI', 11.0168445, 76.9558321, '<div style="width:300px;max-width:300px;display:block;height:70px;max-height:70px;overflow: hidden;"><a style="width:28%;float:left;clear:both;" href="http://your_site.com/classes/tutoring-private-lessons/want-admissions-in-higher-secondary-for-biology-group-first-group-in-xi_i168"><img style="width:100%;height:auto;border:1px solid #ddd;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;" src="http://your_site.com/oc-content/uploads/1/43_thumbnail.jpg"/></a><a style="margin-left:2%;font-weight:bold;width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;float:left;color:#333;text-decoration:underline;font-size:13px;margin-bottom:4px;" href="http://your_site.com/classes/tutoring-private-lessons/want-admissions-in-higher-secondary-for-biology-group-first-group-in-xi_i168">Want Admissions in Higher Secondary for Biology Group / First Group in XI</a><a style="margin-left:2%;width:70%;float:left;color:#777;height:34px;line-height:12px;font-size:11px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;" href="http://your_site.com/classes/tutoring-private-lessons/want-admissions-in-higher-secondary-for-biology-group-first-group-in-xi_i168">Do you want admission in +1 & Maths / Biology / Computer Science admissions for your ward? Do you fear your children would score minimum marks in...</a></div>', 'http://your_site.com/oc-content/plugins/radius_search/img/marker-red.png']
, ['hello tetest', -3.7318616, -38.5266704, '<div style="width:300px;max-width:300px;display:block;height:70px;max-height:70px;overflow: hidden;"><a style="width:28%;float:left;clear:both;" href="http://your_site.com/for-sale/art-collectibles/hello-tetest_i167"><img style="width:100%;height:auto;border:1px solid #ddd;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;" src="http://your_site.com/oc-content/themes/sofia/images/no_photo.gif"/></a><a style="margin-left:2%;font-weight:bold;width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;float:left;color:#333;text-decoration:underline;font-size:13px;margin-bottom:4px;" href="http://your_site.com/for-sale/art-collectibles/hello-tetest_i167">hello tetest</a><a style="margin-left:2%;width:70%;float:left;color:#777;height:34px;line-height:12px;font-size:11px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;" href="http://your_site.com/for-sale/art-collectibles/hello-tetest_i167">test htis is</a></div>', 'http://your_site.com/oc-content/plugins/radius_search/img/marker-red.png']
, ['Hayabusa', 21.3967, -157.8994, '<div style="width:300px;max-width:300px;display:block;height:70px;max-height:70px;overflow: hidden;"><a style="width:28%;float:left;clear:both;" href="http://your_site.com/vehicles/motorcycles/hayabusa_i158"><img style="width:100%;height:auto;border:1px solid #ddd;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;" src="http://your_site.com/oc-content/uploads/1/36_thumbnail.jpg"/></a><a style="margin-left:2%;font-weight:bold;width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;float:left;color:#333;text-decoration:underline;font-size:13px;margin-bottom:4px;" href="http://your_site.com/vehicles/motorcycles/hayabusa_i158">Hayabusa</a><a style="margin-left:2%;width:70%;float:left;color:#777;height:34px;line-height:12px;font-size:11px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;" href="http://your_site.com/vehicles/motorcycles/hayabusa_i158">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500...</a></div>', 'http://your_site.com/oc-content/plugins/radius_search/img/marker-red.png']
, ['teste', 45.4278901, -75.6958523, '<div style="width:300px;max-width:300px;display:block;height:70px;max-height:70px;overflow: hidden;"><a style="width:28%;float:left;clear:both;" href="http://your_site.com/for-sale/animals/teste_i166"><img style="width:100%;height:auto;border:1px solid #ddd;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;" src="http://your_site.com/oc-content/uploads/1/39_thumbnail.jpg"/></a><a style="margin-left:2%;font-weight:bold;width:70%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;float:left;color:#333;text-decoration:underline;font-size:13px;margin-bottom:4px;" href="http://your_site.com/for-sale/animals/teste_i166">teste</a><a style="margin-left:2%;width:70%;float:left;color:#777;height:34px;line-height:12px;font-size:11px;text-decoration:none;overflow:hidden;text-overflow:ellipsis;" href="http://your_site.com/for-sale/animals/teste_i166">teste</a></div>', 'http://your_site.com/oc-content/plugins/radius_search/img/ma