Commit 1b517b86 authored by Jean-Marie Favreau's avatar Jean-Marie Favreau
Browse files

Use npm to install dpendancies

parent d2020dcf
......@@ -2,11 +2,11 @@
## Installation
In this directory, install leaflet:
In this directory, install dependancies using ```npm```:
* ```npm i leaflet```
* ```npm i```
Leaflet will be installed in ```node_modules/leaflet/dist/```
Leaflet, JQuery, Bootstrap and Boostrap-dark will be installed in ```node_modules/```.
Install on your computer an http server (such as apache), or move this directory in a web server, such that ```evaluate.html``` is reachable via ```http``` or ```https``` protocol.
......
......@@ -4,25 +4,20 @@
<meta charset="UTF-8">
<title>Crossroad segmentation quality evaluation</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-uWxY/CJNBR+1zjPWmfnSnVxwRheevXITnMqoEIeG1LJrdI0GlVs/9cVSyPYXdcSF" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@forevolve/bootstrap-dark@1.0.0/dist/css/bootstrap-dark.min.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""/>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-kQtW33rZJAHjgefvhyyzcGF3C5TFyBQBA13V1RKPf4uH+bwyzQxZ6CmMZHmNBEfJ" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""></script>
<!-- bootstrap -->
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="node_modules/bootstrap//dist/js/bootstrap.bundle.min.js" ></script>
<!-- bootstrap dark -->
<link rel="stylesheet" href="node_modules/bootstrap-dark/src/bootstrap-dark.css" />
<!-- jquery -->
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<!-- Library Leaflet -->
<link rel="stylesheet" href="node_modules/leaflet/dist/leaflet.css" />
<script src="node_modules/leaflet/dist/leaflet.js"></script>
<link rel="stylesheet" data-key="VOTRE-CLEF" href="node_modules/geoportal-extensions-leaflet/dist/GpPluginLeaflet.css" />
<script src="js/evaluate-segmentation.js"></script>
<script>
......@@ -157,7 +152,7 @@
}
// right side
evalute_crossroad(window.crossroads[window.crossroads_index[window.current_id]], "crossroad-rendering", "crossroad_link");
render_crossroad(window.crossroads[window.crossroads_index[window.current_id]], "crossroad-rendering", "crossroad_link");
}
// get answers from the form and store them in the data structure (that contains the initial json)
......
......@@ -4,22 +4,15 @@
<meta charset="UTF-8">
<title>Crossroad quality evaluation</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-uWxY/CJNBR+1zjPWmfnSnVxwRheevXITnMqoEIeG1LJrdI0GlVs/9cVSyPYXdcSF" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@forevolve/bootstrap-dark@1.0.0/dist/css/bootstrap-dark.min.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""/>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-kQtW33rZJAHjgefvhyyzcGF3C5TFyBQBA13V1RKPf4uH+bwyzQxZ6CmMZHmNBEfJ" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""></script>
<!-- Library Leaflet -->
<link rel="stylesheet" href="node_modules/leaflet/dist/leaflet.css" />
<script src="node_modules/leaflet/dist/leaflet.js"></script>
<!-- bootstrap -->
<link href="node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="node_modules/bootstrap//dist/js/bootstrap.bundle.min.js" ></script>
<!-- bootstrap dark -->
<link rel="stylesheet" href="node_modules/bootstrap-dark/src/bootstrap-dark.css" />
<!-- jquery -->
<script src="node_modules/jquery/dist/jquery.min.js"></script>
</head>
<body>
......
......@@ -40,7 +40,7 @@ Colors.list = function(nb) {
};
function evalute_crossroad(current_crossroad, divID, crossroadLinksID) {
function render_crossroad(current_crossroad, divID, crossroadLinksID) {
// sort using first branches, then crossroad core
current_crossroad.sort((x1, x2) => x1["type"].localeCompare(x2["type"]));
......
{
"name": "crossroad evaluation",
"version": "0.0.1",
"lockfileVersion": 1,
"dependencies": {
"bootstrap": "^5.1.3",
"bootstrap-dark": "^1.0.3",
"jquery": "^3.6.0",
"leaflet": "^1.7.1"
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment