forked from emre/www_projectmycelium_com
update map with nodes dynamic
This commit is contained in:
@@ -34,7 +34,7 @@ export default function WorldMap({
|
||||
// Projects lat/lng to the SVG's 800x400 viewBox coordinates
|
||||
const projectPoint = (lat: number, lng: number) => {
|
||||
const x = (lng + 180) * (800 / 360);
|
||||
const y = (90 - lat) * (400 / 180);
|
||||
const y = (90 - lat) * (400 / 180) + 45;
|
||||
return { x, y };
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user