mirror of
https://gitlab.aliens-lyon.fr/encartes/web-interface.git
synced 2026-03-18 15:11:04 +01:00
noms des salles mais c'est illisible
This commit is contained in:
parent
84ff1c91d2
commit
935584ad6b
@ -4,7 +4,9 @@ import { Popup } from 'react-leaflet/Popup';
|
|||||||
import {Polygon} from 'react-leaflet/Polygon';
|
import {Polygon} from 'react-leaflet/Polygon';
|
||||||
import { LayersControl } from 'react-leaflet/LayersControl'
|
import { LayersControl } from 'react-leaflet/LayersControl'
|
||||||
import { LayerGroup } from 'react-leaflet/LayerGroup'
|
import { LayerGroup } from 'react-leaflet/LayerGroup'
|
||||||
|
import { Tooltip } from 'react-leaflet/Tooltip'
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import L from 'leaflet';
|
||||||
import request2 from "./M-GN1-2.json"
|
import request2 from "./M-GN1-2.json"
|
||||||
import request3 from "./M-GN1-3.json"
|
import request3 from "./M-GN1-3.json"
|
||||||
import request4 from "./M-GN1-4.json"
|
import request4 from "./M-GN1-4.json"
|
||||||
@ -46,6 +48,7 @@ function min_max(request)
|
|||||||
function list_polygons(request, center, ratio, ind)
|
function list_polygons(request, center, ratio, ind)
|
||||||
{
|
{
|
||||||
let polygons = [];
|
let polygons = [];
|
||||||
|
let tarace = 0;
|
||||||
for (const k in request)
|
for (const k in request)
|
||||||
{
|
{
|
||||||
polygons = [...polygons, ((request[k]).map((y) => {
|
polygons = [...polygons, ((request[k]).map((y) => {
|
||||||
@ -63,7 +66,7 @@ function list_polygons(request, center, ratio, ind)
|
|||||||
return [(z[1]-center[1])/25, (z[0]-center[0])/25];
|
return [(z[1]-center[1])/25, (z[0]-center[0])/25];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})).map((x) => {return <Polygon positions={x} key={k} pathOptions={{color: 'grey'}}><Popup>Popup</Popup></Polygon>})];
|
})).map((x) => {tarace = tarace+1; return <Polygon positions={x} key={k} pathOptions={{color: 'grey'}}><Tooltip permanent direction={tarace % 2 === 0 ? "bottom" : "top"}>{k}</Tooltip><Popup>Popup</Popup></Polygon>})];
|
||||||
}
|
}
|
||||||
return polygons;
|
return polygons;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user