Imam sledeci canvas html5;
Kôd:
<canvas id="myCanvas" width="500" height="400"
style="border:1px solid #000000; background:#ccc;">
</canvas>
and here is
i ovde je sve ok, tj mogu da crtam linije sa kordinatama x i y s tim da budu max 500 tj. 400
Ali kako da prikazem ove koordinate na canvasu tako da se vide kao na slici ispod:
{"lat":"52.67554942424349","lng":"8.37265491485595 7"},{"lat":"52.67528921580262","lng":"8.3735132217 40723"},{"lat":"52.6759657545252","lng":"8.3741140 36560059"},{"lat":"52.682574466310314","lng":"8.37 256908416748"},{"lat":"52.68356308524067","lng":"8 .373942375183105"},{"lat":"52.68293869694087","lng ":"8.375487327575684"},{"lat":"52.67685044320001", "lng":"8.376259803771973"},{"lat":"52.675653507185 9","lng":"8.379607200622559"},{"lat":"52.676017795 531436","lng":"8.382096290588379"},{"lat":"52.6810 1344348877","lng":"8.380722999572754"},{"lat":"52. 68351105322329","lng":"8.383641242980957"},
Kako da transformisem ove decimalne brojeve (koordinate tako da ih prikazem na html5 canvasu kao na google mapi?