• JMap.Project.getElevationAtLocation

    Gets the elevation of the Terrain associated with the project for the given location.

    Parameters

    Returns Promise<number | null>

    the elevation at the given location, or null if no elevation data is available at that location.

    Throws

    if location is invalid or if there is no terrain associated with the project.

    Example

    // get the elevation
    if (JMap.Project.hasTerrain()) {
    JMap.Project.getElevationAtLocation({x:-73.591205, y:45.505216})
    .then(elevation => {
    if(elevation !== null){
    console.log(`Elevation at x:-73.591205, y:45.505216 is ${elevation}`)
    }else{
    console.log("No elevation data available for location x:-73.591205, y:45.505216")
    }
    })
    }else{
    console.log("there is no terrain associated with this project.")
    }