https://de.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3AMapframe Modul:Mapframe - Versionsgeschichte 2025-05-25T12:13:33Z Versionsgeschichte dieser Seite in Wikipedia MediaWiki 1.45.0-wmf.2 https://de.wikipedia.org/w/index.php?title=Modul:Mapframe&diff=250167217&oldid=prev McBayne: kein Defaulttext 2024-11-09T00:29:18Z <p>kein Defaulttext</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 9. November 2024, 02:29 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 138:</td> <td colspan="2" class="diff-lineno">Zeile 138:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>L10n.defaults = {</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>L10n.defaults = {</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> display = L10n.str.inline,</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> display = L10n.str.inline,</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> text = "<del style="font-weight: bold; text-decoration: none;">Map</del>",</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> text = "",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameWidth = "300",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameWidth = "300",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameHeight = "200",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameHeight = "200",</div></td> </tr> </table> McBayne https://de.wikipedia.org/w/index.php?title=Modul:Mapframe&diff=230222058&oldid=prev Darkking3: von en:Module:Mapframe aktualisiert 2023-01-26T08:23:04Z <p>von <a href="https://en.wikipedia.org/wiki/Module:Mapframe" class="extiw" title="en:Module:Mapframe">en:Module:Mapframe</a> aktualisiert</p> <a href="//de.wikipedia.org/w/index.php?title=Modul:Mapframe&amp;diff=230222058&amp;oldid=190727613">Änderungen zeigen</a> Darkking3 https://de.wikipedia.org/w/index.php?title=Modul:Mapframe&diff=190727613&oldid=prev 178.191.230.235 am 24. Juli 2019 um 18:16 Uhr 2019-07-24T18:16:14Z <p></p> <a href="//de.wikipedia.org/w/index.php?title=Modul:Mapframe&amp;diff=190727613&amp;oldid=177384447">Änderungen zeigen</a> 178.191.230.235 https://de.wikipedia.org/w/index.php?title=Modul:Mapframe&diff=177384447&oldid=prev Karthoo am 13. Mai 2018 um 11:16 Uhr 2018-05-13T11:16:20Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 13. Mai 2018, 13:16 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 99:</td> <td colspan="2" class="diff-lineno">Zeile 99:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameWidth = "300",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameWidth = "300",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameHeight = "200",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameHeight = "200",</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> marker = "marker", -- Do not translate. For valid alternate values, see https://www.mediawiki.org/wiki/Maps/Icons</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> markerColor = "5E74F3",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> markerColor = "5E74F3",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> strokeColor = "#ff0000",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> strokeColor = "#ff0000",</div></td> </tr> </table> Karthoo https://de.wikipedia.org/w/index.php?title=Modul:Mapframe&diff=177382238&oldid=prev Evad37: Fix parsing of coords, per en:Module:Mapframe 2018-05-13T09:57:41Z <p>Fix parsing of coords, per <a href="https://en.wikipedia.org/wiki/Module:Mapframe" class="extiw" title="en:Module:Mapframe">en:Module:Mapframe</a></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 13. Mai 2018, 11:57 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 161:</td> <td colspan="2" class="diff-lineno">Zeile 161:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function parseCoords(coords)</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>function parseCoords(coords)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> local parts = mw.text.split((mw.ustring.match(coords,'[%.%d]+<del style="font-weight: bold; text-decoration: none;">°</del>[NS]<del style="font-weight: bold; text-decoration: none;"> </del>[%.%d]+<del style="font-weight: bold; text-decoration: none;">°</del>[EW]') or ''), '<del style="font-weight: bold; text-decoration: none;"> </del>')</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local parts = mw.text.split((mw.ustring.match(coords,'[%.%d]+<ins style="font-weight: bold; text-decoration: none;">_</ins>[NS]<ins style="font-weight: bold; text-decoration: none;">_</ins>[%.%d]+<ins style="font-weight: bold; text-decoration: none;">_</ins>[EW]') or ''), '<ins style="font-weight: bold; text-decoration: none;">_</ins>')</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local lat, long</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> latParts = mw.text.split(parts[1], '°')</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del style="font-weight: bold; text-decoration: none;">longParts</del> <del style="font-weight: bold; text-decoration: none;">= mw.text.split(</del>parts[2]<del style="font-weight: bold; text-decoration: none;">,</del> '<del style="font-weight: bold; text-decoration: none;">°</del>'<del style="font-weight: bold; text-decoration: none;">)</del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins style="font-weight: bold; text-decoration: none;">if</ins> parts[2]<ins style="font-weight: bold; text-decoration: none;"> ==</ins> '<ins style="font-weight: bold; text-decoration: none;">N</ins>'<ins style="font-weight: bold; text-decoration: none;"> then</ins></div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> lat = parts[1]</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> else</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> lat = '-'..parts[1]</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if parts[4] == 'E' then</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> long = parts[3]</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> else</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> long = '-'..parts[3]</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker"><a class="mw-diff-movedpara-right" title="Der Absatz wurde verschoben. Klicken, um zur alten Stelle zu springen." href="#movedpara_10_1_lhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_8_0_rhs"></a> return tonumber(<ins style="font-weight: bold; text-decoration: none;">lat</ins>), tonumber(<ins style="font-weight: bold; text-decoration: none;">long</ins>)</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if latParts[2] == 'S' then latParts[1] = '-'..latParts[1] end</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if longParts[2] == 'W' then longParts[1] = '-'..longParts[1] end</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"><a class="mw-diff-movedpara-left" title="Der Absatz wurde verschoben. Klicken, um zur neuen Stelle zu springen." href="#movedpara_8_0_rhs">&#x26AB;</a></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_10_1_lhs"></a> return tonumber(<del style="font-weight: bold; text-decoration: none;">latParts[1]</del>), tonumber(<del style="font-weight: bold; text-decoration: none;">longParts[1]</del>)</div></td> <td colspan="2" class="diff-empty diff-side-added"></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>end</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> </table> Evad37 https://de.wikipedia.org/w/index.php?title=Modul:Mapframe&diff=177381166&oldid=prev Karthoo am 13. Mai 2018 um 09:12 Uhr 2018-05-13T09:12:19Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 13. Mai 2018, 11:12 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 96:</td> <td colspan="2" class="diff-lineno">Zeile 96:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>L10n.defaults = {</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>L10n.defaults = {</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> display = L10n.str.inline,</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> display = L10n.str.inline,</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> text = "<del style="font-weight: bold; text-decoration: none;">Map</del>",</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> text = "<ins style="font-weight: bold; text-decoration: none;">Karte</ins>",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameWidth = "300",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameWidth = "300",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameHeight = "200",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> frameHeight = "200",</div></td> </tr> </table> Karthoo https://de.wikipedia.org/w/index.php?title=Modul:Mapframe&diff=177380971&oldid=prev Karthoo am 13. Mai 2018 um 09:03 Uhr 2018-05-13T09:03:43Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="de"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Nächstältere Version</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Version vom 13. Mai 2018, 11:03 Uhr</td> </tr><tr> <td colspan="2" class="diff-lineno">Zeile 43:</td> <td colspan="2" class="diff-lineno">Zeile 43:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Error messages</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- Error messages</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>L10n.error = {</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>L10n.error = {</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> badDisplayPara = "<del style="font-weight: bold; text-decoration: none;">Invalid</del> <del style="font-weight: bold; text-decoration: none;">display parameter</del>",</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> badDisplayPara = "<ins style="font-weight: bold; text-decoration: none;">Ungültiger</ins> <ins style="font-weight: bold; text-decoration: none;">Anzeigeparameter</ins>",</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> noCoords = "<del style="font-weight: bold; text-decoration: none;">Coordinates</del> <del style="font-weight: bold; text-decoration: none;">must</del> <del style="font-weight: bold; text-decoration: none;">be specified on</del> Wikidata <del style="font-weight: bold; text-decoration: none;">or</del> <del style="font-weight: bold; text-decoration: none;">in</del> |" .. L10n.para.coord .. "=",</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> noCoords = "<ins style="font-weight: bold; text-decoration: none;">Koordinaten</ins> <ins style="font-weight: bold; text-decoration: none;">müssen</ins> <ins style="font-weight: bold; text-decoration: none;">über</ins> Wikidata <ins style="font-weight: bold; text-decoration: none;">oder</ins> <ins style="font-weight: bold; text-decoration: none;">durch</ins> |" .. L10n.para.coord .. "=<ins style="font-weight: bold; text-decoration: none;"> angegeben werden</ins>",</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> wikidataCoords = "<del style="font-weight: bold; text-decoration: none;">Coordinates</del> <del style="font-weight: bold; text-decoration: none;">not</del> <del style="font-weight: bold; text-decoration: none;">found on</del> Wikidata"</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> wikidataCoords = "<ins style="font-weight: bold; text-decoration: none;">Koordinaten</ins> <ins style="font-weight: bold; text-decoration: none;">konnten</ins> <ins style="font-weight: bold; text-decoration: none;">auf</ins> Wikidata<ins style="font-weight: bold; text-decoration: none;"> nicht gefunden werden</ins>"</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> </table> Karthoo https://de.wikipedia.org/w/index.php?title=Modul:Mapframe&diff=177379238&oldid=prev Karthoo: Aus dem englischen Wiki übertragen 2018-05-13T07:39:25Z <p>Aus dem englischen Wiki übertragen</p> <p><b>Neue Seite</b></p><div>-- Note: Originally written on English Wikipedia at https://en.wikipedia.org/wiki/Module:Mapframe<br /> -- ##### Localisation (L10n) settings #####<br /> -- Replace values in quotes (&quot;&quot;) with localised values<br /> <br /> local L10n = {}<br /> <br /> -- Template parameter names (unnumbered versions only)<br /> L10n.para = {<br /> display = &quot;display&quot;,<br /> type = &quot;type&quot;,<br /> id = &quot;id&quot;,<br /> ids = &quot;ids&quot;,<br /> from = &quot;from&quot;,<br /> raw = &quot;raw&quot;,<br /> title = &quot;title&quot;,<br /> description = &quot;description&quot;,<br /> strokeColor = &quot;stroke-color&quot;,<br /> strokeColour = &quot;stroke-colour&quot;,<br /> strokeWidth = &quot;stroke-width&quot;,<br /> coord = &quot;coord&quot;,<br /> marker = &quot;marker&quot;,<br /> markerColor = &quot;marker-color&quot;,<br /> markerColour = &quot;marker-colour&quot;,<br /> text = &quot;text&quot;,<br /> icon = &quot;icon&quot;,<br /> zoom = &quot;zoom&quot;,<br /> frame = &quot;frame&quot;,<br /> plain = &quot;plain&quot;,<br /> frameWidth = &quot;frame-width&quot;,<br /> frameHeight = &quot;frame-height&quot;,<br /> frameLat = &quot;frame-lat&quot;,<br /> frameLatitude = &quot;frame-latitude&quot;,<br /> frameLong = &quot;frame-long&quot;,<br /> frameLongitude = &quot;frame-longitude&quot;,<br /> frameAlign = &quot;frame-align&quot;<br /> }<br /> <br /> -- Names of other templates this module depends on<br /> L10n.template = {<br /> Coord = &quot;Coord&quot;<br /> }<br /> <br /> -- Error messages<br /> L10n.error = {<br /> badDisplayPara = &quot;Invalid display parameter&quot;,<br /> noCoords = &quot;Coordinates must be specified on Wikidata or in |&quot; .. L10n.para.coord .. &quot;=&quot;,<br /> wikidataCoords = &quot;Coordinates not found on Wikidata&quot;<br /> }<br /> <br /> -- Other strings<br /> L10n.str = {<br /> -- valid values for display parameter, e.g. (|display=inline) or (|display=title) or (|display=inline,title) or (|display=title,inline)<br /> inline = &quot;inline&quot;, <br /> title = &quot;title&quot;, <br /> dsep = &quot;,&quot;, -- separator between inline and title (comma in the example above)<br /> <br /> -- valid values for type paramter<br /> line = &quot;line&quot;, -- geoline feature (e.g. a road)<br /> shape = &quot;shape&quot;, -- geoshape feature (e.g. a state or province)<br /> shapeInverse = &quot;shape-inverse&quot;, -- geomask feature (the inverse of a geoshape)<br /> data = &quot;data&quot;, -- geoJSON data page on Commons<br /> point = &quot;point&quot;, -- single point feature (coordinates)<br /> <br /> -- valid values for icon, frame, and plain parameters<br /> affirmedWords = &#039; &#039;..table.concat({<br /> &quot;add&quot;,<br /> &quot;added&quot;,<br /> &quot;affirm&quot;,<br /> &quot;affirmed&quot;,<br /> &quot;include&quot;,<br /> &quot;included&quot;,<br /> &quot;on&quot;,<br /> &quot;true&quot;,<br /> &quot;yes&quot;,<br /> &quot;y&quot;<br /> }, &#039; &#039;)..&#039; &#039;,<br /> declinedWords = &#039; &#039;..table.concat({<br /> &quot;decline&quot;,<br /> &quot;declined&quot;,<br /> &quot;exclude&quot;,<br /> &quot;excluded&quot;,<br /> &quot;false&quot;,<br /> &quot;none&quot;,<br /> &quot;not&quot;,<br /> &quot;no&quot;,<br /> &quot;n&quot;,<br /> &quot;off&quot;,<br /> &quot;omit&quot;,<br /> &quot;omitted&quot;,<br /> &quot;remove&quot;,<br /> &quot;removed&quot;<br /> }, &#039; &#039;)..&#039; &#039;<br /> }<br /> <br /> -- Default values for parameters<br /> L10n.defaults = {<br /> display = L10n.str.inline,<br /> text = &quot;Map&quot;,<br /> frameWidth = &quot;300&quot;,<br /> frameHeight = &quot;200&quot;,<br /> marker = &quot;marker&quot;, -- Do not translate. For valid alternate values, see https://www.mediawiki.org/wiki/Maps/Icons<br /> markerColor = &quot;5E74F3&quot;,<br /> strokeColor = &quot;#ff0000&quot;,<br /> strokeWidth = 6<br /> }<br /> <br /> -- #### End of L10n settings ####<br /> <br /> function setCleanArgs(argsTable)<br /> local cleanArgs = {}<br /> for key, val in pairs(argsTable) do<br /> if type(val) == &#039;string&#039; then<br /> val = val:match(&#039;^%s*(.-)%s*$&#039;)<br /> if val ~= &#039;&#039; then<br /> cleanArgs[key] = val<br /> end<br /> else<br /> cleanArgs[key] = val<br /> end<br /> end<br /> return cleanArgs<br /> end<br /> <br /> function isAffirmed(val)<br /> if not(val) then return false end<br /> return string.find(L10n.str.affirmedWords, &#039; &#039;..val..&#039; &#039;, 1, true ) and true or false<br /> end<br /> <br /> function isDeclined(val)<br /> if not(val) then return false end<br /> return string.find(L10n.str.declinedWords , &#039; &#039;..val..&#039; &#039;, 1, true ) and true or false<br /> end<br /> <br /> function makeContent(args)<br /> if args[L10n.para.raw] then<br /> return args[L10n.para.raw]<br /> end<br /> <br /> local content = {};<br /> local contentIndex = &#039;&#039;;<br /> while args[L10n.para.type .. contentIndex] or args[L10n.para.from .. contentIndex] do<br /> local contentArgs = {}<br /> for k, v in pairs(args) do<br /> if string.match(k, &#039;.*&#039;..contentIndex) then<br /> contentArgs[string.gsub(k, contentIndex, &#039;&#039;)] = v<br /> end<br /> end<br /> <br /> if contentIndex == &#039;&#039; then contentIndex = 1 end<br /> content[contentIndex] = makeContentJson(contentArgs)<br /> contentIndex = contentIndex + 1<br /> end<br /> <br /> --Single item, no array needed<br /> if #content==1 then return content[1] end<br /> <br /> --Multiple items get placed in a FeatureCollection<br /> local contentArray = &#039;[\n&#039; .. table.concat( content, &#039;,\n&#039;) .. &#039;\n]&#039;<br /> return contentArray<br /> end<br /> <br /> function parseCoords(coords)<br /> local parts = mw.text.split((mw.ustring.match(coords,&#039;[%.%d]+°[NS] [%.%d]+°[EW]&#039;) or &#039;&#039;), &#039; &#039;)<br /> <br /> latParts = mw.text.split(parts[1], &#039;°&#039;)<br /> longParts = mw.text.split(parts[2], &#039;°&#039;)<br /> <br /> if latParts[2] == &#039;S&#039; then latParts[1] = &#039;-&#039;..latParts[1] end<br /> if longParts[2] == &#039;W&#039; then longParts[1] = &#039;-&#039;..longParts[1] end<br /> return tonumber(latParts[1]), tonumber(longParts[1])<br /> end<br /> <br /> function wikidataCoords(item_id)<br /> if not(mw.wikibase.isValidEntityId(item_id)) or not(mw.wikibase.entityExists(item_id)) then<br /> error(L10n.error.noCoords, 0)<br /> end<br /> local coordStatements = mw.wikibase.getBestStatements(item_id, &#039;P625&#039;)<br /> if not coordStatements or #coordStatements == 0 then<br /> error(L10n.error.wikidataCoords, 0)<br /> end<br /> local wdCoords = coordStatements[1][&#039;mainsnak&#039;][&#039;datavalue&#039;][&#039;value&#039;]<br /> return tonumber(wdCoords[&#039;latitude&#039;]), tonumber(wdCoords[&#039;longitude&#039;])<br /> end<br /> <br /> function makeCoords(args, plainOutput) <br /> local coords, lat, long<br /> local frame = mw.getCurrentFrame()<br /> if args[L10n.para.coord] then<br /> coords = frame:preprocess(args[L10n.para.coord])<br /> lat, long = parseCoords(coords)<br /> else<br /> lat, long = wikidataCoords(args[L10n.para.id] or args[L10n.para.ids] or mw.wikibase.getEntityIdForCurrentPage())<br /> end<br /> if plainOutput then<br /> return lat, long<br /> end<br /> return {[0] = long, [1] = lat}<br /> end<br /> <br /> function makeContentJson(args)<br /> local data = {}<br /> <br /> if args[L10n.para.type] == L10n.str.point then<br /> data.type = &quot;Feature&quot;<br /> data.geometry = {<br /> type = &quot;Point&quot;,<br /> coordinates = makeCoords(args)<br /> }<br /> data.properties = {<br /> title = args[L10n.para.title] or mw.getCurrentFrame():getParent():getTitle(),<br /> [&quot;marker-symbol&quot;] = args[L10n.para.marker] or L10n.defaults.marker,<br /> [&quot;marker-color&quot;] = args[L10n.para.markerColor] or args[L10n.para.markerColour] or L10n.defaults.markerColor<br /> }<br /> else<br /> data.type = &quot;ExternalData&quot;<br /> <br /> if args[L10n.para.type] == L10n.str.data or args[L10n.para.from] then<br /> data.service = &quot;page&quot;<br /> elseif args[L10n.para.type] == L10n.str.line then<br /> data.service = &quot;geoline&quot;<br /> elseif args[L10n.para.type] == L10n.str.shape then<br /> data.service = &quot;geoshape&quot;<br /> elseif args[L10n.para.type] == L10n.str.shapeInverse then<br /> data.service = &quot;geomask&quot;<br /> end<br /> <br /> if args[L10n.para.id] or args[L10n.para.ids] or (not (args[L10n.para.from]) and mw.wikibase.getEntityIdForCurrentPage()) then<br /> data.ids = args[L10n.para.id] or args[L10n.para.ids] or mw.wikibase.getEntityIdForCurrentPage()<br /> else <br /> data.title = args[L10n.para.from]<br /> end<br /> <br /> data.properties = {<br /> stroke = args[L10n.para.strokeColor] or args[L10n.para.strokeColour] or L10n.defaults.strokeColor,<br /> [&quot;stroke-width&quot;] = tonumber(args[L10n.para.strokeWidth]) or L10n.defaults.strokeWidth<br /> }<br /> end<br /> <br /> data.properties.title = args[L10n.para.title] or mw.getCurrentFrame():preprocess(&#039;{{PAGENAME}}&#039;)<br /> if args[L10n.para.description] then<br /> data.properties.description = args[L10n.para.description]<br /> end<br /> <br /> return mw.text.jsonEncode(data)<br /> end<br /> <br /> function makeTagAttribs(args, isTitle)<br /> local attribs = {}<br /> if args[L10n.para.zoom] then<br /> attribs.zoom = args[L10n.para.zoom]<br /> end<br /> if isDeclined(args[L10n.para.icon]) then<br /> attribs.class = &quot;no-icon&quot;<br /> end<br /> if args[L10n.para.type] == L10n.str.point then<br /> local lat, long = makeCoords(args, &#039;plainOutput&#039;)<br /> attribs.latitude = tostring(lat)<br /> attribs.longitude = tostring(long)<br /> end<br /> if isAffirmed(args[L10n.para.frame]) and not(isTitle) then<br /> attribs.width = args[L10n.para.frameWidth] or L10n.defaults.frameWidth<br /> attribs.height = args[L10n.para.frameHeight] or L10n.defaults.frameHeight<br /> if args[L10n.para.frameLat] or args[L10n.para.frameLatitude] then<br /> attribs.latitude = args[L10n.para.frameLat] or args[L10n.para.frameLatitude]<br /> end<br /> if args[L10n.para.frameLong] or args[L10n.para.frameLongitude] then<br /> attribs.longitude = args[L10n.para.frameLong] or args[L10n.para.frameLongitude]<br /> end<br /> if not attribs.latitude and not attribs.longitude then<br /> local success, lat, long = pcall(wikidataCoords, args[L10n.para.id] or args[L10n.para.ids] or mw.wikibase.getEntityIdForCurrentPage())<br /> if success then<br /> attribs.latitude = tostring(lat)<br /> attribs.longitude = tostring(long)<br /> end<br /> end<br /> if args[L10n.para.frameAlign] then<br /> attribs.align = args[L10n.para.frameAlign]<br /> end<br /> if isAffirmed(args[L10n.para.plain]) then<br /> attribs.frameless = &quot;1&quot;<br /> else<br /> attribs.text = args[L10n.para.text] or L10n.defaults.text<br /> end<br /> else<br /> attribs.text = args[L10n.para.text] or L10n.defaults.text<br /> end<br /> return attribs<br /> end<br /> <br /> function makeTitleOutput(args, tagContent)<br /> local titleTag = mw.text.tag(&#039;maplink&#039;, makeTagAttribs(args, true), tagContent)<br /> local spanAttribs = {<br /> style = &quot;font-size: small;&quot;,<br /> id = &quot;coordinates&quot;<br /> }<br /> return mw.text.tag(&#039;span&#039;, spanAttribs, titleTag)<br /> end<br /> <br /> function makeInlineOutput(args, tagContent)<br /> local tagName = &#039;maplink&#039;<br /> if args[L10n.para.frame] then<br /> tagName = &#039;mapframe&#039;<br /> end<br /> <br /> return mw.text.tag(tagName, makeTagAttribs(args), tagContent)<br /> end<br /> <br /> local p = {}<br /> <br /> -- Entry point for templates<br /> function p.main(frame)<br /> local parent = frame.getParent(frame)<br /> local output = p._main(parent.args)<br /> return frame:preprocess(output)<br /> end<br /> <br /> -- Entry point for modules<br /> function p._main(_args)<br /> local args = setCleanArgs(_args)<br /> <br /> local tagContent = makeContent(args)<br /> <br /> local display = mw.text.split(args[L10n.para.display] or L10n.defaults.display, &#039;%s*&#039; .. L10n.str.dsep .. &#039;%s*&#039;)<br /> local displayInTitle = display[1] == L10n.str.title or display[2] == L10n.str.title<br /> local displayInline = display[1] == L10n.str.inline or display[2] == L10n.str.inline<br /> <br /> local output<br /> if displayInTitle and displayInline then<br /> output = makeTitleOutput(args, tagContent) .. makeInlineOutput(args, tagContent)<br /> elseif displayInTitle then<br /> output = makeTitleOutput(args, tagContent)<br /> elseif displayInline then<br /> output = makeInlineOutput(args, tagContent)<br /> else<br /> error(L10n.error.badDisplayPara)<br /> end<br /> <br /> return output<br /> end<br /> <br /> return p</div> Karthoo