5
$\begingroup$

I would like to add a BarLegend for the elevation values used by the GeoBackground -> GeoStyling["ReliefMap"] option of GeoGraphics.

Here's my code:

GeoGraphics[{GeoMarker[{5.52, -73.08}]  }, GeoBackground ->  GeoStyling["ReliefMap", ColorFunction -> ColorData["LightTerrain"]],  GeoRange -> 8000 ]

I would like to produce the BarLegend giving the scale of the terrain elevations used in the background of my GeoGraphics.

Thanks a lot.

$\endgroup$
5
$\begingroup$
minmax = QuantityMagnitude @ MinMax @ 
  GeoElevationData[GeoDisk[GeoPosition[{5.52, -73.08}], 8000]];
legend = BarLegend[{"LightTerrain" , minmax}];

Legended[GeoGraphics[{GeoMarker[{5.52, -73.08}]}, 
  GeoBackground ->  GeoStyling["ReliefMap", ColorFunction -> "LightTerrain" ],  
  GeoRange -> 8000], legend]

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you sooo much. Cheers! $\endgroup$ Nov 8 '18 at 23:25

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.