I can't convert point to latlng.
Here is my code.
function convertPointToLatLng(x, y) {
// Function to convert screen coordinates to LatLng
if (map.getProjection()) {
const point = new maps.Point(x, y);
const latLng = map.getProjection().fromContainerPixelToLatLng(point);
return latLng;
}
}
Got an error like map.getProjection(...).fromContainerPixelToLatLng is not a function
I can't convert point to latlng.
Here is my code.
Got an error like
map.getProjection(...).fromContainerPixelToLatLng is not a function