I have a reference to a Google Place, and use the Javascript API to get the place details.
It works fine as long as there is a map on the page.
But if there is no map - I only want the place's details - it breaks because the variable map is not defined.
The documentation specifies:
"Place Details are requested with a call to the service's getDetails() method."
service = new google.maps.places.PlacesService(map);
service.getDetails(request, callback);
If I leave out the map variable, I get: "Uncaught TypeError: Cannot read property 'innerHTML' of undefined"
I can make a server-side request, but there is a limit to the number of times you can do that.
Is there a way in Javascript to get just the place details without a map?