7
$\begingroup$

I need to align a GeoMarker at the bottom left of the marker:

f = Framed[
   Style["Dill", FontColor -> Orange, FontSize -> 17, 
    FontFamily -> "CMU Serif Upright Italic", FontWeight -> Bold], 
   Background -> GrayLevel[0.9], RoundingRadius -> 5, 
   FrameMargins -> {{10, 10}, {5, 5}}, 
   FrameStyle -> Directive[Orange, Thickness@2], 
   ContentPadding -> False];

g = Graphics[{Orange, AbsoluteThickness[1.3], CapForm["Round"], 
    Line[{{0, 0}, {.5, .5}, {1, .5}}], 
    Inset[f, {1, .5}, ImageScaled[{0, .5}]], PointSize[0.2], 
    Point[{0, 0}]}];

enter image description here

Of course the bend in the graphics makes the positioning using Alignment->Left wrong:

enter image description here

which is exacerbated at higher zoom levels:

GeoGraphics[
 GeoMarker[GeoPosition[{64.147049`, -21.932949`}], g, 
  "Scale" -> Scaled[.4], "Alignment" -> Left], GeoZoomLevel -> 5, 
 ImageSize -> {200, 100}]

enter image description here

Until alignment of GeoMarkers is made more robust, ala Inset[g, pos, opos, size, dirs], does anyone know of a simple workaround?

$\endgroup$
6
$\begingroup$

I missed that "Alignment" can be set to Scaled[{0, 0}].

GeoGraphics[
 GeoMarker[GeoPosition[{64.147049`, -21.932949`}], g, 
  "Scale" -> Scaled[.4], "Alignment" -> ImageScaled[{0, 0}]], 
 GeoZoomLevel -> 18, ImageSize -> {200, 100}]

enter image description here

$\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.