Answers for "setCenter: not a LatLng or LatLngLiteral with finite coordinates: in property lat: not a number"

0

setCenter: not a LatLng or LatLngLiteral with finite coordinates: in property lat: not a number

//The error comes because you pass the value as string:
var lat = document.getElementById('lat').value;

//you need to set it as float:
var lat = parseFloat(document.getElementById('lat').value);
Posted by: Guest on January-26-2021

Code answers related to "setCenter: not a LatLng or LatLngLiteral with finite coordinates: in property lat: not a number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language