javascript - Draw a table inside an infowindow of Google maps v3? -
when user click on marker infowindow appear , shows information. it's better show information in beautiful way using table. how can draw table inside infowindow?
here loop-for creates markers on map , create infowindow(s) each one. want show تاریخ , ساعت , سرعت in table aligned.
for(var counter = 0; counter < arraylatitude.length; counter++) { var marker = new google.maps.marker({ position:new google.maps.latlng(arraylatitude[counter], arraylongitude[counter]), info:arrayutcdate[counter]+" :تاریخ<br>"+arraysatellite_derived_time[counter]+" :ساعت<br>"+arrayspeed[counter].tofixed(2)+" :سرعت" }); marker.setmap(map); //event. when click on marker, infowindow show content of specified marker. google.maps.event.addlistener(marker, 'click', function () { infowindow.setcontent(this.info); infowindow.open(map, this); }); }
check link : https://developers.google.com/maps/documentation/javascript/examples/infowindow-simple
you can set html here :
var contentstring = '<div id="content">' '</div>';
Comments
Post a Comment