1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
sTmpHTM=[
<html>
<head>
<title>%1</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin="" />
<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet-routing-machine@latest/dist/leaflet-routing-machine.css" />
</head>
<body>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin=""></script>
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
<script src="https://unpkg.com/leaflet-routing-machine@latest/dist/leaflet-routing-machine.js"></script>
<div id="mapid" style="width: %2; height: %3px;"></div>
<script>
var mymap = L.map('mapid').setView([%5, %6], %4);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
minZoom: 1,
maxZoom: 20
})
.addTo(mymap);
L.Routing.control({
routeWhileDragging: true,
geocoder: L.Control.Geocoder.nominatim(),
router: new L.Routing.osrmv1({
language: 'fr',
profile: 'satelite',
show : true,
routeWhileDragging: true
})
}).addTo(mymap);
]
//sMesWaypointBoucle = sMesWaypointBoucle + ChaîneConstruit("L.latLng(%1,%2), ",stCurPoint.rLatitude,stCurPoint.rLongitude)
POUR TOUT stCurPoint DE tabCurPoints
sTmpPoint = SetPoint(stCurPoint)
sTmpHTM = sTmpHTM+sTmpPoint
SI stCurPoint.rLatitude<>0 ET stCurPoint.rLongitude<>0 ALORS
rMoyLat = rMoyLat+stCurPoint.rLatitude
rMoyLon = rMoyLon+stCurPoint.rLongitude
nBPoint = nBPoint+1
FIN
FIN
SI nBPoint>0 ALORS
rMoyLat = rMoyLat/nBPoint
rMoyLon = rMoyLon/nBPoint
FIN
sTmpHTM=sTmpHTM+[
</script>
<body>
<html>
]
RENVOYER ChaîneConstruit(sTmpHTM,sMonTitre,nMapLargeur,nMapHauteur,nZoomInit,rMoyLat,rMoyLon) |
Partager