Reputation: 305
I have for example:
var locations = new google.maps.LatLng('@item.latitude', '@item.longitude', false);
@item.latitude value is for example: "43,321"
but i need it to be: 43.321
I need to force decimal separator as point not comma. How can I do this?
Upvotes: 1
Views: 259
Reputation: 35983
try this:
var lat = '@item.latitude';
var lng = '@item.longitude';
var locations = new google.maps.LatLng(lat.replace(',','.'), lng.replace(',','.'), false);
Upvotes: 1