2
$\begingroup$

I start with the following "annotation function":

 AnnotatedArrow[p_, q_, label_] := {Arrowheads[{{.1, .5, 
     Graphics[Inset[Style[label, Medium], {Center, Top}]]}, {.1, 1}}],
   Arrow[{p, q}]}

and use it to annotate the arrow (vector) in the following example:

 Graphics[{AnnotatedArrow[{0, 0}, {0, -1}, "Radius = 60 miles"], Circle[]}]

Similarly; I want to be able to annotate a vector using GeoGraph. The center of a circle is given by:

 center = GeoPosition[{30.731064, -86.474072}]

The radius of the circle has length 60 miles:

 radius = Interpreter["Quantity"]["60 miles"] 

Next; Alpha is the angle of rotation for the arrow-vector (which has its tail at the center but, the tip is pointing North by default; i.e., Alpha = 0 ). I want the vector pointing South, so; the vector must be rotated 180 degrees clockwise; i.e. Alpha = 180:

 \[Alpha] = Interpreter["Quantity"]["180 degree"]

 arrowtiplocation = GeoDestination[center, GeoDisplacement[{radius, \[Alpha]}]]

 GeoGraphics[Arrow[GeoPosition[{center, arrowtiplocation}]]]

I verify that the vector has a magnitude of 60 miles as follows:

 GeoDistance[center, arrowtiplocation]

Finally; when I attempt to annotate the vector using my annotation function above; I get the following picture:

GeoGraphics[{AnnotatedArrow[center, arrowtiplocation, "Radius = 60 miles"], GeoCircle[center, radius]}]

The vector shows but, the annotation does not carry through. Are there easier ways to annotate a vector within GeoGraph? Thank you.

$\endgroup$
2
$\begingroup$
 pointtodisplacetitle = GeoPosition[{30.65, -86.35}]

 GeoGraphics[
   {GeoCircle[center, radius], 
    Arrow[GeoPosition[{center, arrowtiplocation}]], 
    Inset[Style["Radius = 60 miles", 20], 
    pointtodisplacetitle, 
    Right, 
    Automatic, 
   {0, 1}]}]
$\endgroup$

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.