<div dir="ltr">Dear Julierme, Alessio<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">According to <a href="https://mapstore.readthedocs.io/en/latest/developer-guide/maps-configuration/#wmts">https://mapstore.readthedocs.io/en/latest/developer-guide/maps-configuration/#wmts</a>, we have some Map Options: projection, zoom, layers, units, center, etc. Some of these Map Options / variables are available in the settings.py (<a href="https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L1398,L1403">https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L1398,L1403</a>). To which file these variables are passed? The reason I am asking is because I can try to pass the MAP 's source object straight in this file. </blockquote><br><br>The following steps describes how the map object is injected in the template of a map/layer viewer of GeoNode version 3.2.x:<br>- the template initializes the context using the ms2_config_converter.convert <a href="https://github.com/GeoNode/geonode-mapstore-client/blob/2.1.x/geonode_mapstore_client/hooksets.py#L162-L164">https://github.com/GeoNode/geonode-mapstore-client/blob/2.1.x/geonode_mapstore_client/hooksets.py#L162-L164</a><br>- the ms2_config_converter.convert function creates the map configuration that uses the settings such as MAP_BASELAYERS, CATALOGUE_SERVICES and CATALOGUE_SELECTED_SERVICE <a href="https://github.com/GeoNode/geonode-mapstore-client/blob/2.1.x/mapstore2_adapter/plugins/geonode.py#L107">https://github.com/GeoNode/geonode-mapstore-client/blob/2.1.x/mapstore2_adapter/plugins/geonode.py#L107</a><br>- the client read the configuration from the window.__GEONODE_CONFIG__ object accessible at window level where the resourceConfig represent the map configuration (similar to the new.json). The __GEONODE_CONFIG__ is defined in the _geonode_config.html template file <a href="https://github.com/GeoNode/geonode-mapstore-client/blob/2.1.x/geonode_mapstore_client/templates/geonode-mapstore-client/_geonode_config.html#L19">https://github.com/GeoNode/geonode-mapstore-client/blob/2.1.x/geonode_mapstore_client/templates/geonode-mapstore-client/_geonode_config.html#L19</a><br><br>So the window.__GEONODE_CONFIG__.resourceConfig represents the map configuration used by the client and it seems that the geonode-mapstore-client converter does not support the concept of map['sources'] and maybe this part could be extended and added to the setting.py + geonode/mapstore map converter to allow this addition.<br><br>I was thinking on the possibility to propose an override client side of the sources configuration by extending the _geonode_config.html template, something like:<br><br><font face="monospace">{% extends 'geonode-mapstore-client/_geonode_config.html' %}<br>{% block override_local_config %}<br><script><br> // check if the map configuration exist<br> if (window.__GEONODE_CONFIG__ && window.__GEONODE_CONFIG__.resourceConfig && window.__GEONODE_CONFIG__.resourceConfig.map) {<br> // add a static sources configuration client side<br> window.__GEONODE_CONFIG__.resourceConfig.map.sources = { /* sources configuration */ }<br> }<br></script><br>{% endblock %}</font><br><br>but I'm worried that this approach could break the saving and retrieving process of a map configuration due the fact that map['sources'] is not currently supported in the serializer/converter of the geonode-mapstore-client.<br>I just opened an issue to investigate on this enhancement for the future releases:<div><br><a href="https://github.com/GeoNode/geonode-mapstore-client/issues/280">https://github.com/GeoNode/geonode-mapstore-client/issues/280</a><br><br>Hope this help,<br>Kind Regards,<br><br>Stefano</div></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 25, 2021 at 4:50 PM 1520 gis <<a href="mailto:juliermeopensourcedeveloper@gmail.com">juliermeopensourcedeveloper@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Alessio,<div><br></div><div>Thank you very much for your reply. </div><div>According to <a href="https://mapstore.readthedocs.io/en/latest/developer-guide/maps-configuration/#wmts" target="_blank">https://mapstore.readthedocs.io/en/latest/developer-guide/maps-configuration/#wmts</a>, we have some Map Options: projection, zoom, layers, units, center, etc. Some of these Map Options / variables are available in the settings.py (<a href="https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L1398,L1403" target="_blank">https://github.com/GeoNode/geonode/blob/master/geonode/settings.py#L1398,L1403</a>). To which file these variables are passed? The reason I am asking is because I can try to pass the MAP 's source object straight in this file. <br><br>Thank you very much for your time in advance</div><div><br></div><div>Kind regards</div><div><br></div><div>Julierme<br><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 25, 2021 at 10:45 AM Alessio Fabiani <<a href="mailto:alessio.fabiani@geo-solutions.it" target="_blank">alessio.fabiani@geo-solutions.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><a class="gmail_plusreply" id="gmail-m_-7744897720049176501gmail-m_-3428332500712823645plusReplyChip-0" href="mailto:stefano.bovio@geo-solutions.it" target="_blank">@Stefano Bovio</a> any idea?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno ven 25 giu 2021 alle ore 13:41 1520 gis <<a href="mailto:juliermeopensourcedeveloper@gmail.com" target="_blank">juliermeopensourcedeveloper@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hill all, I got to load a WMTS Basemap Layer in MapStore/Core following <a href="https://mapstore.readthedocs.io/en/latest/developer-guide/maps-configuration/#wmts" target="_blank">https://mapstore.readthedocs.io/en/latest/developer-guide/maps-configuration/#wmts</a>. WMTS Layer requires a source object in the sources object of the map configuration where to retrieve the tileMatrixSet. Everything is working smoothly in MapStore/Core. Now, could anyone point me on how to pass the sources object of the map in GeoNode settings.py? Any direction will be very appreciated.<br><div><br></div><div>Thank you for your time in advance</div><div><br></div><div>Kind regards</div><div><br></div><div>Julierme</div></div>
_______________________________________________<br>
geonode-users mailing list<br>
<a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-family:Arial;font-size:11pt;white-space:pre-wrap">==</span><br></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">==</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Ing. Alessio Fabiani</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">@alfa7691</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Founder/Technical Lead</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">GeoSolutions S.A.S.</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Via di Montramito 3/A - </span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">55054 Massarosa (LU) - </span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Italy</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">phone: +39 0584 962313</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">fax: +39 0584 1660272</span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">mob: +39 331 6233686</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><a href="http://www.geo-solutions.it" target="_blank">http://www.geo-solutions.it</a></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><a href="http://twitter.com/geosolutions_it" target="_blank">http://twitter.com/geosolutions_it</a></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);background-color:rgb(255,255,255);font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">-------------------------------------------------------</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.</span></p><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.</span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span></p></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div>