Hide the Map When No Results Are Found
When using the Caspio Bridge Map Mashup you may want to hide the Google map when no results are found. This article explains how to accomplish this.

1. Edit the Localization
In the Caspio Bridge Explorer window go to the Localizations view. Select the Localization used in your map mashup Report DataPage. Click the Edit button to open the Localization Wizard. Proceed to the Settings screen. Find the Forms/Details Pages section and select Messages. Element ID #351 is the No Records Found message.
We are going to customize the HTML text by adding an extra div tag around the message.

2. Edit the Report DataPage
Now, go back to the DataPages view and select the Report DataPage. Click on the Edit button to open the Report wizard. Proceed to the Configure Results Page Fields screen. Using the Insert button at the lower right of the DataPage Elements panel, insert Header & Footer sections. Paste the following code into the Footer:
<script>
function func_NoRec_Map()
{
if (document.getElementById("norecord"))
document.getElementById("map").style.display = "none";
}
window.onload=func_NoRec_Map;
</script>
Make sure the div ID you have assigned (in this example "norecord") is the same in both the Localization message and the JavaScript code.
Now whenever the user receives the No Records Found message, the map will automatically be hidden.
