I am trying to build a make using the 3d photorealistic maps from google and even if i have billing and api set up i can seam to get rid of the banner
Using the alpha channel of the Google Maps JavaScript API. For development purposes only.
<!DOCTYPE html>
<html>
<head>
<title>Step 3 - Simple Marker</title>
<style>
body {
height: 100vh;
margin: 0;
}
</style>
</head>
<body>
<script>
(g => { var h, a, k, p = "The Google Maps JavaScript API", c = "google", l = "importLibrary", q = "__ib__", m = document, b = window; b = b[c] || (b[c] = {}); var d = b.maps || (b.maps = {}), r = new Set, e = new URLSearchParams, u = () => h || (h = new Promise(async (f, n) => { await (a = m.createElement("script")); e.set("libraries", [...r] + ""); for (k in g) e.set(k.replace(/[A-Z]/g, t => "_" + t[0].toLowerCase()), g[k]); e.set("callback", c + ".maps." + q); a.src = `https://maps.${c}apis/maps/api/js?` + e; d[q] = f; a.onerror = () => h = n(Error(p + " could not load.")); a.nonce = m.querySelector("script[nonce]")?.nonce || ""; m.head.append(a) })); d[l] ? console.warn(p + " only loads once. Ignoring:", g) : d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n)) })({
key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
v: "alpha",
});
</script>
<script>
let map3D = null;
async function init() {
const { Map3DElement, MapMode, Marker3DElement } = await google.maps.importLibrary("maps3d");
map3D = new Map3DElement({
center: { lat: 25.807096, lng: -80.361428, altitude: 30},
range: 200,
tilt: 70,
heading: 250,
mode: MapMode.SATELLITE,
});
const markers = [
{ lat: 25.807096, lng: -80.361428, altitude: 20, label: "Google UK" },
{ lat: 25.806642, lng: -80.363456, altitude: 20, label: "Statue of Liberty" },
{ lat: 25.805468, lng:-80.364287, altitude: 20, label: "Eiffel Tower" },
{ lat: 25.804730, lng: -80.364945, altitude: 20, label: "Los Angeles" }
];
markers.forEach(markerData => {
const marker = new Marker3DElement({
position: { lat: markerData.lat, lng: markerData.lng, altitude: markerData.altitude },
label: markerData.label,
altitudeMode: 'ABSOLUTE',
extruded: true,
});
map3D.append(marker);
});
document.body.append(map3D);
}
init();
</script>
</body>
</html>
trying to build a 3d map around golf courses
I am trying to build a make using the 3d photorealistic maps from google and even if i have billing and api set up i can seam to get rid of the banner
Using the alpha channel of the Google Maps JavaScript API. For development purposes only.
<!DOCTYPE html>
<html>
<head>
<title>Step 3 - Simple Marker</title>
<style>
body {
height: 100vh;
margin: 0;
}
</style>
</head>
<body>
<script>
(g => { var h, a, k, p = "The Google Maps JavaScript API", c = "google", l = "importLibrary", q = "__ib__", m = document, b = window; b = b[c] || (b[c] = {}); var d = b.maps || (b.maps = {}), r = new Set, e = new URLSearchParams, u = () => h || (h = new Promise(async (f, n) => { await (a = m.createElement("script")); e.set("libraries", [...r] + ""); for (k in g) e.set(k.replace(/[A-Z]/g, t => "_" + t[0].toLowerCase()), g[k]); e.set("callback", c + ".maps." + q); a.src = `https://maps.${c}apis/maps/api/js?` + e; d[q] = f; a.onerror = () => h = n(Error(p + " could not load.")); a.nonce = m.querySelector("script[nonce]")?.nonce || ""; m.head.append(a) })); d[l] ? console.warn(p + " only loads once. Ignoring:", g) : d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n)) })({
key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
v: "alpha",
});
</script>
<script>
let map3D = null;
async function init() {
const { Map3DElement, MapMode, Marker3DElement } = await google.maps.importLibrary("maps3d");
map3D = new Map3DElement({
center: { lat: 25.807096, lng: -80.361428, altitude: 30},
range: 200,
tilt: 70,
heading: 250,
mode: MapMode.SATELLITE,
});
const markers = [
{ lat: 25.807096, lng: -80.361428, altitude: 20, label: "Google UK" },
{ lat: 25.806642, lng: -80.363456, altitude: 20, label: "Statue of Liberty" },
{ lat: 25.805468, lng:-80.364287, altitude: 20, label: "Eiffel Tower" },
{ lat: 25.804730, lng: -80.364945, altitude: 20, label: "Los Angeles" }
];
markers.forEach(markerData => {
const marker = new Marker3DElement({
position: { lat: markerData.lat, lng: markerData.lng, altitude: markerData.altitude },
label: markerData.label,
altitudeMode: 'ABSOLUTE',
extruded: true,
});
map3D.append(marker);
});
document.body.append(map3D);
}
init();
</script>
</body>
</html>
trying to build a 3d map around golf courses
Share Improve this question asked Mar 16 at 1:22 Roger UrbinaRoger Urbina 91 bronze badge 6 | Show 1 more comment2 Answers
Reset to default 0Change the version of your maps sdk, your current version is alpha
which shows you this message.
{
key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
v: "weekly", // Changed from 'alpha'
}
As google states in their docs:
Use the 'v' parameter to indicate the version to use (weekly, beta, alpha, etc.).
You aren't allowed to remove the Banner.
It is for development purposes only and should not be used in production.
This is there to prevent commercial use, since Maps3D isn't launched yet (It's Experimental) and usage on it is not being charged either.
<>
written on it. that makes this runnable right here, no copypasting to somewhere else. – Christoph Rackwitz Commented Mar 16 at 18:51