Skip to content

Commit

Permalink
Remove Bluesky now that we have Google, for less user confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Aug 27, 2024
1 parent b944e15 commit 7041221
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
9 changes: 1 addition & 8 deletions src/lib/map/Basemap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
import { CollapsibleCard, SecondaryButton, Select } from "govuk-svelte";
import { styleChoice } from "./stores";
let bluesky = "bluesky-api-key";
let os = "os-api-key";
let google = "google-api-key";
let privateChoices = [
[google, "Google satellite imagery"],
[bluesky, "Bluesky satellite imagery"],
[os, "Ordnance Survey"],
];
Expand All @@ -29,9 +27,7 @@
// Immediately switch to the new basemap after entering a key
if (value && value.length > 0) {
if (key == bluesky) {
$styleChoice = "bluesky";
} else if (key == os) {
if (key == os) {
$styleChoice = "os-road";
} else if (key == google) {
$styleChoice = "google";
Expand All @@ -45,9 +41,6 @@
if (checkKey(google)) {
list.push(["google", "Google satellite"]);
}
if (checkKey(bluesky)) {
list.push(["bluesky", "Bluesky Satellite (12.5cm)"]);
}
if (checkKey(os)) {
list.push(["os-road", "Ordnance Survey MasterMap"]);
}
Expand Down
6 changes: 1 addition & 5 deletions src/lib/map/MapLibreMap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
choice: string,
): Promise<string | StyleSpecification> {
googleKeys = null;
if (choice == "google" || choice == "bluesky" || choice == "os-road") {
if (choice == "google" || choice == "os-road") {
let tiles;
if (choice == "google") {
let apiKey = window.localStorage.getItem("google-api-key") || "";
Expand All @@ -39,10 +39,6 @@
attribution = await getGoogleAttribution(apiKey, sessionKey);
googleKeys = [apiKey, sessionKey];
} else if (choice == "bluesky") {
let apiKey = window.localStorage.getItem("bluesky-api-key") || "";
tiles = `https://ogc.apps.midgard.airbusds-cint.com/apgb/wmts/rest/apgb:AP-12CM5-GB-LATEST/default/EPSG-3857/EPSG:3857:{z}/{y}/{x}?GUID=${apiKey}&format=image/png&TRANSPARENT=FALSE`;
attribution = "Bluesky";
} else {
let apiKey = window.localStorage.getItem("os-api-key") || "";
tiles = `https://api.os.uk/maps/raster/v1/zxy/Road_3857/{z}/{x}/{y}.png?key=${apiKey}`;
Expand Down
5 changes: 0 additions & 5 deletions src/lib/map/stores.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ function getDefaultStyle(): string {
return "google";
}

let blueskyKey = window.localStorage.getItem("bluesky-api-key") || "";
if (blueskyKey.length > 0) {
return "bluesky";
}

let osKey = window.localStorage.getItem("os-api-key") || "";
if (osKey.length > 0) {
return "os-road";
Expand Down
2 changes: 1 addition & 1 deletion src/routes/route_check/route_map/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
let cfg = {
layerZorder: [
// Bluesky
// Google
"raster-basemap",
// The route tool
Expand Down

0 comments on commit 7041221

Please sign in to comment.