[PATCH] Exporting a World-Map prototype
Miika Turkia
miika.turkia at gmail.com
Wed Mar 26 18:53:14 PDT 2014
On Thu, Mar 27, 2014 at 1:08 AM, Gehad <gehadelrobey at gmail.com> wrote:
> This patch adds the world map feature.
> open subsurface -> file -> export HTML
> this exports an html file with your dive list to a world map, when you
> hover a dive the date appears (I have to add more information like the air
> and water temperature)
> I fixed the continuation lines (though I think the code now is less
> readable) , also I used the memory buffer functions already exciting in
> membuffer.c
Very quick browse through the source:
You use both "\n" and "\r\n" for new line ("\r" only once):
+ put_string(b,"),title:
\"");put_string(b,month);put_string(b,"\"});\r\n");
+ put_string(b,"markers.push(temp);\n");
Coding style:
+ if(!f)printf("error"); /*report error*/
Unnecessary new lines on export function:
+ put_string(b,"\t</head>\n\
+<body>\n\
And a brief test; positioning dives with no GPS location to 0,0 does not
seem right. But as a PoC this seems to be working quite well.
miika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20140327/e06e2509/attachment.html>
More information about the subsurface
mailing list