Energy Layers
Include the Energy Layers add-on and associated control in a map. Learn more about the Energy Layers add-on.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://maps-sdk.trimblemaps.com/v4/trimblemaps-4.2.5.css" />
<script src="https://maps-sdk.trimblemaps.com/v4/trimblemaps-4.2.5.js"></script>
<script src="https://maps-sdk.trimblemaps.com/addon/trimblemaps-energy-2.2.1.js"></script>
<link rel="stylesheet" href="https://maps-sdk.trimblemaps.com/addon/trimblemaps-energy-2.2.1.css" />
<style>
body { margin: 0; padding: 0; }
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
TrimbleMaps.setAPIKey('YOUR_API_KEY_HERE');
const map = new TrimbleMaps.Map({
container: 'map', // container id
style: TrimbleMaps.Common.Style.TRANSPORTATION, // hosted style id
center: [-113.2086, 52.1549], // starting position
zoom: 9 // starting zoom
});
const energyControl = new TrimbleMapsControl.EnergyControl();
map.addControl(energyControl, 'top-left');
</script>
</body>
</html>
Energy Layers
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://maps-sdk.trimblemaps.com/v4/trimblemaps-4.2.5.css" />
<script src="https://maps-sdk.trimblemaps.com/v4/trimblemaps-4.2.5.js"></script>
<script src="https://maps-sdk.trimblemaps.com/addon/trimblemaps-energy-2.2.1.js"></script>
<link rel="stylesheet" href="https://maps-sdk.trimblemaps.com/addon/trimblemaps-energy-2.2.1.css" />
<style>
body { margin: 0; padding: 0; }
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
TrimbleMaps.setAPIKey('YOUR_API_KEY_HERE');
const map = new TrimbleMaps.Map({
container: 'map', // container id
style: TrimbleMaps.Common.Style.TRANSPORTATION, // hosted style id
center: [-113.2086, 52.1549], // starting position
zoom: 9 // starting zoom
});
const energyControl = new TrimbleMapsControl.EnergyControl();
map.addControl(energyControl, 'top-left');
</script>
</body>
</html>