date=%04u-%02u-%02u
",tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); + put_format(b, "time=%02u:%02u:%02u
",tm.tm_hour, tm.tm_min, tm.tm_sec); +} + +void put_HTML_temp(struct membuffer *b,struct dive *dive) +{ + put_temperature(b, dive->airtemp, "Air Temp: ", " C\\'
"); + put_temperature(b, dive->watertemp, "Water Temp: ", " C\\'
"); +} + +void put_HTML_notes(struct membuffer *b,struct dive *dive) +{ + if (dive->notes) { + put_format(b,"Notes : %s
",dive->notes); + } +} + +void writeMarkers(struct membuffer *b) +{ + int i; + struct dive *dive; + + for_each_dive(i, dive) { + /*export selected dives only ?*/ + + if (dive->latitude.udeg==0 && dive->longitude.udeg==0) { + continue; + } + + put_format(b,"temp = new google.maps.Marker({position: new google.maps.LatLng(%f,%f)});\n", + dive->latitude.udeg/1000000.0,dive->longitude.udeg/1000000.0); + put_string(b,"markers.push(temp);\ntempinfowindow = new google.maps.InfoWindow({content: 'duration=", " min
"); + put_HTML_temp(b,dive); + put_HTML_notes(b,dive); + put_string(b,"'+'