I am very new to this and looks very interesting to me. Is there a way to create route between pointA and pointB based on elevation restriction. I am trying to use this for planes so doesn't need to follow any roads :)
IE: Elevation limit: 200 meters
pointA: 38°44′50″N , 090°21′41″W - Saint Louis Airport
pointB: 39°02′56″N , 084°40′04″W - Cincinnati Airport
How can I draw a route from pointA to pointB without exceeding elevation limit?
Thanks in advance...
$(document).ready(function() {
var path = [
{lat: 38.74722222, lng: -90.36138889}, // St Louis
{lat: 39.04888889, lng: -84.66777778}]; // Cincinnati
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 6,
maxZoom: 8,
minZoom: 1,
streetViewControl: false,
center: path[1],
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var flightPath = new google.maps.Polyline({
path: path,
geodesic: true,
strokeColor: '#FF0000',
strokeOpacity: 1.0,
strokeWeight: 2
});
flightPath.setMap(map);
});
html,
body,
#map {
height: 100%;
width: 100%;
padding: 0px;
margin: 0px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js"></script>
<div id="map"></div>