<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ca">
	<id>http://wiki.joanillo.org/index.php?action=history&amp;feed=atom&amp;title=Openlayers%3A_ol_package._Exemple_Casa_de_Papel</id>
	<title>Openlayers: ol package. Exemple Casa de Papel - Historial de revisió</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.joanillo.org/index.php?action=history&amp;feed=atom&amp;title=Openlayers%3A_ol_package._Exemple_Casa_de_Papel"/>
	<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=Openlayers:_ol_package._Exemple_Casa_de_Papel&amp;action=history"/>
	<updated>2026-09-22T21:28:03Z</updated>
	<subtitle>Historial de revisió per a aquesta pàgina del wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=Openlayers:_ol_package._Exemple_Casa_de_Papel&amp;diff=297388&amp;oldid=prev</id>
		<title>Joan: /* Creació del bundle */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=Openlayers:_ol_package._Exemple_Casa_de_Papel&amp;diff=297388&amp;oldid=prev"/>
		<updated>2021-05-17T09:28:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Creació del bundle&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 09:28, 17 maig 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l75&quot; &gt;Línia 75:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 75:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;(Ho instal·lem localment)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;(Ho instal·lem localment)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;'''NOTA maig 2021''': no cal &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tenir la carpeta ''node_modules''. Aquesta carpeta es creava perquè feia&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;'''NOTA maig 2021''': no cal &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;fer:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;$ npm install --save-dev parcel&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;$ npm install --save-dev parcel&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;en comptes de &lt;/del&gt;parcel-bundler&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, i això creava la carpeta ''node_modules&lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. Però crec que no cal ni executar aquesta instrucció ni tenir la carpeta node_modules&lt;/del&gt;. Quan faig el ''npm start'' ja es crea la carpeta ''dist/''. I si faig el ''npm run build'' també.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;N'hi ha prou amb fer ''&lt;/ins&gt;parcel-bundler''. Quan faig el ''npm start'' ja es crea la carpeta ''dist/''. I si faig el ''npm run build'' també.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;With two additional lines in package.json you can introduce the commands '''npm run build''' and '''npm start''' to manually build your bundle and watch for changes, respectively. The final '''package.json''' with the two additional commands ''start'' and ''build'' should look like this:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;With two additional lines in package.json you can introduce the commands '''npm run build''' and '''npm start''' to manually build your bundle and watch for changes, respectively. The final '''package.json''' with the two additional commands ''start'' and ''build'' should look like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=Openlayers:_ol_package._Exemple_Casa_de_Papel&amp;diff=297387&amp;oldid=prev</id>
		<title>Joan: /* Creació del bundle */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=Openlayers:_ol_package._Exemple_Casa_de_Papel&amp;diff=297387&amp;oldid=prev"/>
		<updated>2021-05-17T07:58:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Creació del bundle&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 07:58, 17 maig 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l71&quot; &gt;Línia 71:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 71:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;$ npm install -g parcel-bundler (instal·kació global)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;$ npm install -g parcel-bundler (instal·kació global)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;$ npm install --save-dev parcel (instal·lació local)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;$ npm install --save-dev parcel&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;-bundler &lt;/ins&gt;(instal·lació local&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) (ja ho havia fet&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;(Ho instal·lem localment)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;(Ho instal·lem localment)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;'''NOTA maig 2021''': no cal tenir la carpeta ''node_modules''. Aquesta carpeta es creava perquè feia&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;$ npm install --save-dev parcel&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;en comptes de parcel-bundler, i això creava la carpeta ''node_modules''. Però crec que no cal ni executar aquesta instrucció ni tenir la carpeta node_modules. Quan faig el ''npm start'' ja es crea la carpeta ''dist/''. I si faig el ''npm run build'' també.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;With two additional lines in package.json you can introduce the commands '''npm run build''' and '''npm start''' to manually build your bundle and watch for changes, respectively. The final '''package.json''' with the two additional commands ''start'' and ''build'' should look like this:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; 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;&quot;&gt;&lt;div&gt;With two additional lines in package.json you can introduce the commands '''npm run build''' and '''npm start''' to manually build your bundle and watch for changes, respectively. The final '''package.json''' with the two additional commands ''start'' and ''build'' should look like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=Openlayers:_ol_package._Exemple_Casa_de_Papel&amp;diff=260565&amp;oldid=prev</id>
		<title>Joan: /* Rutes BTT Cap de creus 2020 (El Port de la Selva) */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=Openlayers:_ol_package._Exemple_Casa_de_Papel&amp;diff=260565&amp;oldid=prev"/>
		<updated>2020-09-14T08:19:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Rutes BTT Cap de creus 2020 (El Port de la Selva)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ca&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 08:19, 14 set 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ca&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Cap diferència)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.joanillo.org/index.php?title=Openlayers:_ol_package._Exemple_Casa_de_Papel&amp;diff=259575&amp;oldid=prev</id>
		<title>Joan: /* Rutes BTT Cap de creus 2020 (El Port de la Selva) */</title>
		<link rel="alternate" type="text/html" href="http://wiki.joanillo.org/index.php?title=Openlayers:_ol_package._Exemple_Casa_de_Papel&amp;diff=259575&amp;oldid=prev"/>
		<updated>2020-09-01T22:23:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Rutes BTT Cap de creus 2020 (El Port de la Selva)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pàgina nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
=Introducció=&lt;br /&gt;
Es tracta de construir una aplicació OpenLayers amb '''node''' com a servidor, i instal·lar el mòdul '''ol'''. Representa que aquesta és la manera moderna de fer-ho, que anirà reemplaçant la manera clàssica d'utilitzar llibreries.&lt;br /&gt;
=Exemple inicial (Hola món)=&lt;br /&gt;
==Instal·lació==&lt;br /&gt;
*https://openlayers.org/en/latest/doc/tutorials/bundle.html&lt;br /&gt;
&lt;br /&gt;
Create a new empty directory for your project and navigate to it by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ mkdir new-project &amp;amp;&amp;amp; cd new-project&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Initialize your project with&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ npm init (deixar les opcions per defecte)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will create a ''package.json'' file in your working directory. Add OpenLayers as dependency to your application with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ npm install ol&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
At this point you can ask NPM to add required development dependencies by running&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ npm install --save-dev parcel-bundler&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Codi de l'aplicació i index.html==&lt;br /&gt;
Necessitem dos scripts: ''index.js'' i ''index.html''.&lt;br /&gt;
&lt;br /&gt;
Place your application code in ''index.js''. Here is a simple starting point:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
import 'ol/ol.css';&lt;br /&gt;
import {Map, View} from 'ol';&lt;br /&gt;
import TileLayer from 'ol/layer/Tile';&lt;br /&gt;
import OSM from 'ol/source/OSM';&lt;br /&gt;
&lt;br /&gt;
const map = new Map({&lt;br /&gt;
  target: 'map',&lt;br /&gt;
  layers: [&lt;br /&gt;
    new TileLayer({&lt;br /&gt;
      source: new OSM()&lt;br /&gt;
    })&lt;br /&gt;
  ],&lt;br /&gt;
  view: new View({&lt;br /&gt;
    center: [0, 0],&lt;br /&gt;
    zoom: 0&lt;br /&gt;
  })&lt;br /&gt;
});&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
I aquesta és la nostra pàgina web ''index.html'':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;head&amp;gt;&lt;br /&gt;
    &amp;lt;meta charset=&amp;quot;utf-8&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;title&amp;gt;Using Parcel with OpenLayers&amp;lt;/title&amp;gt;&lt;br /&gt;
    &amp;lt;style&amp;gt;&lt;br /&gt;
      #map {&lt;br /&gt;
        width: 400px;&lt;br /&gt;
        height: 250px;&lt;br /&gt;
      }&lt;br /&gt;
    &amp;lt;/style&amp;gt;&lt;br /&gt;
  &amp;lt;/head&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;div id=&amp;quot;map&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;./index.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Creació del bundle==&lt;br /&gt;
*https://openlayers.org/en/latest/doc/tutorials/bundle.html&lt;br /&gt;
*https://parceljs.org/&lt;br /&gt;
Per tal de què funcioni tot plegat necessito '''parcel'''. Make sure you have parcel installed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ npm install -g parcel-bundler (instal·kació global)&lt;br /&gt;
$ npm install --save-dev parcel (instal·lació local)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(Ho instal·lem localment)&lt;br /&gt;
&lt;br /&gt;
With two additional lines in package.json you can introduce the commands '''npm run build''' and '''npm start''' to manually build your bundle and watch for changes, respectively. The final '''package.json''' with the two additional commands ''start'' and ''build'' should look like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;name&amp;quot;: &amp;quot;test&amp;quot;,&lt;br /&gt;
  &amp;quot;version&amp;quot;: &amp;quot;1.0.0&amp;quot;,&lt;br /&gt;
  &amp;quot;description&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
  &amp;quot;main&amp;quot;: &amp;quot;index.js&amp;quot;,&lt;br /&gt;
  &amp;quot;scripts&amp;quot;: {&lt;br /&gt;
    &amp;quot;test&amp;quot;: &amp;quot;echo \&amp;quot;Error: no test specified\&amp;quot; &amp;amp;&amp;amp; exit 1&amp;quot;,&lt;br /&gt;
    &amp;quot;start&amp;quot;: &amp;quot;parcel index.html&amp;quot;,&lt;br /&gt;
    &amp;quot;build&amp;quot;: &amp;quot;parcel build --public-url . index.html&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;author&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
  &amp;quot;license&amp;quot;: &amp;quot;ISC&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
That's it. Now to run your application, enter&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ npm run build&lt;br /&gt;
&lt;br /&gt;
&amp;gt; prova_pere@1.0.0 build /home/joan/projectes/OSM/fusionar_geojson/html/prova_pere&lt;br /&gt;
&amp;gt; parcel build --public-url . index.html&lt;br /&gt;
Built in 21.14s.&lt;br /&gt;
&lt;br /&gt;
dist/prova_pere.64ad700d.js.map     ⚠️  1.82 MB     240ms&lt;br /&gt;
dist/prova_pere.64ad700d.js          518.11 KB    18.04s&lt;br /&gt;
dist/prova_pere.04a6741d.css.map       7.43 KB       4ms&lt;br /&gt;
dist/prova_pere.04a6741d.css           4.14 KB     5.80s&lt;br /&gt;
dist/index.html                          287 B     2.65s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
S'ha creat la carpeta ''dist/''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ npm start&lt;br /&gt;
&lt;br /&gt;
&amp;gt; prova_pere@1.0.0 start /home/joan/projectes/OSM/fusionar_geojson/html/prova_pere&lt;br /&gt;
&amp;gt; parcel index.html&lt;br /&gt;
&lt;br /&gt;
Server running at http://localhost:1234 &lt;br /&gt;
Built in 13.38s.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
in your console. To test your application, open in your browser:&lt;br /&gt;
*http://localhost:1234/&lt;br /&gt;
Whenever you change something, the page will reload automatically to show the result of your changes. Els canvis automàtics els podem veure perquè tenim el servidor corrent (''npm start'')&lt;br /&gt;
&lt;br /&gt;
Note that a single JavaScript file with all your application code and all dependencies used in your application has been created. From the OpenLayers package, it only contains the required components.&lt;br /&gt;
&lt;br /&gt;
To create a production bundle of your application, simply type&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
npm run build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and copy the ''dist/'' folder to your production server.&lt;br /&gt;
&lt;br /&gt;
=Aplicació La Casa de Papel=&lt;br /&gt;
[[Fitxer:La casa de papel.png | thumbnail]]&lt;br /&gt;
El primer exemple que farem és situar tots els personatges de la banda de '''La Casa de Papel''' sobre les seves ciutats.&lt;br /&gt;
&lt;br /&gt;
El codi d'exemple amb què em baso el trobo dels exemples:&lt;br /&gt;
*https://openlayers.org/en/latest/examples/&lt;br /&gt;
Concretament, per pintar una icona sobre el mapa:&lt;br /&gt;
*https://openlayers.org/en/latest/examples/icon.html&lt;br /&gt;
i per utilitzar els mapes de Stamen (watercolor, toner):&lt;br /&gt;
*https://openlayers.org/en/latest/examples/stamen.html&lt;br /&gt;
&lt;br /&gt;
Combinant-ho tot puc fer la meva aplicació. Bàsicament és posar icones sobre les ciutats. Quan poso el cursor a sobre, es mostra amb un ''popup'' la informació. I quan clico sobre la icona s'obren en el navegador dues pestanyes: informació sobre la ciutat a la Viquipèdia; i la fitxa del personatge.&lt;br /&gt;
&lt;br /&gt;
'''package.json''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;name&amp;quot;: &amp;quot;la_casa_de_papel&amp;quot;,&lt;br /&gt;
  &amp;quot;version&amp;quot;: &amp;quot;1.0.0&amp;quot;,&lt;br /&gt;
  &amp;quot;description&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
  &amp;quot;main&amp;quot;: &amp;quot;index.js&amp;quot;,&lt;br /&gt;
  &amp;quot;scripts&amp;quot;: {&lt;br /&gt;
    &amp;quot;test&amp;quot;: &amp;quot;echo \&amp;quot;Error: no test specified\&amp;quot; &amp;amp;&amp;amp; exit 1&amp;quot;,&lt;br /&gt;
    &amp;quot;start&amp;quot;: &amp;quot;parcel casa_papel.html&amp;quot;,&lt;br /&gt;
    &amp;quot;build&amp;quot;: &amp;quot;parcel build --public-url . casa_papel.html&amp;quot;&lt;br /&gt;
  },&lt;br /&gt;
  &amp;quot;author&amp;quot;: &amp;quot;&amp;quot;,&lt;br /&gt;
  &amp;quot;license&amp;quot;: &amp;quot;ISC&amp;quot;,&lt;br /&gt;
  &amp;quot;devDependencies&amp;quot;: {&lt;br /&gt;
    &amp;quot;parcel&amp;quot;: &amp;quot;^1.12.4&amp;quot;,&lt;br /&gt;
    &amp;quot;parcel-bundler&amp;quot;: &amp;quot;^1.12.4&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ npm start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*localhost:1234&lt;br /&gt;
==Descarrega el codi==&lt;br /&gt;
*[[Fitxer:La casa de papel.zip]]&lt;br /&gt;
=Rutes BTT Cap de creus 2020 (El Port de la Selva)=&lt;br /&gt;
[[Fitxer:Cap creus btt.png | thumbnail]]&lt;br /&gt;
Tenim vàries rutes GPX i el que volem és pintar-les totes sobre el mapa. No es tracta de pintar tots els punts i unir-los amb una línia com tinc fet fins ara a rutesgps, sinó fer servir la possibilitat de pintar tot el track en una nova capa. L'exemple de partida és:&lt;br /&gt;
*https://openlayers.org/en/latest/examples/gpx.html&lt;br /&gt;
(El codi està a la mateixa carpeta que La Casa de Papel)&lt;br /&gt;
{{Autor}}, març 2020&lt;/div&gt;</summary>
		<author><name>Joan</name></author>
		
	</entry>
</feed>