Small content window on google map
i try to plotting data on google map and i am done with this now the problem is there is 4000+ records in table so plotting this data on map takes too much load time and sometimes code is break so how i solve this ..
this is what i try
- var map;
- debugger;
- var latlng = new google.maps.LatLng(74.0895898, 97.0998546);
- debugger;
- var myOptions = {
- zoom: 8,
- center: latlng,
- mapTypeId: google.maps.MapTypeId.ROADMAP
- };
- debugger;
- map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
-
- var markers = [];
- for (i = 0; i < d.length - 1; i++) {
- var myLatlng = new google.maps.LatLng(d[i][5], d[i][4]);
- var marker = new google.maps.Marker({
- position: myLatlng,
- //icon: "images/car.png",
- map: map,
- title: 'Click me'
- });
- markers.push(marker);
- }
- var MarkerClusterer = new MarkerClusterer(map,markers,{imagePath: 'images/m1'});
-
- debugger;
- var infowindow = new google.maps.InfoWindow({
- content: 'Lat:' + d[i][5] + '<br>Long:' + d[i][4]
- });
- marker.addListener('click', function () {
- })
- google.maps.event.addListener(marker, 'click', function () {
- infowindow.open(map, marker, data);
- });
- infowindow.open(map, marker, data);
-
I try this but info window is not display when i open map page .. i want when i open page then small window is display with lat and long values and when i close this window and again click on marker then window should appear
how i do this