{
- this.nodes().map((node) =>
)
+ // Debug rect
+ //
+ }
+ {
+ this.nodes().map((node) => {
+ const location = node.location || [0, 0] as Types.NodeLocation;
+ // const location = [51.4825891, -0.0164137] as Types.NodeLocation; // Greenwich
+ // const location = [52.2330653, 20.921111] as Types.NodeLocation; // Warsaw
+ // const location = [48.8589507, 2.2770201] as Types.NodeLocation; // Paris
+ // const location = [36.7183391, -4.5193071]as Types.NodeLocation; // Malaga
+
+ return (
+
+ );
+ })
}
);
}
+ private pixelPosition(lat: Types.Latitude, lon: Types.Longitude): { left: number, top: number } {
+ const { map } = this.state;
+
+ const left = Math.round(((lon + 180) / 360) * map.width + map.left) - 35;
+ const top = Math.round(((-lat + 90) / 180) * map.height + map.top) + 4;
+
+ return { left, top }
+ }
+
private renderTable() {
return (