turf shortest path
by bulutkartal
HTML
<script src="https://npmcdn.com/@turf/[email protected]/turf.min.js"></script>
<div id="map"></div>
<!-- Replace the value of the key parameter with your own API key. -->
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCkUOdZ5y7hMm0yrcCQoCvLwzdM6M8s5qk&callback=initMap">
</script>
<script async defer>
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 5,
minZoom: 1,
center: {
lat: -6,
lng: 2
},
streetViewControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
</script>
CSS
html,
body,
#map {
height: 100%;
width: 100%;
padding: 0px;
margin: 0px;
}