Hi,
Is possible hide icons in red on maps?
A solution could be to use a script tag in a configuration file to control the appearance of the default UI element as described here
The following JavaScript sample code uses an automatic function invocation to run initMap, controlling the zoom and center, hiding the Map Type Control. A drawback is that you are overriding zoom and center defined in the configuration file 🙁
function initMap() {
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 14,
center: { lat: -33, lng: 151 },
mapTypeControl: false,
});
}
(function () {
console.log('Configuring the map');
initMap();
})();
The file (e.g., control-simple.js) with the code above, has to be saved in:
C:\Skyline DataMiner\Webpages\Maps\v1 (or any subdirectory), and the script tag in the configuration file should be something like this:
<MapConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
.....
<Scripts>
<Script src="control-simple.js" />
</Scripts>
.....
</MapConfig>
Hi Gelber, I’m curious… the console.log where is it logging to?
Hi Jarno. The console.log is sending the output to the browser’s developer console. If you open the map from a browser and then press F12, you will see the developer tools with one tab called console.
Oh right… Thanks for the swift response.
Hi, works as well, but the button(filterbox) nodos is disappeared, this is a layer, how can show again?