entity = RandomEntity["Country"]
cities = CityData[{Large, CanonicalName@entity}]
Manipulate[
{PopupMenu[x, cities], PopupMenu[y, cities]},
Button["Random", entity = RandomEntity["Country"]],
Dynamic[DynamicGeoGraphics[{GeoMarker[cities],
GeoPath[{x, y}, "Geodesic"]}]]]
I have these lines of code and I want to create a geographic map that creates a GeoPath from city x to city y based on what the user chooses from the popup menu. The output is not working. What am I doing wrong?