pigeon-maps
pigeon-maps copied to clipboard
Any provider to integrate bing satellite imagery?
My current solution doesn't work
Source (related):
const getLatLng = (x: number, y: number, z: number) => {
const radius = 200;
var latRads = Math.acos(y / radius);
var lngRads = Math.atan2(z, x);
var lat = (Math.PI / 2 - latRads) * (180 / Math.PI);
var lng = (Math.PI - lngRads) * (180 / Math.PI);
return [lat, lng - 180];
};
const providerBing = (x: number, y: number, z: number, dpr?: number) => {
const latLon = getLatLng(x, y, z);
// console.debug(latLon);
return `https://dev.virtualearth.net/REST/V1/Imagery/Map/Aerial/${latLon[0]},${latLon[1]}/${z}?ms=1024,104&key=${mapboxApiKey}`;
};
Sandbox to quickly debug: https://codesandbox.io/s/tile-boundary-8mo96w?file=/src/App.tsx
This is more of a support question, but couldn't find that discussion tab, so I'm creating this issue. Thanks.