Message Boards Message Boards

How to animate a GeoPath on top of a map

Posted 9 years ago
POSTED BY: Howard Grigg
4 Replies

Some typical example:

capitals = EntityValue[CountryData["Europe"], "CapitalCity"]

positions = EntityValue[capitals, "Position"];
{distance, order} = FindShortestTour[positions];

imgs = ParallelTable[
  GeoGraphics[{
    Red, Thick, GeoPath[positions[[order[[;; k]]]]],
    Red, PointSize[.02], Point[positions]},
   GeoCenter -> GeoPosition[{54.78, 5.73}],
   GeoProjection -> "Equirectangular",
   GeoRange -> {{30, 83}, {-25, 40}},
   ImageSize -> 500]
  , {k, 1, 52}]

If you are working in the Wolfram Cloud:

CloudExport[imgs, "GIF", Permissions -> "Public"]

And for the desktop:

Export["test.gif", imgs]

enter image description here

POSTED BY: Vitaliy Kaurov
Posted 9 years ago

Something like this?

enter image description here

POSTED BY: Sandu Ursu
Posted 9 years ago
POSTED BY: Sandu Ursu
Posted 9 years ago
POSTED BY: Howard Grigg
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract