I have added a custom button into google maps API using the following code:
function createHideControl(map) {
const controlButton = document.createElement("button");
// Set CSS for the control.
controlButton.style.backgroundColor = "#fff";
controlButton.style.border = "2px solid #fff";
controlButton.style.borderRadius = "3px";
controlButton.style.boxShadow = "0 2px 6px rgba(0,0,0,.3)";
controlButton.style.color = "rgb(25,25,25)";
controlButton.style.cursor = "pointer";
controlButton.style.fontFamily = "Roboto,Arial,sans-serif";
controlButton.style.fontSize = "16px";
controlButton.style.lineHeight = "38px";
controlButton.style.margin = "8px 0 22px";
controlButton.style.padding = "0 5px";
controlButton.style.textAlign = "center";
controlButton.textContent = "Hide Map";
controlButton.title = "Click to hide the map";
controlButton.type = "button";
controlButton.id = "findme";
controlButton.addEventListener("click", () => {
GOOGLE_MAP.setMapTypeId(null)
});
return controlButton;
}
const hideMapDiv = document.createElement("div");
// Create the control.
const hidMapControl = createHideControl(GOOGLE_MAP);
// Append the control to the DIV.
hideMapDiv.appendChild(hidMapControl);
But want to add it into the mapTypeControl menu. It looks disjointed where it is now.
Is there a way to push into mapTypeControl instead of into the position LEFT TOP?

