Custom maps are available to the player once "Bubble Sort" (formerly was Cuckoo hashing) in the research tree has been researched. Once unlocked, custom maps can be created, edited, played, or deleted.
They Are Billions Custom Maps
@worldlusWell, your first point won't help as you can't do anything with that file of course. I can reproduce your issue, I also only saw those folders and the AdCache folder. I had to make the "Maps"-folder myself, but opening and saving a map in the worldbuilder also produced thiss map in the AppData directory. I put some custom maps in that "Maps"-directory and the game indeed also didn't recognize them and yes that folder has all permissions and this even occurs when running the game as administrator.
TypeScript /** * The custom USGSOverlay object contains the USGS image, * the bounds of the image, and a reference to the map. */class USGSOverlay extends google.maps.OverlayView { private bounds: google.maps.LatLngBounds; private image: string; private div?: HTMLElement; constructor(bounds: google.maps.LatLngBounds, image: string) super(); this.bounds = bounds; this.image = image; index.ts Note: Read the guide on using TypeScript and Google Maps. JavaScript /** * The custom USGSOverlay object contains the USGS image, * the bounds of the image, and a reference to the map. */class USGSOverlay extends google.maps.OverlayView { bounds; image; div; constructor(bounds, image) super(); this.bounds = bounds; this.image = image; index.js
TypeScript const toggleButton = document.createElement("button");toggleButton.textContent = "Toggle";toggleButton.classList.add("custom-map-control-button");const toggleDOMButton = document.createElement("button");toggleDOMButton.textContent = "Toggle DOM Attachment";toggleDOMButton.classList.add("custom-map-control-button");toggleButton.addEventListener("click", () => overlay.toggle(););toggleDOMButton.addEventListener("click", () => overlay.toggleDOM(map););map.controls[google.maps.ControlPosition.TOP_RIGHT].push(toggleDOMButton);map.controls[google.maps.ControlPosition.TOP_RIGHT].push(toggleButton);index.ts Note: Read the guide on using TypeScript and Google Maps. JavaScript const toggleButton = document.createElement("button");toggleButton.textContent = "Toggle";toggleButton.classList.add("custom-map-control-button");const toggleDOMButton = document.createElement("button");toggleDOMButton.textContent = "Toggle DOM Attachment";toggleDOMButton.classList.add("custom-map-control-button");toggleButton.addEventListener("click", () => overlay.toggle(););toggleDOMButton.addEventListener("click", () => overlay.toggleDOM(map););map.controls[google.maps.ControlPosition.TOP_RIGHT].push(toggleDOMButton);map.controls[google.maps.ControlPosition.TOP_RIGHT].push(toggleButton);index.js
TypeScript // This example adds hide() and show() methods to a custom overlay's prototype.// These methods toggle the visibility of the container .// overlay to or from the map.function initMap(): void const map = new google.maps.Map( document.getElementById("map") as HTMLElement, zoom: 11, center: lat: 62.323907, lng: -150.109291 , mapTypeId: "satellite", ); const bounds = new google.maps.LatLngBounds( new google.maps.LatLng(62.281819, -150.287132), new google.maps.LatLng(62.400471, -150.005608) ); // The photograph is courtesy of the U.S. Geological Survey. let image = " "; image += "examples/full/images/talkeetna.png"; /** * The custom USGSOverlay object contains the USGS image, * the bounds of the image, and a reference to the map. */ class USGSOverlay extends google.maps.OverlayView private bounds: google.maps.LatLngBounds; private image: string; private div?: HTMLElement; constructor(bounds: google.maps.LatLngBounds, image: string) super(); this.bounds = bounds; this.image = image; /** * onAdd is called when the map's panes are ready and the overlay has been * added to the map. */ onAdd() this.div = document.createElement("div"); this.div.style.borderStyle = "none"; this.div.style.borderWidth = "0px"; this.div.style.position = "absolute"; // Create the img element and attach it to the div. const img = document.createElement("img"); img.src = this.image; img.style.width = "100%"; img.style.height = "100%"; img.style.position = "absolute"; this.div.appendChild(img); // Add the element to the "overlayLayer" pane. const panes = this.getPanes()!; panes.overlayLayer.appendChild(this.div); draw() // We use the south-west and north-east // coordinates of the overlay to peg it to the correct position and size. // To do this, we need to retrieve the projection from the overlay. const overlayProjection = this.getProjection(); // Retrieve the south-west and north-east coordinates of this overlay // in LatLngs and convert them to pixel coordinates. // We'll use these coordinates to resize the div. const sw = overlayProjection.fromLatLngToDivPixel( this.bounds.getSouthWest() )!; const ne = overlayProjection.fromLatLngToDivPixel( this.bounds.getNorthEast() )!; // Resize the image's div to fit the indicated dimensions. if (this.div) this.div.style.left = sw.x + "px"; this.div.style.top = ne.y + "px"; this.div.style.width = ne.x - sw.x + "px"; this.div.style.height = sw.y - ne.y + "px"; /** * The onRemove() method will be called automatically from the API if * we ever set the overlay's map property to 'null'. */ onRemove() if (this.div) (this.div.parentNode as HTMLElement).removeChild(this.div); delete this.div; /** * Set the visibility to 'hidden' or 'visible'. */ hide() if (this.div) this.div.style.visibility = "hidden"; show() if (this.div) this.div.style.visibility = "visible"; toggle() if (this.div) if (this.div.style.visibility === "hidden") this.show(); else this.hide(); toggleDOM(map: google.maps.Map) if (this.getMap()) this.setMap(null); else this.setMap(map); const overlay: USGSOverlay = new USGSOverlay(bounds, image); overlay.setMap(map); const toggleButton = document.createElement("button"); toggleButton.textContent = "Toggle"; toggleButton.classList.add("custom-map-control-button"); const toggleDOMButton = document.createElement("button"); toggleDOMButton.textContent = "Toggle DOM Attachment"; toggleDOMButton.classList.add("custom-map-control-button"); toggleButton.addEventListener("click", () => overlay.toggle(); ); toggleDOMButton.addEventListener("click", () => overlay.toggleDOM(map); ); map.controls[google.maps.ControlPosition.TOP_RIGHT].push(toggleDOMButton); map.controls[google.maps.ControlPosition.TOP_RIGHT].push(toggleButton);declare global interface Window initMap: () => void; window.initMap = initMap;index.ts Note: Read the guide on using TypeScript and Google Maps. JavaScript // This example adds hide() and show() methods to a custom overlay's prototype.// These methods toggle the visibility of the container .// overlay to or from the map.function initMap() const map = new google.maps.Map(document.getElementById("map"), zoom: 11, center: lat: 62.323907, lng: -150.109291 , mapTypeId: "satellite", ); const bounds = new google.maps.LatLngBounds( new google.maps.LatLng(62.281819, -150.287132), new google.maps.LatLng(62.400471, -150.005608) ); // The photograph is courtesy of the U.S. Geological Survey. let image = " "; image += "examples/full/images/talkeetna.png"; /** * The custom USGSOverlay object contains the USGS image, * the bounds of the image, and a reference to the map. */ class USGSOverlay extends google.maps.OverlayView bounds; image; div; constructor(bounds, image) super(); this.bounds = bounds; this.image = image; /** * onAdd is called when the map's panes are ready and the overlay has been * added to the map. */ onAdd() this.div = document.createElement("div"); this.div.style.borderStyle = "none"; this.div.style.borderWidth = "0px"; this.div.style.position = "absolute"; // Create the img element and attach it to the div. const img = document.createElement("img"); img.src = this.image; img.style.width = "100%"; img.style.height = "100%"; img.style.position = "absolute"; this.div.appendChild(img); // Add the element to the "overlayLayer" pane. const panes = this.getPanes(); panes.overlayLayer.appendChild(this.div); draw() // We use the south-west and north-east // coordinates of the overlay to peg it to the correct position and size. // To do this, we need to retrieve the projection from the overlay. const overlayProjection = this.getProjection(); // Retrieve the south-west and north-east coordinates of this overlay // in LatLngs and convert them to pixel coordinates. // We'll use these coordinates to resize the div. const sw = overlayProjection.fromLatLngToDivPixel( this.bounds.getSouthWest() ); const ne = overlayProjection.fromLatLngToDivPixel( this.bounds.getNorthEast() ); // Resize the image's div to fit the indicated dimensions. if (this.div) this.div.style.left = sw.x + "px"; this.div.style.top = ne.y + "px"; this.div.style.width = ne.x - sw.x + "px"; this.div.style.height = sw.y - ne.y + "px"; /** * The onRemove() method will be called automatically from the API if * we ever set the overlay's map property to 'null'. */ onRemove() if (this.div) this.div.parentNode.removeChild(this.div); delete this.div; /** * Set the visibility to 'hidden' or 'visible'. */ hide() if (this.div) this.div.style.visibility = "hidden"; show() if (this.div) this.div.style.visibility = "visible"; toggle() if (this.div) if (this.div.style.visibility === "hidden") this.show(); else this.hide(); toggleDOM(map) if (this.getMap()) this.setMap(null); else this.setMap(map); const overlay = new USGSOverlay(bounds, image); overlay.setMap(map); const toggleButton = document.createElement("button"); toggleButton.textContent = "Toggle"; toggleButton.classList.add("custom-map-control-button"); const toggleDOMButton = document.createElement("button"); toggleDOMButton.textContent = "Toggle DOM Attachment"; toggleDOMButton.classList.add("custom-map-control-button"); toggleButton.addEventListener("click", () => overlay.toggle(); ); toggleDOMButton.addEventListener("click", () => overlay.toggleDOM(map); ); map.controls[google.maps.ControlPosition.TOP_RIGHT].push(toggleDOMButton); map.controls[google.maps.ControlPosition.TOP_RIGHT].push(toggleButton);window.initMap = initMap;index.js Note: The JavaScript is compiled from the TypeScript snippet. CSS /* * Always set the map height explicitly to define the size of the div element * that contains the map. */#map height: 100%;/* * Optional: Makes the sample page fill the window. */html,body height: 100%; margin: 0; padding: 0;.custom-map-control-button background-color: #fff; border: 0; border-radius: 2px; box-shadow: 0 1px 4px -1px rgba(0, 0, 0, 0.3); margin: 10px; padding: 0 0.5em; font: 400 18px Roboto, Arial, sans-serif; overflow: hidden; height: 40px; cursor: pointer;.custom-map-control-button:hover background: rgb(235, 235, 235);style.css HTML Showing/Hiding Overlays index.html Try Sample Stackblitz.com CodeSandbox.io JSFiddle.net GitPod.io Google Cloud Shell 2ff7e9595c
Comments