3
$\begingroup$

The following works:

p1=GeoPosition[Bunnel(city)];
With[{r=40mi},
 GeoGraphics[{Red,  GeoCircle[p1, r], Blue, PointSize[Large], Point[p1]},
   GeoScaleBar -> Placed["Miles", {Right,  Center}],
   Frame->True,
   PlotLabel -> Style[Framed["Bunnell,  Florida"], 16, Bold, Background -> Lighter[Yellow]],
   ImageSize -> 700]

The following (on the other hand) doesn't work:

p1=GeoPosition[Bunnel(city)];
With[{r=40mi},
 GeoGraphics[{Red,  GeoCircle[p1, r], Blue,  PointSize[Large], Point[p1]},
   GeoScaleBar -> Placed[{0, 40}mi, {Right,  Center}],
   Frame->True, 
   PlotLabel -> Style[Framed["Bunnell, Florida"], 16, Bold, Background -> Lighter[Yellow]],
   ImageSize -> 700]

GeoScaleBar seems to have a "bug"; it allows "km" (kilometers) but, not "mi" (miles). Thank you.

$\endgroup$
7
$\begingroup$

It actually seems to work fine. You may have been tripped up by the use of Quantity and units, which may be a tad less than intuitive sometimes:

p1 = GeoPosition[Entity["City", {"Bunnell", "Florida", "UnitedStates"}]];
With[{r = Quantity[40, "Kilometers"]},
 GeoGraphics[
  {Red, GeoCircle[p1, r], Blue, PointSize[Large], Point[p1]},
  GeoScaleBar -> Placed[Quantity[{0, 40}, "Kilometers"], p1],
  Frame -> True,
  PlotLabel -> 
   Style[Framed["Bunnell, Florida"], 16, Bold, Background -> Lighter[Yellow]],
  ImageSize -> 700
 ]
]

Mathematica graphics

Notice that I changed the positioning of the GeoScaleBar; since it accepts a position specified by GeoPosition, I used p1 to position the start of the scale bar exactly at the same position as the reported coordinates of the city.

$\endgroup$
  • $\begingroup$ Thank you for your help; I tested the above code with Miles and it works! $\endgroup$ – Gilmar Rodriguez-Pierluissi Jun 27 '16 at 14:30

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.