Message Boards Message Boards

Use Manipulate to obtain maps with CountryData

In Help information we have this little program, that I modified

Graphics[{White, CountryData["Italy", "Polygon"], PointSize[Large], 
  Red, Point[Reverse[CityData[#, "Coordinates"]]] & /@ 
   CityData[{Large, "Italy"}]}, ImageSize -> {250, 250}]

I want use Manipulate to obtain map of all country. What is the solution ? I rarely use Manipulate and the solutions proposed in the Help of Manipulate don't work.

POSTED BY: André Dauphiné
2 Replies

Thanks very much A. D

POSTED BY: André Dauphiné
Posted 4 years ago

Hi André,

Is this what you are looking for?

Manipulate[
 Graphics[{EdgeForm[Black], LightGray, 
   CountryData[country, "Polygon"], PointSize[Large], Red, 
   Point[Reverse[CityData[#, "Coordinates"]]] & /@ 
    CityData[{Large, country}]}, ImageSize -> {250, 250}], {country, 
  CountryData[] // CanonicalName, ControlType -> PopupMenu}]

enter image description here

POSTED BY: Rohit Namjoshi
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