2👍
It is because javascript uses dot in decimal numbers. So if you pass number to javascript you need use dot. Like this: 159.0857
If you pass it with comma javascript will round it
If you are using coordinates with commas (which is not very good approach). Then you need to replace comma. Maybe with custom filter. But how I said. It will be much better use decimal numbers with dots.
Of course if you have some objects on the page you can assign coordinates (with dots) to the html elements.
<p class="address" latitude="49.055" longitude="40.808">Your address</p>
and then you can get this values via JQuery or javascript.
If you have comma in your lat and lon, you have to replace it first. In your view try this:
return context.update({'latitude': float(latitude.replace(',','.')), 'longitude': float(longitude.replace(',','.'))}
Edited
The last thing which could make this problem (you said it is OK on your standard output) is localization. Check this answer
You will have to set USE_L10N=False