0

I have a Leaflet map that contains options for users to draw lines, i need to enrich the drawn lines with elevation data from Mapquest elevation API.

here is my code:

drawData = drawnItems.toGeoJSON();
var ele = $.getJSON('http://open.mapquestapi.com/elevation/v1/profile?key=tHXSNAGXRx6LAoBNdgjjLycOhGqJalg7&shapeFormat=raw&latLngCollection='+drawData);

but i can't pass that variable which contains drawn data into the API, maybe i have used the wrong parameter.

I'm OK with any other API/option that could help with calculating elevations for drawn lines by users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.