Skip to content

Commit dce40e1

Browse files
committed
Geocache country and region improvements:
- deprecated the buggy 'country' and 'state' fields - added 'country2' and 'region' fields as replacement - better selection of regions for OCDE - added country name translation for OCPL (in 'country2') Includes implementation of some more non-released new geocache fields.
1 parent d71c62b commit dce40e1

File tree

2 files changed

+158
-48
lines changed

2 files changed

+158
-48
lines changed

okapi/services/caches/geocache/docs.xml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,10 @@
372372
</li>
373373
<li>
374374
<b>description</b> - <a href='%OKAPI:docurl:html%'>HTML string</a>,
375-
description of the cache,
375+
description of the cache; may include additional notices that
376+
are prepended or appended to the text, some of them depending on
377+
the <b>oc_team_annotation</b> and <b>attribution_append</b>
378+
options,
376379
</li>
377380
<li>
378381
<b>descriptions</b> - a dictionary (language code =&gt;
@@ -532,26 +535,35 @@
532535
<li><b>description</b> - plain-text longer description of the waypoint.</li>
533536
</ul>
534537
</li>
538+
<li class='deprecated'>
539+
<p><b>country</b> - deprecated; same as <b>country2</b>, but on
540+
some installations the language of the returned country name is
541+
undefined (it will not respond to the <b>langpref</b> parameter);
542+
also, on some installations the same country can have different
543+
names for different caches, and for some caches <b>null</b> will
544+
be returned.</p>
545+
</li>
535546
<li>
536-
<p><b>country</b> - name of the country the cache is placed in;
547+
<p><b>country2</b> - name of the country the cache is placed in;
537548
may be empty ("") if the country is unknown.</p>
538549

539550
<p><b>Note:</b> This data is user-supplied and is not validated in
540-
any way. Consider using external geocoding services instead. Also,
541-
currently you have no way of knowing in which language it will appear
542-
in. Only some OKAPI installations will localize it by the
543-
<b>langpref</b> parameter.</p>
551+
any way. Consider using external geocoding services instead.</p>
552+
</li>
553+
<li class='deprecated'>
554+
<p><b>state</b> - deprecated; same as <b>region</b>, but <b>null</b>
555+
may be returned instead of an empty string if the region is unknown.</p>
544556
</li>
545557
<li>
546-
<p><b>state</b> - name of the major subnational entity the cache
558+
<p><b>region</b> - name of the major subnational entity the cache
547559
is placed in; may be empty ("") if the entity is unknown. This may
548-
be a state, a region or whatever is the country's most relevant
549-
administrative entity below national level.</p>
560+
be a (federal) state, a province, a region or whatever is the
561+
country's most relevant administrative entity below national level.</p>
550562

551563
<p><b>Note:</b> On some installations this data is user-supplied and
552564
is not validated in any way. Other installations calculate it from
553565
cache coordinates but may have problems in border regions. Different
554-
OC sites may return different "states" for the same geocache.
566+
OC sites may return different regions for the same geocache.
555567
Consider using external geocoding services instead. Also,
556568
currently you have no way of knowing in which language it will appear
557569
in (but it *may* start to vary on the value of your <b>langpref</b>

0 commit comments

Comments
 (0)