'.NL;
if ($this->getConf ('useMap')) {
if (!is_dir (realpath (__DIR__.'/../../ol3')))
$renderer->doc .= '
ol3 plugin not installed (see doc)
';
$renderer->doc .= '
'.NL;
}
break;
case DOKU_LEXER_UNMATCHED :
$data = trim ($data);
$address ="";
if ($this->getConf ('useMap'))
$renderer->doc .= '
'.$this->getLang ('reactiveMap').''.NL;
$renderer->doc .= '
'.NL;
global $scheduleInseeCities;
if (! empty ($data))
foreach (explode ("\n", preg_replace ('%~[eE][nN][dD]~%', "\n", $data)) as $line) {
$line = trim (preg_replace ("/#.*$/", "", $line));
if (!$line)
continue;
$line = preg_replace ("#\s+\|#", "|", $line);
$line = preg_replace ("#\|\s+#", "|", $line);
$line = trim ($line,'|');
list ($insee, $lat, $lon, $addr, $occ) = explode ("|", $line);
// XXX vérif des formats (nombres, ...)
if (!$insee || !$lon) {
if ($insee && $lat)
$renderer->doc .= ' - 56000
'.NL; // XXX position par defaut
continue;
}
if ($insee && $lat && $lon) {
$iter=$occ?$occ:1;
for ($i = 1; $i <= $iter; $i++)
$renderer->doc .= ' - '.$insee.'
'.NL;
}
$addrHtml =
($addr ?
preg_replace ('%\\\\\\\\%', "
", preg_replace ('%~[bB][rR]~%', "
", $addr)) :
''.$this->lang ('toComplet').'
').' '.
// XXX all insee ???
(isset ($scheduleInseeCities[$insee]) ? $scheduleInseeCities[$insee][0] : $insee).'
'.
(($addr && $lat && $lon) ?
'(Lat. : '.$lat.' Long. : '.$lon.')' :
'');
$address .=
''.NL.
'
'.$addrHtml.'
'.NL.
'
'.NL;
}
$renderer->doc .=
'
'.NL.
'