Skip to content

Commit f95bd86

Browse files
author
hernanmd
committed
Added TerritoryUIList
1 parent 4d25fa0 commit f95bd86

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

Territorial.md

+26-22
Original file line numberDiff line numberDiff line change
@@ -253,15 +253,26 @@ unm49 sortedTerritoryNames. " --> a SortedCollection('Afghanistan' 'Albania' 'Al
253253
unm49 territoryNames. " --> a Set('Sierra Leone' 'Guadeloupe' 'Niger' 'Jordan' 'Aruba' ... 'Saudi Arabia' 'Austria' 'Vanuatu' 'Denmark' 'Lao People''s Democratic Republic')"
254254
```
255255

256+
Countries could be displayed in a friendly-way using a list selector:
257+
258+
```smalltalk
259+
TerritoryUIList open
260+
title: 'United Nations Countries';
261+
roots: (TCountryOrganization @ 'UN.M49') sortedTerritories.
262+
```
263+
264+
![United Nations Countries](images\2016\01\United_Nations_Countries.jpg){ width=50% }
265+
266+
\pagebreak
267+
256268
### Accessing Countries
257269

258270
The UN.M49 is the default organization chosen to resolve Country objects using a shortcut with any String matching a country name, for example:
259271

260272
```smalltalk
261273
'Bulgaria' asTerritorialCountry.
262274
```
263-
![](images\2016\01\Territorial_Screenshot_Bulgaria.jpg)
264-
_Inspecting Bulgaria as an United Nations country_
275+
![Inspecting Bulgaria as an United Nations country](images\2016\01\Territorial_Screenshot_Bulgaria.jpg){ width=70% }
265276

266277
The country resolver can be changed to any of the available country organizations (see _Accessing Country Organizations_), and can be easily done by evaluating:
267278

@@ -276,8 +287,8 @@ Evaluating the expression again reflects the territorial object retrieved throug
276287
" Reset to default "
277288
TCountryOrganization currentOrganization: 'UN.M49'.
278289
```
279-
![](images\2016\01\Territorial_Screenshot_Bulgaria_ISO3166-3.jpg)
280-
_Inspecting Bulgaria as an ISO 3166-3 country_
290+
291+
![Inspecting Bulgaria as an ISO 3166-3 country](images\2016\01\Territorial_Screenshot_Bulgaria_ISO3166-3.jpg){ width=70% }
281292

282293
If the country is not registered in the selected organization, the resolver will raise an Error exception. For example, selecting the _Council of Arab Economic Unity_ as source organization for countries and then searching for a non-member country :
283294

@@ -390,6 +401,8 @@ TerritorialOpenGeoCodesCountryCapitals territorialCapitals.
390401

391402
Note: Only English names are supported in the current version.
392403

404+
\pagebreak
405+
393406
### Accessing Cities
394407

395408
In a perfect world, the following expression would be the most intuitive way to name a city:
@@ -830,9 +843,7 @@ TerritorialFlags currentCountryRepository openCountryFlagMediumNamed: 'mauritani
830843
TerritorialFlags currentCountryRepository openCountryFlagMediumNamed: 'belize'.
831844
```
832845

833-
![](images\2016\01\Territorial_Screenshot_Flags.jpg)
834-
835-
_Displaying country flags in Pharo_
846+
![Displaying country flags in Pharo](images\2016\01\Territorial_Screenshot_Flags.jpg)
836847

837848
\pagebreak
838849

@@ -906,8 +917,7 @@ TerritorialMaps currentRepository: TerritorialOSM
906917
'Paris@FR' asTerritorialCity openMap.
907918
```
908919

909-
![](images\2016\01\Paris_zl9.jpg)
910-
_Paris at zoom level = 9_
920+
![Paris at zoom level = 9](images\2016\01\Paris_zl9.jpg){ width=70% }
911921

912922
It is possible to change the OSM map provider by setting another OSM class repository:
913923

@@ -916,8 +926,7 @@ TerritorialMaps currentRepository: TerritorialOSM
916926
'Paris@FR' asTerritorialCity openMap.
917927
```
918928

919-
![](images\2016\01\Paris_zl13.jpg)
920-
_Paris at zoom level = 13_
929+
![Paris at zoom level = 13](images\2016\01\Paris_zl13.jpg){ width=70% }
921930

922931
## GoogleMaps
923932

@@ -1131,11 +1140,9 @@ The first window presents two choices:
11311140
- Create a new territorial composite or single territory.
11321141
- Browse already created territories.
11331142

1134-
![](images\2016\01\Territory Builder.jpg)
1135-
_Territorial Wizard_
1143+
![Territorial Wizard](images\2016\01\Territory Builder.jpg){ width=50% }
11361144

1137-
![](images\2016\01\Territory Viewer.jpg)
1138-
_Territory Viewer_
1145+
![Territory Viewer](images\2016\01\Territory Viewer.jpg){ width=50% }
11391146

11401147
### Browsing Territories
11411148

@@ -1145,20 +1152,17 @@ Browsing presents a new viewer window with in-image territories, and a Load butt
11451152

11461153
Composition of territories is sub-divided in two additional choices. Creating a new composite territory or creating/selecting a new single territory.
11471154

1148-
![](images\2016\01\Territory Composition.jpg)
1155+
![New Composite Territory](images\2016\01\Territory Composition.jpg){ width=50% }
11491156

11501157
Next to selection of a New Territory, the wizard request for a name to identify the new territory:
11511158

1152-
![](images\2016\01\Territory Builder_2.jpg)
1159+
![New Composite Territory name](images\2016\01\Territory Builder_2.jpg){ width=50% }
11531160

11541161
Finally, a Territory Composer is displayed where territories can be browsed and composed (or selected if a single territory was chosen).
11551162

1156-
![](images\2016\01\Territory Composer for CompositeTerritory2.jpg)
1157-
_Territory Composer for Composite selection_
1158-
1159-
![](images\2016\01\Territory Composer for TestTerritory3.jpg)
1160-
_Territory Composer for Single territory creation_
1163+
![Territory Composer for Composite selection](images\2016\01\Territory Composer for CompositeTerritory2.jpg){ width=75% }
11611164

1165+
![Territory Composer for Single territory creation](images\2016\01\Territory Composer for TestTerritory3.jpg){ width=75% }
11621166

11631167
\pagebreak
11641168

27.3 KB
Loading

0 commit comments

Comments
 (0)