b = map_name.setTitle(title);
The
Map.setTitle function sets the text that is displayed directly above the map to the value of the string expression
title. This can be used to display an instruction to the user such as "Tap on the map at the location of the household." By default the instruction is empty and is not shown. To remove the title call
Map.setTitle("") function with an empty string.
The title may contain HTML tags, including:
| <b> | bold |
| <i> | italic |
| <u> | underline |
| <s> | strikethrough |
| <sup> | superscript |
| <sub> | subscript |
| <font> | font (including color) |
| <br> | line break |
The function returns a logical value of 1 (true).
// Declare a map
Map mymap;
// Set the title text above the map
mymap.setTitle("Tap on the map to place a household");
mymap.setOnClick(placeHousehold);
// Display the map
mymap.show();