CINXE.COM
Mostra la font per a Mòdul:Map - Viquipèdia, l'enciclopèdia lliure
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available" lang="ca" dir="ltr"> <head> <meta charset="UTF-8"> <title>Mostra la font per a Mòdul:Map - Viquipèdia, l'enciclopèdia lliure</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-disabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available";var cookie=document.cookie.match(/(?:^|; )cawikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":true,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat": "dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"9f9f5d37-aa06-4a4e-b27d-bdd1d86c4945","wgCanonicalNamespace":"Module","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":828,"wgPageName":"Mòdul:Map","wgTitle":"Map","wgCurRevisionId":26320001,"wgRevisionId":0,"wgArticleId":1422430,"wgIsArticle":false,"wgIsRedirect":false,"wgAction":"edit","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"Scribunto","wgRelevantPageName":"Mòdul:Map","wgRelevantArticleId":1422430,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":["sysop"],"wgRestrictionMove":["sysop"],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir": "ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":20000,"wgCodeEditorCurrentLanguage":"lua","wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.codeEditor.styles":"ready","skins.vector.search.codex.styles":"ready", "skins.vector.styles":"ready","skins.vector.icons":"ready","ext.charinsert.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.data-bridge.externalModifiers":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.codeEditor","ext.scribunto.edit","mediawiki.action.edit.collapsibleFooter","site","mediawiki.page.ready","skins.vector.js","ext.centralNotice.geoIP","ext.charinsert","ext.gadget.UkensKonkurranse","ext.gadget.refToolbar","ext.gadget.charinsert","ext.gadget.AltresViccionari","ext.gadget.purgetab","ext.gadget.DocTabs","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","wikibase.client.data-bridge.init", "ext.checkUser.clientHints","oojs-ui.styles.icons-media","oojs-ui-core.icons"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=ca&modules=ext.charinsert.styles%7Cext.codeEditor.styles%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediaBadges%7Cext.wikimediamessages.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.data-bridge.externalModifiers&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=ca&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=ca&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.6"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="noindex,nofollow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Mostra la font per a Mòdul:Map - Viquipèdia, l'enciclopèdia lliure"> <meta property="og:type" content="website"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//ca.m.wikipedia.org/wiki/M%C3%B2dul:Map"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Viquipèdia (ca)"> <link rel="EditURI" type="application/rsd+xml" href="//ca.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://ca.wikipedia.org/wiki/M%C3%B2dul:Map"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.ca"> <link rel="alternate" type="application/atom+xml" title="Canal de sindicació Atom Viquipèdia" href="/w/index.php?title=Especial:Canvis_recents&feed=atom"> <link rel="dns-prefetch" href="login.wikimedia.org"> </head> <body class="codeeditor-loading skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-828 ns-subject page-Mòdul_Map rootpage-Mòdul_Map skin-vector-2022 action-edit"><a class="mw-jump-link" href="#bodyContent">Vés al contingut</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Lloc"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Menú principal" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Menú principal</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Menú principal</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">mou a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">amaga</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navegació </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Portada" title="Visiteu la pàgina principal [z]" accesskey="z"><span>Portada</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Especial:Article_aleatori" title="Carrega una pàgina a l’atzar [x]" accesskey="x"><span>Article a l'atzar</span></a></li><li id="n-Articles-de-qualitat" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Articles_de_qualitat"><span>Articles de qualitat</span></a></li> </ul> </div> </div> <div id="p-Comunitat" class="vector-menu mw-portlet mw-portlet-Comunitat" > <div class="vector-menu-heading"> Comunitat </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-portal" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Portal" title="Sobre el projecte, què podeu fer, on trobareu les coses"><span>Portal viquipedista</span></a></li><li id="n-Agenda-d'actes" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Trobades"><span>Agenda d'actes</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Especial:Canvis_recents" title="Una llista dels canvis recents al wiki [r]" accesskey="r"><span>Canvis recents</span></a></li><li id="n-La-taverna" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:La_taverna"><span>La taverna</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Contacte"><span>Contacte</span></a></li><li id="n-Xat" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Canals_IRC"><span>Xat</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Viquip%C3%A8dia:Ajuda" title="El lloc per a saber més coses"><span>Ajuda</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Portada" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Viquipèdia" src="/static/images/mobile/copyright/wikipedia-wordmark-ca.svg" style="width: 7.5em; height: 1.4375em;"> <img class="mw-logo-tagline" alt="l'Enciclopèdia Lliure" src="/static/images/mobile/copyright/wikipedia-tagline-ca.svg" width="120" height="14" style="width: 7.5em; height: 0.875em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Especial:Cerca" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Cerca a la Viquipèdia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Cerca</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Cerca a Viquipèdia" aria-label="Cerca a Viquipèdia" autocapitalize="sentences" title="Cerca a la Viquipèdia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Especial:Cerca"> </div> <button class="cdx-button cdx-search-input__end-button">Cerca</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Eines personals"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Aparença"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Aparença" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Aparença</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=ca.wikipedia.org&uselang=ca" class=""><span>Donatius</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Especial:Crea_compte&returnto=M%C3%B2dul%3AMap&returntoquery=action%3Dedit" title="Us animem a crear un compte i iniciar una sessió, encara que no és obligatori" class=""><span>Crea un compte</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Especial:Registre_i_entrada&returnto=M%C3%B2dul%3AMap&returntoquery=action%3Dedit" title="Us animem a registrar-vos, però no és obligatori [o]" accesskey="o" class=""><span>Inicia la sessió</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Més opcions" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Eines personals" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Eines personals</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="Menú d'usuari" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=ca.wikipedia.org&uselang=ca"><span>Donatius</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Especial:Crea_compte&returnto=M%C3%B2dul%3AMap&returntoquery=action%3Dedit" title="Us animem a crear un compte i iniciar una sessió, encara que no és obligatori"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Crea un compte</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Especial:Registre_i_entrada&returnto=M%C3%B2dul%3AMap&returntoquery=action%3Dedit" title="Us animem a registrar-vos, però no és obligatori [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Inicia la sessió</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pàgines per a editors no registrats <a href="/wiki/Ajuda:Introducci%C3%B3" aria-label="Vegeu més informació sobre l'edició"><span>més informació</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Especial:Contribucions_pr%C3%B2pies" title="Una llista de les modificacions fetes des d'aquesta adreça IP [y]" accesskey="y"><span>Contribucions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Especial:Discussi%C3%B3_personal" title="Discussió sobre les edicions per aquesta adreça ip. [n]" accesskey="n"><span>Discussió per aquest IP</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Lloc"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <h1 id="firstHeading" class="firstHeading mw-first-heading">Mostra la font per a Mòdul:Map</h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Aquest article només existeix en aquesta llengua. Afegiu l'article per a altres llengües" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-0" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">Afegeix llengües</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="uls-after-portlet-link"></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Espais de noms"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-module" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/M%C3%B2dul:Map" title="Mostra la pàgina del mòdul [c]" accesskey="c"><span>Mòdul</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/M%C3%B2dul_Discussi%C3%B3:Map" rel="discussion" title="Discussió sobre el contingut d'aquesta pàgina [t]" accesskey="t"><span>Discussió</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Canvia la variant de llengua" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Vistes"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="vector-tab-noicon mw-list-item"><a href="/wiki/M%C3%B2dul:Map"><span>Mostra</span></a></li><li id="ca-viewsource" class="selected vector-tab-noicon mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Map&action=edit" title="Aquesta pàgina està protegida. Podeu veure'n el codi font. [e]" accesskey="e"><span>Mostra el codi</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Map&action=history" title="Versions antigues d'aquesta pàgina [h]" accesskey="h"><span>Mostra l'historial</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Eines de la pàgina"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Eines" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Eines</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Eines</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">mou a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">amaga</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="Més opcions" > <div class="vector-menu-heading"> Accions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="vector-more-collapsible-item mw-list-item"><a href="/wiki/M%C3%B2dul:Map"><span>Mostra</span></a></li><li id="ca-more-viewsource" class="selected vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Map&action=edit"><span>Mostra el codi</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Map&action=history"><span>Mostra l'historial</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Especial:Enlla%C3%A7os/M%C3%B2dul:Map" title="Una llista de totes les pàgines wiki que enllacen amb aquesta [j]" accesskey="j"><span>Què hi enllaça</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Especial:Seguiment/M%C3%B2dul:Map" rel="nofollow" title="Canvis recents a pàgines enllaçades des d'aquesta pàgina [k]" accesskey="k"><span>Canvis relacionats</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Especial:P%C3%A0gines_especials" title="Llista totes les pàgines especials [q]" accesskey="q"><span>Pàgines especials</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=M%C3%B2dul:Map&action=info" title="Més informació sobre aquesta pàgina"><span>Informació de la pàgina</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Especial:UrlQ%C4%B1sald%C4%B1c%C4%B1s%C4%B1&url=https%3A%2F%2Fca.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DM%25C3%25B2dul%3AMap%26action%3Dedit"><span>Obtén una URL abreujada</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Especial:QrKodu&url=https%3A%2F%2Fca.wikipedia.org%2Fw%2Findex.php%3Ftitle%3DM%25C3%25B2dul%3AMap%26action%3Dedit"><span>Descarrega el codi QR</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> En altres projectes </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q24575446" title="Enllaç a l'element del repositori de dades connectat [g]" accesskey="g"><span>Element a Wikidata</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Eines de la pàgina"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Aparença"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Aparença</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">mou a la barra lateral</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">amaga</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> </div> <div id="contentSub"><div id="mw-content-subtitle">← <a href="/wiki/M%C3%B2dul:Map" title="Mòdul:Map">Mòdul:Map</a></div></div> <div id="mw-content-text" class="mw-body-content"><p>No teniu permís per a modificar aquesta pàgina, pels motius següents: </p> <ul class="permissions-errors"><li class="mw-permissionerror-protectedpagetext">Aquesta pàgina està protegida per evitar modificacions. Comproveu la pàgina de discussió per si el tema que voleu modificar ja s'ha discutit. En cas contrari, exposeu la qüestió i assegureu-vos d'arribar a un consens sobre els canvis a fer. Si es tracta d'un canvi menor o no controvertit, podeu demanar la modificació clicant l'enllaç a continuació i explicant els canvis i els motius de forma que pugui ser atès per algú sense coneixements del tema. <center> <p><a class="external text" href="https://ca.wikipedia.org/w/index.php?title=M%C3%B2dul_Discussi%C3%B3:Map&action=edit&preload=Plantilla:Modificació_protegida/Preload&preloadtitle=Sol%C2%B7licitud+de+modificaci%C3%B3+protegida+11-12-2024&section=new">Sol·licita una modificació</a> </p> </center></li><li class="mw-permissionerror-globalblocking-blockedtext-range"><b>Your IP address is in a range that has been <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/Global_blocks" class="extiw" title="m:Special:MyLanguage/Global blocks">blocked on all Wikimedia Foundation wikis</a>.</b> <p>The block was made by <a href="/wiki/Usuari:Jon_Kolbert" title="Usuari:Jon Kolbert">Jon Kolbert</a>. The reason given is <i><a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/NOP" class="extiw" title="m:Special:MyLanguage/NOP">Open proxy/Webhost</a>: See the <a href="https://meta.wikimedia.org/wiki/WM:OP/H" class="extiw" title="m:WM:OP/H">help page</a> if you are affected </i>. </p> <ul><li>Start of block: 16:12, 27 ago 2023</li> <li>Expiry of block: 16:12, 27 ago 2028</li></ul> <p>Your current IP address is 8.222.208.146. The blocked range is 8.222.128.0/17. </p><p>Incloeu els detalls de dalt en totes les consultes que feu. Si penseu que heu estat blocat per error, trobareu més informació i instruccions al reglament global <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/No_open_proxies" class="extiw" title="m:Special:MyLanguage/No open proxies">No proxys oberts</a>. </p> Altrament, per a discutir sobre el blocatge, <a href="https://meta.wikimedia.org/wiki/Steward_requests/Global" class="extiw" title="m:Steward requests/Global">publiqueu una sol·licitud de revisió a Meta-Wiki</a>. You could also send an email to the <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/Stewards" class="extiw" title="m:Special:MyLanguage/Stewards">stewards</a> <a href="https://meta.wikimedia.org/wiki/Special:MyLanguage/VRT" class="extiw" title="m:Special:MyLanguage/VRT">VRT</a> queue at <kbd>stewards@wikimedia.org</kbd> including all above details.</li></ul><hr /> <p>Podeu veure i copiar el codi font d’aquesta pàgina. </p><textarea readonly="" accesskey="," id="wpTextbox1" cols="80" rows="25" style="" class="mw-editfont-monospace" lang="en" dir="ltr" name="wpTextbox1">-- Credits: -- Original from Wikivoyage -- Developed for Kartographer version on Wikipedia by Vriullop @cawiki -- Formulae: -- CSGNetwork at http://www.csgnetwork.com/degreelenllavcalc.html via @enwiki -- OpenStreetMap -- Version: 20210211 local p = {} -- Localization on [[Module:Map/i18n]] local i18n = { ["coordinate-invalid"] = "Parameter $1 is an invalid value of \"latitude,longitude\".", ["type-invalid"] = "Type $1 is invalid. Use mapframe or maplink.", ["geotype-invalid"] = "Geotype $1 is an invalid value.", ["ids-invalid"] = "Parameter ids $1 is invalid.", ["polygon-required-points"] = "A polygon requires a minimum of 4 coordinate points.", ["polygon-not-closed"] = "A closed polygon requires last point equal to first one.", ['ids-not-found'] = "Ids not found for external data.", --['not-from-content-page'] = "Do not invoke from content page. Use a template or use a module subpage like /sandbox for testing .", -- local categories ['cat-several-features'] = "", ['cat-linestring-drawn'] = "", ['cat-polygon-drawn'] = "", } local cat = {['cat-several-features'] = false, ['cat-linestring-drawn'] = false, ['cat-polygon-drawn'] = false} -- Credit to http://stackoverflow.com/a/1283608/2644759, cc-by-sa 3.0 local function tableMerge(t1, t2) for k, v in pairs(t2) do if type(v) == "table" then if type(t1[k] or false) == "table" then tableMerge(t1[k] or {}, t2[k] or {}) else t1[k] = v end else t1[k] = v end end return t1 end local function loadI18n() local exist, res = pcall(require, "Module:Map/i18n") if exist and next(res) ~= nil then tableMerge(i18n, res.i18n) end end loadI18n() local errormessage local function printError(key, par) -- just print first error errormessage = errormessage or ('<span class="error">' .. (par and mw.ustring.gsub(i18n[key], "$1", par) or i18n[key]) .. '</span>') end -- Convert coordinates input format to geojson table local function parseGeoSequence(data, geotype) local coordsGeo = {} for line_coord in mw.text.gsplit(data, ':', true) do -- Polygon - linearRing:linearRing... local coordsLine = {} for point_coord in mw.text.gsplit(line_coord, ';', true) do -- LineString or MultiPoint - point;point... local valid = false local val = mw.text.split(point_coord, ',', true) -- Point - lat,lon -- allow for elevation if #val >= 2 and #val <= 3 then local lat = tonumber(val[1]) local lon = tonumber(val[2]) if lat ~= nil and lon ~= nil then table.insert(coordsLine, {lon, lat}) valid = true end end if not valid and point_coord ~= '' then printError('coordinate-invalid', point_coord) end end if geotype == 'Polygon' then if #coordsLine < 4 then printError('polygon-required-points') elseif table.concat(coordsLine[1]) ~= table.concat(coordsLine[#coordsLine]) then printError('polygon-not-closed') end end table.insert(coordsGeo, coordsLine) end if geotype == 'Point' then coordsGeo = coordsGeo[1][1] elseif geotype == "LineString" or geotype == "MultiPoint" then coordsGeo = coordsGeo[1] elseif geotype ~= 'Polygon' then printError('geotype-invalid', geotype) end return coordsGeo end -- data Point - {lon,lat} -- data LineString - { {lon,lat}, {lon,lat}, ... } -- data Polygon - { { {lon,lat}, {lon,lat} }, { {lon,lat}, {lon,lat} }, ... } -- output as LineString format local function mergePoints(stack, merger) if merger == nil then return stack end for _, val in ipairs(merger) do if type(val) == "number" then -- Point format stack[#stack + 1] = merger break elseif type(val[1]) == "table" then -- Polygon format for _, val2 in ipairs(val) do stack[#stack + 1] = val2 end else -- LineString format stack[#stack + 1] = val end end return stack end -- remove duplicated points, they may affect zoom calculation local function setUniquePoints(t) -- build set of unique values local uniqueElements = {} for _, point in ipairs(t) do if not uniqueElements[point[1]] then uniqueElements[point[1]] = {} end uniqueElements[point[1]][point[2]] = true end -- convert the set local result = {} for lon, _ in pairs(uniqueElements) do for lat, _ in pairs(uniqueElements[lon]) do table.insert(result, {lon, lat}) end end return result end local function getCoordBounds(data) local latN, latS = -90, 90 local lonE, lonW = -180, 180 for i, val in ipairs(data) do latN = math.max(val[2], latN) latS = math.min(val[2], latS) lonE = math.max(val[1], lonE) lonW = math.min(val[1], lonW) end return latN, latS, lonE, lonW end local function getCoordCenter(data) local latN, latS, lonE, lonW = getCoordBounds(data) local latCenter = latS + (latN - latS) / 2 local lonCenter = lonW + (lonE - lonW) / 2 return lonCenter, latCenter end -- meters per degree by latitude local function mxdByLat(lat) local latRad = math.rad(lat) -- see [[Geographic coordinate system#Expressing latitude and longitude as linear units]], by CSGNetwork local mxdLat = 111132.92 - 559.82 * math.cos(2 * latRad) + 1.175 * math.cos(4 * latRad) - 0.023 * math.cos(6 * latRad) local mxdLon = 111412.84 * math.cos(latRad) - 93.5 * math.cos(3 * latRad) + 0.118 * math.cos(5 * latRad) return mxdLat, mxdLon end -- Calculate zoom to fit coordinate bounds into height and width of frame local function getZoom(data, height, width) local lat1, lat2, lon1, lon2 = getCoordBounds(data) local latMid = (lat1 + lat2) / 2 -- mid latitude local mxdLat, mxdLon = mxdByLat(latMid) -- distances in meters local distLat = math.abs((lat1 - lat2) * mxdLat) local distLon = math.abs((lon1 - lon2) * mxdLon) -- margin 100px in height and width, right upper icon is about 50x50px local validHeight = math.max(height - 100, 100) local validWidth = math.max(width - 100, 100) -- maximum zoom fitting all points local latRad = math.rad(latMid) for zoom = 19, 0, -1 do -- see https://wiki.openstreetmap.org/wiki/Zoom_levels#Metres_per_pixel_math -- equatorial circumference 40 075 036 m: [[Equator#Exact length]] local distLatFrame = 40075036 * validHeight * math.cos(latRad) / (2 ^ (zoom + 8)) local distLonFrame = 40075036 * validWidth * math.cos(latRad) / (2 ^ (zoom + 8)) if distLatFrame > distLat and distLonFrame > distLon then return zoom end end return 0 end -- Geotype based on coordinates format pattern local function findGeotype(coord) local _, semicolons = string.gsub(coord, ';', '') local firstcoord = string.match(coord, "[0-9%.%-]+%s*,%s*[0-9%.%-]+") local lastcoord = string.match(string.reverse(coord), "[0-9%.%-]+%s*,%s*[0-9%.%-]+") if firstcoord == nil or lastcoord == nil then printError('coordinate-invalid', coord) else lastcoord = string.reverse(lastcoord) end if string.find(coord, ':') or (semicolons > 2 and firstcoord == lastcoord) then return 'Polygon' elseif semicolons > 0 then return 'LineString' -- or MultiPoint else return 'Point' end end local function fetchWikidata(id, snak) -- snak is a table like {'claims', 'P625', 1, 'mainsnak', 'datavalue', 'value'} local value id = mw.text.trim(id) if not string.find(id, "^Q%d+$") then printError('ids-invalid', id) else value = mw.wikibase.getBestStatements(id, snak[2]) for i = 3, #snak do if value == nil then break end value = value[snak[i]] end end return value end -- Fetch coordinates from Wikidata for a list of comma separated ids local function getCoordinatesById(ids) local function roundPrec(num, prec) if prec == nil or prec <= 0 then return num end local sig = 10^math.floor(math.log10(prec)+.5) -- significant figure from sexagesimal precision: 0.00123 -> 0.001 return math.floor(num / sig + 0.5) * sig end if ids == nil then return end local coord = {} local snak = {'claims', 'P625', 1, 'mainsnak', 'datavalue', 'value'} for idx in mw.text.gsplit(ids, '%s*,%s*') do local value = fetchWikidata(idx, snak) if value then local prec = value.precision coord[#coord+1] = roundPrec(value.latitude, prec) .. ',' .. roundPrec(value.longitude, prec) end end return #coord > 0 and table.concat(coord, ';') or nil end local function getBoundsById(ids, coordInput) if ids == nil then return {} end local coord = mw.text.split(coordInput, '%s*;%s*') local id = mw.text.split(ids, '%s*,%s*') if #coord ~= #id then return {} end local id_parent = nil if #id == 1 then id_parent = fetchWikidata(id[1], {'claims', 'P131', 1, 'mainsnak', 'datavalue', 'value', 'id'}) if id_parent ~= nil then id[2] = id_parent -- P131: located in the administrative territorial entity, last try coord[2] = coord[1] end end local bounds = {} -- try to fetch Wikidata in this order: area, watershed area, population, and finally by administrative entity local snak_area = {'claims', 'P2046', 1, 'mainsnak', 'datavalue', 'value'} -- area and unit local snak_warea = {'claims', 'P2053', 1, 'mainsnak', 'datavalue', 'value'} -- area and unit local snak_pop = {'claims', 'P1082', 1, 'mainsnak', 'datavalue', 'value'} -- population local convert_area = {['Q712226'] = 1000000, ['Q35852'] = 10000, ['Q232291'] = 2589988.110336, ['Q81292'] = 4046.8564224, ['Q935614'] = 1600, ['Q857027'] = 0.09290304, ['Q21074767'] = 1138100, ['Q25343'] = 1} -- to square metres -- query Wikidata: http://tinyurl.com/j8aez2g for i = 1, #id do if i == 2 and id[2] == id_parent and #bounds > 0 then break end -- only if not found previously local amount, unit, area local value = fetchWikidata(id[i], snak_area) or fetchWikidata(id[i], snak_warea) if value then amount = tonumber(value.amount) unit = string.match(value.unit, "(Q%d+)") if convert_area[unit] then area = amount * convert_area[unit] end end if area == nil then value = fetchWikidata(id[i], snak_pop) if value then amount = tonumber(value.amount) -- average density estimated for populated areas: 100; see [[Population density]] area = amount / 100 * 1000000 end end if area then local radius = math.sqrt(area / math.pi) -- approximation with a circle local latlon = mw.text.split(coord[i], '%s*,%s*') local mxdLat, mxdLon = mxdByLat(latlon[1]) bounds[#bounds+1] = {latlon[2] + (radius / mxdLon), latlon[1] + (radius / mxdLat)} -- NE bound, geoJSON format bounds[#bounds+1] = {latlon[2] - (radius / mxdLon), latlon[1] - (radius / mxdLat)} -- SW bound end end return bounds end local function circleToPolygon(center, radius, edges, turn) -- From en:Module:Mapframe, based on https://github.com/gabzim/circle-to-polygon, ISC licence local function offset(cLat, cLon, distance, bearing) local lat1 = math.rad(cLat) local lon1 = math.rad(cLon) local dByR = distance / 6378137 -- distance divided by 6378137 (radius of the earth) wgs84 local lat = math.asin( math.sin(lat1) * math.cos(dByR) + math.cos(lat1) * math.sin(dByR) * math.cos(bearing) ) local lon = lon1 + math.atan2( math.sin(bearing) * math.sin(dByR) * math.cos(lat1), math.cos(dByR) - math.sin(lat1) * math.sin(lat) ) return math.deg(lat) .. ',' .. math.deg(lon) end local coords = mw.text.split(center, ',', true) local lat = tonumber(coords[1]) local long = tonumber(coords[2]) edges = edges or 32 local move = 2 * math.pi * (turn or 0) local coordinates = {} for i = 0, edges do table.insert(coordinates, offset(lat, long, radius, ((2*math.pi*-i)/edges) + move)) end return table.concat(coordinates, ';') end local function addCategories(geotype, i) if not mw.title.getCurrentTitle().isContentPage then return end if i > 2 and i18n["cat-several-features"] ~= '' then cat["cat-several-features"] = true end if geotype == "LineString" and i18n["cat-linestring-drawn"] ~= '' then cat["cat-linestring-drawn"] = true elseif geotype == "Polygon" and i18n["cat-polygon-drawn"] ~= '' then cat["cat-polygon-drawn"] = true end return end -- Recursively extract coord templates which have a name parameter. -- from en:Module:Mapframe local function extractCoordTemplates(wikitext) local output = {} local templates = mw.ustring.gmatch(wikitext, '{%b{}}') local subtemplates = {} for template in templates do local name = mw.ustring.match(template, '{{([^}|]+)') -- get the template name local nameParam = mw.ustring.match(template, "|%s*name%s*=%s*[^}|]+") if not nameParam then nameParam = mw.ustring.match(template, "|%s*nom%s*=%s*[^}|]+") end if mw.ustring.lower(mw.text.trim(name)) == 'coord' then if nameParam then table.insert(output, template) end elseif mw.ustring.find(template, 'coord') then local subOutput = extractCoordTemplates(mw.ustring.sub(template, 2)) for _, t in pairs(subOutput) do table.insert(output, t) end end end -- ensure coords are not using title display for k, v in pairs(output) do output[k] = mw.ustring.gsub(v, "|%s*display%s*=[^|}]+", "|display=inline") end return output end -- Gets all named coordiates from a page or a section of a page. -- dependency: Module:Transcluder local function getNamedCoords(page) local parts = mw.text.split(page or "", "#", true) local name = parts[1] == "" and mw.title.getCurrentTitle().prefixedText or parts[1] local section = parts[2] local pageWikitext = require('Module:Transcluder').get(section and name.."#"..section or name) local coordTemplates = extractCoordTemplates(pageWikitext) local frame = mw.getCurrentFrame() local sep = "________" local expandedContent = frame:preprocess(table.concat(coordTemplates, sep)) local expandedTemplates = mw.text.split(expandedContent, sep) local namedCoords = {} for _, expandedTemplate in pairs(expandedTemplates) do local coord = mw.ustring.match(expandedTemplate, "<span class=\"geo\">(.-)</span>") if coord then coord = mw.ustring.gsub(coord, ";", ",") local name = mw.ustring.match(expandedTemplate, "&title=(.-)<span") or coord name = mw.uri.decode(name) local description = name ~= coord and coord table.insert(namedCoords, {coord=coord, name=name, description=description}) end end return namedCoords end -- Main function local function main(args) local tagname = args.type or 'mapframe' if tagname ~= 'maplink' and tagname ~= 'mapframe' then printError('type-invalid', tagname) end local tagArgs = { text = args.text, zoom = tonumber(args.zoom), latitude = tonumber(args.latitude), longitude = tonumber(args.longitude) } local defaultzoom = tonumber(args.default_zoom) if tagname == 'mapframe' then tagArgs.width = args.width or 300 tagArgs.height = args.height or 300 tagArgs.align = args.align or 'right' if args.frameless ~= nil and tagArgs.text == nil then tagArgs.frameless = true end else tagArgs.class = args.class end local wdid = args.item or mw.wikibase.getEntityIdForCurrentPage() if args['coordinates1'] == nil and args['geotype1'] == nil then -- single feature args['coordinates1'] = args['coordinates'] or args[1] if args['coordinates1'] == nil and args['latitude'] and args['longitude'] then args['coordinates1'] = args['latitude'] .. ',' .. args['longitude'] elseif args['coordinates1'] == nil then args['coordinates1'] = getCoordinatesById(wdid) end local par = {'title', 'image', 'description', 'geotype', 'commons', 'radius', 'radiuskm', 'edges', 'turn', 'from'} for _, v in ipairs(par) do args[v .. '1'] = args[v .. '1'] or args[v] end end local externalData = {['geoshape'] = true, ['geomask'] = true, ['geoline'] = true, ['page'] = true, ['none'] = true, ['named'] = true} local featureCollection = {['Point'] = true, ['MultiPoint'] = true, ['LineString'] = true, ['Polygon'] = true, ['circle'] = true} local myfeatures, myexternal, allpoints = {}, {}, {} local i, j = 1, 1 while args['coordinates'..i] or args['ids'..i] or externalData[args['geotype'..i]] or args['commons'..i] do local geotypex = args['geotype'..i] or args['geotype'] if geotypex == nil and args['commons'..i] then geotypex = 'page' end if geotypex ~= nil and not (featureCollection[geotypex] or externalData[geotypex]) then printError('geotype-invalid', geotypex) break end if geotypex == 'none' then -- skip this object i = i + 1 else local mystack if geotypex == 'named' then local namedCoords = getNamedCoords(args['from'..i]) mystack = myfeatures for _, namedCoord in pairs(namedCoords) do j = #mystack + 1 mystack[j] = {} mystack[j]['type'] = "Feature" mystack[j]['geometry'] = {} mystack[j]['geometry']['type'] = "Point" mystack[j]['geometry']['coordinates'] = parseGeoSequence(namedCoord.coord, 'Point') allpoints = mergePoints(allpoints, mystack[j]['geometry']['coordinates']) mystack[j]['properties'] = {} mystack[j]['properties']['title'] = namedCoord.name mystack[j]['properties']['description'] = namedCoord.description mystack[j]['properties']['marker-size'] = args['marker-size'..i] or args['marker-size'] mystack[j]['properties']['marker-symbol'] = args['marker-symbol'..i] or args['marker-symbol'] mystack[j]['properties']['marker-color'] = args['marker-color'..i] or args['marker-color'] end break elseif externalData[geotypex or ''] then mystack = myexternal j = #mystack + 1 mystack[j] = {} mystack[j]['type'] = "ExternalData" mystack[j]['service'] = geotypex if geotypex == "page" then local page_name = args['commons'..i] if mw.ustring.find(page_name, "Data:", 1, true) == 1 then page_name = string.sub(page_name, 6) end if mw.ustring.find(page_name, ".map", -4, true) == nil then page_name = page_name .. '.map' end mystack[j]['title'] = page_name else mystack[j]['ids'] = args['ids'..i] or args['ids'] or wdid if mystack[j]['ids'] == nil then printError('ids-not-found'); break end end local mycoordinates = args['coordinates'..i] if mycoordinates == nil and (tagArgs.latitude == nil or tagArgs.longitude == nil or tagArgs.zoom == nil) then mycoordinates = getCoordinatesById(mystack[j]['ids']) end if mycoordinates ~= nil then local mypoints = getBoundsById(mystack[j]['ids'], mycoordinates) if #mypoints == 0 then mypoints = parseGeoSequence(mycoordinates, mycoordinates:find(';') and 'MultiPoint' or 'Point') end allpoints = mergePoints(allpoints, mypoints) end else args['coordinates'..i] = args['coordinates'..i] or getCoordinatesById(args['ids'..i]) if geotypex == 'circle' then if not args['radius'..i] and args['radiuskm'..i] then args['radius'..i] = args['radiuskm'..i] * 1000 end args['coordinates'..i] = circleToPolygon(args['coordinates'..i], args['radius'..i], args['edges'..i], args['turn'..i]) geotypex = 'Polygon' end mystack = myfeatures j = #mystack + 1 mystack[j] = {} mystack[j]['type'] = "Feature" mystack[j]['geometry'] = {} mystack[j]['geometry']['type'] = geotypex or findGeotype(args['coordinates'..i]) mystack[j]['geometry']['coordinates'] = parseGeoSequence(args['coordinates'..i], mystack[j]['geometry']['type']) allpoints = mergePoints(allpoints, mystack[j]['geometry']['coordinates']) addCategories(mystack[j]['geometry']['type'], i) end mystack[j]['properties'] = {} mystack[j]['properties']['title'] = args['title'..i] or (geotypex and geotypex .. i) or mystack[j]['geometry']['type'] .. i if args['image'..i] then args['description'..i] = (args['description'..i] or '') .. '[[File:' .. args['image'..i] .. '|300px]]' end mystack[j]['properties']['description'] = args['description'..i] mystack[j]['properties']['marker-size'] = args['marker-size'..i] or args['marker-size'] mystack[j]['properties']['marker-symbol'] = args['marker-symbol'..i] or args['marker-symbol'] mystack[j]['properties']['marker-color'] = args['marker-color'..i] or args['marker-color'] mystack[j]['properties']['stroke'] = args['stroke'..i] or args['stroke'] mystack[j]['properties']['stroke-opacity'] = tonumber(args['stroke-opacity'..i] or args['stroke-opacity']) mystack[j]['properties']['stroke-width'] = tonumber(args['stroke-width'..i] or args['stroke-width']) mystack[j]['properties']['fill'] = args['fill'..i] or args['fill'] mystack[j]['properties']['fill-opacity'] = tonumber(args['fill-opacity'..i] or args['fill-opacity']) i = i + 1 end end -- calculate defaults for static mapframe; maplink is dynamic if (tagArgs.latitude == nil or tagArgs.longitude == nil) and #allpoints > 0 then if tagname == "mapframe" or tagArgs.text == nil then -- coordinates needed for text in maplink tagArgs.longitude, tagArgs.latitude = getCoordCenter(allpoints) end end if tagArgs.zoom == nil then if tagname == "mapframe" then local uniquepoints = setUniquePoints(allpoints) if #uniquepoints == 1 then local coordInput = uniquepoints[1][2] .. ',' .. uniquepoints[1][1] local mybounds = getBoundsById(wdid, coordInput) -- try to fetch by area uniquepoints = mergePoints(uniquepoints, mybounds) end if #uniquepoints <= 1 then tagArgs.zoom = defaultzoom or 9 else tagArgs.zoom = getZoom(uniquepoints, tagArgs.height, tagArgs.width) end else tagArgs.zoom = defaultzoom end end local geojson = myexternal if #myfeatures > 0 then geojson[#geojson + 1] = {type = "FeatureCollection", features = myfeatures} end if args.debug ~= nil then local html = mw.text.tag{name = tagname, attrs = tagArgs, content = mw.text.jsonEncode(geojson, mw.text.JSON_PRETTY)} return 'syntaxhighlight', tostring(html) .. ' Arguments:' .. mw.text.jsonEncode(args, mw.text.JSON_PRETTY), {lang = 'json'} end if geojson and #geojson == 0 then errormessage = erromessage or '' -- previous message or void for no map data end return tagname, geojson and mw.text.jsonEncode(geojson) or '', tagArgs end local function addCat(cat) local categories = '' for k, v in pairs(cat) do if v then categories = categories .. '[[Category:' .. i18n[k] .. ']]' end end return categories end local function errorMessage(message) if message == '' then -- no map data return else categories = mw.message.new('Kartographer-broken-category'):inLanguage(mw.language.getContentLanguage().code):plain() return message .. '[[Category:' .. categories .. ']]' end end function p.tag(frame) -- entry point from invoke local getArgs = require('Module:Arguments').getArgs local args = getArgs(frame) local tag, geojson, tagArgs = main(args) if errormessage then return errorMessage(errormessage) end return frame:extensionTag(tag, geojson, tagArgs) .. addCat(cat) end function p._tag(args) -- entry point from require local tag, geojson, tagArgs = main(args) if errormessage then return errorMessage(errormessage) end return mw.getCurrentFrame():extensionTag(tag, geojson, tagArgs) .. addCat(cat) end return p </textarea><div id="mw-scribunto-console"></div><div class="templatesUsed"><div class="mw-templatesUsedExplanation"><p>Aquesta pàgina fa servir les següents plantilles: </p></div><ul> <li><a href="/wiki/Plantilla:Ml" title="Plantilla:Ml">Plantilla:Ml</a> (<a href="/w/index.php?title=Plantilla:Ml&action=edit" title="Plantilla:Ml">modifica</a>) </li><li><a href="/wiki/Plantilla:Plantilla_protegida" title="Plantilla:Plantilla protegida">Plantilla:Plantilla protegida</a> (<a href="/w/index.php?title=Plantilla:Plantilla_protegida&action=edit" title="Plantilla:Plantilla protegida">mostra el codi font</a>) (semiprotegida)</li><li><a href="/wiki/Plantilla:Red_link_preload" title="Plantilla:Red link preload">Plantilla:Red link preload</a> (<a href="/w/index.php?title=Plantilla:Red_link_preload&action=edit" title="Plantilla:Red link preload">modifica</a>) </li><li><a href="/wiki/Plantilla:Tl" title="Plantilla:Tl">Plantilla:Tl</a> (<a href="/w/index.php?title=Plantilla:Tl&action=edit" title="Plantilla:Tl">mostra el codi font</a>) (protegida)</li><li><a href="/wiki/Plantilla:%C3%9As_de_la_plantilla/caixa" title="Plantilla:Ús de la plantilla/caixa">Plantilla:Ús de la plantilla/caixa</a> (<a href="/w/index.php?title=Plantilla:%C3%9As_de_la_plantilla/caixa&action=edit" title="Plantilla:Ús de la plantilla/caixa">mostra el codi font</a>) (protegida)</li><li><a href="/wiki/Plantilla:%C3%9As_de_la_plantilla/styles.css" title="Plantilla:Ús de la plantilla/styles.css">Plantilla:Ús de la plantilla/styles.css</a> (<a href="/w/index.php?title=Plantilla:%C3%9As_de_la_plantilla/styles.css&action=edit" title="Plantilla:Ús de la plantilla/styles.css">modifica</a>) </li><li><a href="/wiki/M%C3%B2dul:Map/%C3%BAs" title="Mòdul:Map/ús">Mòdul:Map/ús</a> (<a href="/w/index.php?title=M%C3%B2dul:Map/%C3%BAs&action=edit" title="Mòdul:Map/ús">modifica</a>) </li></ul></div><p id="mw-returnto">Torna cap a <a href="/wiki/M%C3%B2dul:Map" title="Mòdul:Map">Mòdul:Map</a>.</p> <!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?useformat=desktop&type=1x1&usesul3=0" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Obtingut de «<a dir="ltr" href="https://ca.wikipedia.org/wiki/Mòdul:Map">https://ca.wikipedia.org/wiki/Mòdul:Map</a>»</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Política de privadesa</a></li> <li id="footer-places-about"><a href="/wiki/Viquip%C3%A8dia:Quant_a_la_Viquip%C3%A8dia">Quant al projecte Viquipèdia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Viquip%C3%A8dia:Av%C3%ADs_d%27exempci%C3%B3_de_responsabilitat">Descàrrec de responsabilitat</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Codi de conducta</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Desenvolupadors</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/ca.wikipedia.org">Estadístiques</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Declaració de cookies</a></li> <li id="footer-places-mobileview"><a href="//ca.m.wikipedia.org/w/index.php?title=M%C3%B2dul:Map&action=edit&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Versió per a mòbils</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-7bbfc6c4f5-ss5bh","wgBackendResponseTime":362,"wgPageParseReport":{"limitreport":{"cputime":"0.016","walltime":"0.021","ppvisitednodes":{"value":31,"limit":1000000},"postexpandincludesize":{"value":1280,"limit":2097152},"templateargumentsize":{"value":0,"limit":2097152},"expansiondepth":{"value":5,"limit":100},"expensivefunctioncount":{"value":1,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":0,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 0.000 1 -total"]},"scribunto":{"limitreport-timeusage":{"value":"0.003","limit":"10.000"},"limitreport-memusage":{"value":617714,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-7bbfc6c4f5-ss5bh","timestamp":"20241211124405","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>