An app using Dijkstra algorithm to find the shortest path between different cities. https://dijkstra.ruihildt.xyz
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
905 B

import React from 'react';
import { SvgLoader, SvgProxy } from 'react-svgmt';
export default function Map({ highlighted }) {
return (
<div>
<SvgLoader
path='/belgium-map.svg'
style={{
width: '500px',
height: '500px',
}}
>
<SvgProxy selector='.ghent' fill={highlighted.ghent} />
<SvgProxy selector='.brussels' fill={highlighted.brussels} />
<SvgProxy selector='.antwerp' fill={highlighted.antwerp} />
<SvgProxy selector='.tournai' fill={highlighted.tournai} />
<SvgProxy selector='.mechelen' fill={highlighted.mechelen} />
<SvgProxy selector='.bruges' fill={highlighted.bruges} />
<SvgProxy selector='.mons' fill={highlighted.mons} />
<SvgProxy selector='.liege' fill={highlighted.liege} />
<SvgProxy selector='.namur' fill={highlighted.namur} />
<SvgProxy selector='.arlon' fill={highlighted.arlon} />
</SvgLoader>
</div>
);
}