b = map_name.setOnClick(callbackFunction);
The
Map.setOnClick function sets the function that is called when the user taps on the base map away from any markers. The
callbackFunction is the name of a user function defined in the global procedure that will be called when the user taps on the map. The function name may optionally be followed by function arguments which will be passed to the function when it is run. These arguments are evaluated at the time that
Map.setOnClick is called rather than at the time the callback is run.
If the user taps on a marker rather than on the map itself,
callbackFunction is not called. To capture taps on markers use the
Map.setMarkerOnClick function.
The function returns a logical value of 1 (true).