entity = RandomEntity["Country"]
cities = CityData[{Large, CanonicalName@entity}]

 {PopupMenu[x, cities], PopupMenu[y, cities]},
 Button["Random", entity = RandomEntity["Country"]], 
    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?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.