<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://www.helmstedt-wiki.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3ACoordinates%2Fkml</id>
	<title>Modul:Coordinates/kml - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://www.helmstedt-wiki.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3ACoordinates%2Fkml"/>
	<link rel="alternate" type="text/html" href="https://www.helmstedt-wiki.de/index.php?title=Modul:Coordinates/kml&amp;action=history"/>
	<updated>2026-04-06T14:59:58Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Helmstedt-Wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://www.helmstedt-wiki.de/index.php?title=Modul:Coordinates/kml&amp;diff=28322&amp;oldid=prev</id>
		<title>Admin: AZ: Die Seite wurde neu angelegt: local coordinates = { suite  = &quot;Coordinates/kml&quot;,                       serial = &quot;2018-04-02&quot;,                       item   = 50976437 } --[=[ Overcome a limitation in kmlexport in 2018.  There are three functions below which might be copied into an existing        Module:Coordinates (d:Q7348344) or this module might be used stand-alone.  In templates it can be used then by         {{#invoke…</title>
		<link rel="alternate" type="text/html" href="https://www.helmstedt-wiki.de/index.php?title=Modul:Coordinates/kml&amp;diff=28322&amp;oldid=prev"/>
		<updated>2025-01-10T09:27:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=Hilfe:Zusammenfassung_und_Quellen&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Hilfe:Zusammenfassung und Quellen (Seite nicht vorhanden)&quot;&gt;AZ&lt;/a&gt;: Die Seite wurde neu angelegt: local coordinates = { suite  = &amp;quot;Coordinates/kml&amp;quot;,                       serial = &amp;quot;2018-04-02&amp;quot;,                       item   = 50976437 } --[=[ Overcome a limitation in kmlexport in 2018.  There are three functions below which might be copied into an existing        &lt;a href=&quot;/index.php?title=Modul:Coordinates&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Modul:Coordinates (Seite nicht vorhanden)&quot;&gt;Module:Coordinates&lt;/a&gt; (&lt;a href=&quot;/index.php?title=D:Q7348344&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;D:Q7348344 (Seite nicht vorhanden)&quot;&gt;d:Q7348344&lt;/a&gt;) or this module might be used stand-alone.  In templates it can be used then by         {{#invoke…&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local coordinates = { suite  = &amp;quot;Coordinates/kml&amp;quot;,&lt;br /&gt;
                      serial = &amp;quot;2018-04-02&amp;quot;,&lt;br /&gt;
                      item   = 50976437 }&lt;br /&gt;
--[=[&lt;br /&gt;
Overcome a limitation in kmlexport in 2018.&lt;br /&gt;
&lt;br /&gt;
There are three functions below which might be copied into an existing&lt;br /&gt;
       [[Module:Coordinates]] ([[d:Q7348344]])&lt;br /&gt;
or this module might be used stand-alone.&lt;br /&gt;
&lt;br /&gt;
In templates it can be used then by&lt;br /&gt;
        {{#invoke:Coordinates|kmlTitle|Some title for geohack}}&lt;br /&gt;
or respectively (as is)&lt;br /&gt;
        {{#invoke:Coordinates/kml|kmlTitle|Some title for geohack}}&lt;br /&gt;
]=]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
coordinates.utf8max2bytes = function ( adjust )&lt;br /&gt;
    -- Save characters &amp;gt; 0x7FF by simplification&lt;br /&gt;
    -- Precondition:&lt;br /&gt;
    --     adjust  -- string to be adjusted&lt;br /&gt;
    -- Postcondition:&lt;br /&gt;
    --     returns  string&lt;br /&gt;
    local r = adjust&lt;br /&gt;
    local lucky, translate = pcall( mw.loadData,&lt;br /&gt;
                                    &amp;quot;Module:Sort/utf8max2bytes&amp;quot; )&lt;br /&gt;
    if type( translate ) == &amp;quot;table&amp;quot; then&lt;br /&gt;
        local Sort&lt;br /&gt;
        lucky, Sort = pcall( require, &amp;quot;Module:Sort&amp;quot; )&lt;br /&gt;
        if type( Sort ) == &amp;quot;table&amp;quot; and&lt;br /&gt;
           type( Sort.Sort ) == &amp;quot;function&amp;quot; then&lt;br /&gt;
           Sort = Sort.Sort()&lt;br /&gt;
            if type( Sort ) == &amp;quot;table&amp;quot; and&lt;br /&gt;
               type( Sort.lex ) == &amp;quot;function&amp;quot; then&lt;br /&gt;
                local s = Sort.lex( r, translate )&lt;br /&gt;
                if type( s ) == &amp;quot;string&amp;quot; then&lt;br /&gt;
                    r = s&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    return r&lt;br /&gt;
end -- coordinates.utf8max2bytes()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
coordinates._kmlTitle = function ( adjust )&lt;br /&gt;
    -- Hack kmlexport title as of 2018 UTF-8 limitation&lt;br /&gt;
    -- Precondition:&lt;br /&gt;
    --     adjust  -- string to be adjusted&lt;br /&gt;
    -- Postcondition:&lt;br /&gt;
    --     returns  string&lt;br /&gt;
    local pattern = mw.ustring.char( 91, 0x0800, 45, 0x7FFFF, 93 )&lt;br /&gt;
    local r = mw.text.decode( adjust, true )&lt;br /&gt;
    r = mw.text.trim( r )&lt;br /&gt;
    if mw.ustring.find( r, pattern ) then&lt;br /&gt;
        r = coordinates.utf8max2bytes( r )&lt;br /&gt;
        r = mw.ustring.gsub( r, pattern, &amp;quot;&amp;quot; )&lt;br /&gt;
    end&lt;br /&gt;
    if mw.text.trim( r ) == &amp;quot;&amp;quot; then&lt;br /&gt;
        -- fall back to original string if all characters removed&lt;br /&gt;
        r = adjust&lt;br /&gt;
    end&lt;br /&gt;
    return r&lt;br /&gt;
end -- coordinates._kmlTitle()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
coordinates.kmlTitle = function ( frame )&lt;br /&gt;
    -- #invoke to adjust kmlexport title&lt;br /&gt;
    local r = frame.args[ 1 ]&lt;br /&gt;
    if r and r ~= &amp;quot;&amp;quot; then&lt;br /&gt;
        r = coordinates._kmlTitle( r )&lt;br /&gt;
    end&lt;br /&gt;
    return r or &amp;quot;&amp;quot;&lt;br /&gt;
end -- coordinates.kmlTitle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return coordinates&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>