Cannot remove markers in Google Maps JS API
问题 I want to remove all markers on map when the map is clicked. I am following the documentation here: https://developers.google.com/maps/documentation/javascript/examples/marker-remove I've included the function: function clearMarkers() { setMapOnAll(null); } to be triggered by a click event, but I just get the error: Uncaught ReferenceError: setMapOnAll is not defined There is no other information in the documentation that can help me. Can anyone point me in the right direction? 回答1: The error