GIScience / Leaflet.Heightgraph

Leaflet plugin to visualize height information and road attributes.
https://giscience.github.io/Leaflet.Heightgraph
MIT License
100 stars 42 forks source link

Question: setting a different unit for Y-axis, i.e., for translation --> elevation #77

Open DrPDash opened 4 years ago

DrPDash commented 4 years ago

Is there a setting to change the unit of the elevation w/o changing the source code?

In my case, I'm customizing this to display ocean front gradient values and the unit is K/100km or some variant. A sample data file is attached (rename to .js to include in the file header) test.txt

Thank you

DrPDash commented 4 years ago

I am also struggling to figure out how to insert 'properties' in FeatureCollection. The example .js file provided with the plugin is not a valid geoJSON (fair enough) and properties cannot be specified for a FeatureCollection but only for features. When I read a geojson data dynamically, need to append the following leading and trailing blocks:

{
    "type": "FeatureCollection",
    "features": [
      **<<insert A valid geojson feature>>**
    ],
    "properties": {
        "Creator": "https://www.star.nesdis.noaa.gov/star/socd_index.php",
        "records": 1,
        "summary": "steepness"
    }
}

My question is, can the 2nd set of properties at the bottom be specified externally to the plugin?