[GeoNode-users] Adding layer from GeoExplorer porduces error

Simone Dalmasso simone.dalmasso at gmail.com
Mon Feb 8 06:05:27 PST 2016


No,
you can't modify it as it's a geonode url. The first option should work but
need to investigate further why it isn't.

2016-02-08 12:21 GMT+01:00 David Alda Fernandez de Lezea <dalda at hazi.eus>:

> Hi,
>
> It is definitely what is causing the problem. How can I change the res
> URL? Should it be like this?
>
> "restUrl": "/gs/rest/geonode"
>
> Regards,
>
> Agur bero bat,
>
>
> David Alda Fernández de Lezea
> Área de Sistemas de Información Geográfica, Planificación Territorial y
> Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren
> Arloa.
> dalda at hazi.eus | www.hazi.eus
> T 945 003 240 – M 627 923 170 – F 945 003 290
> Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute – Araba
>
> *********************  LEGE OHARRA   *******************   AVISOLEGAL
> *******************   DISCLAIMER   *****************************
> Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera
> debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta
> kontserbatu gabe.
> Este mensaje es personal y confidencial y su uso no autorizado está
> prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo,
> sin reenviarlo ni conservarlo.
> This message is personal and confidential, unauthorised use is legally
> prohibited. If you are not the intended recipient, delete it without
> resending or backing it.
>
> -----Mensaje original-----
> De: geonode-users [mailto:geonode-users-bounces at lists.osgeo.org] En
> nombre de David Alda Fernandez de Lezea
> Enviado el: lunes, 08 de febrero de 2016 10:02
> Para: Simone Dalmasso
> CC: geonode-users at lists.osgeo.org
> Asunto: Re: [GeoNode-users] Adding layer from GeoExplorer porduces error
>
> Hi Simone,
>
> Yeah, it’s accessible by
> http://192.168.1.190/layers/geonode%3Apuntos_rakel
>
> I also modified the settins.py last lines to get in the WMS combo box only
> the layers uploaded to geonode  workspace. Could that be the problem?
>
> if 'geonode.geoserver' in INSTALLED_APPS:
>     LOCAL_GEOSERVER = {
>         "source": {
>             "ptype": "gxp_wmscsource",
>             "url": OGC_SERVER['default']['PUBLIC_LOCATION'] +
> "geonode/wms",
>             "restUrl": "/gs/rest"
>         }
>     }
>     baselayers = MAP_BASELAYERS
>     MAP_BASELAYERS = [LOCAL_GEOSERVER]
>     MAP_BASELAYERS.extend(baselayers)
>
> Thanks.
>
> Agur bero bat,
>
>
>
> David Alda Fernández de Lezea
> Área de Sistemas de Información Geográfica, Planificación Territorial y
> Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren
> Arloa.
> dalda at hazi.eus | www.hazi.eus
> T 945 003 240 – M 627 923 170 – F 945 003 290
> Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute – Araba
>
> *********************  LEGE OHARRA   *******************   AVISOLEGAL
> *******************   DISCLAIMER   *****************************
> Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera
> debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta
> kontserbatu gabe.
> Este mensaje es personal y confidencial y su uso no autorizado está
> prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo,
> sin reenviarlo ni conservarlo.
> This message is personal and confidential, unauthorised use is legally
> prohibited. If you are not the intended recipient, delete it without
> resending or backing it.
>
> De: Simone Dalmasso [mailto:simone.dalmasso at gmail.com]
> Enviado el: jueves, 04 de febrero de 2016 16:06
> Para: David Alda Fernandez de Lezea
> CC: geonode-users at lists.osgeo.org
> Asunto: Re: [GeoNode-users] Adding layer from GeoExplorer porduces error
>
> oh yes sorry. Strange, the layer should use the typename of the layer like
> geonode:puntos_rakel. Does that layer exists and is accessible in geonode
> with that address?
>
> 2016-02-04 14:27 GMT+01:00 David Alda Fernandez de Lezea <dalda at hazi.eus>:
> Yeah, I usually do that with the layers that I load in GeoServer from
> different sources, but in this case is a user uploaded layer.. It is
> supposed that automatically it will load them, right?
>
> Regards,
>
> Agur bero bat,
>
>
>
> David Alda Fernández de Lezea
> Área de Sistemas de Información Geográfica, Planificación Territorial y
> Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren
> Arloa.
> dalda at hazi.eus | www.hazi.eus
> T 945 003 240 – M 627 923 170 – F 945 003 290
> Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute – Araba
>
> *********************  LEGE OHARRA   *******************   AVISOLEGAL
> *******************   DISCLAIMER   *****************************
> Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera
> debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta
> kontserbatu gabe.
> Este mensaje es personal y confidencial y su uso no autorizado está
> prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo,
> sin reenviarlo ni conservarlo.
> This message is personal and confidential, unauthorised use is legally
> prohibited. If you are not the intended recipient, delete it without
> resending or backing it.
>
> De: Simone Dalmasso [mailto:simone.dalmasso at gmail.com]
> Enviado el: jueves, 04 de febrero de 2016 13:53
> Para: David Alda Fernandez de Lezea
> CC: geonode-users at lists.osgeo.org
> Asunto: Re: [GeoNode-users] Adding layer from GeoExplorer porduces error
>
> Hi, you may need to run a geonode updatelayers in order to register them
> in geonode.
>
> 2016-02-04 11:33 GMT+01:00 David Alda Fernandez de Lezea <dalda at hazi.eus>:
> Hi List,
>
> I don’t know why but when I’m trying to add a layer in the geoexplorer
> interface I get an error 404 a prompt shows: PAGE NOT FOUND  Using fiddler
> I’ve seen that it fails requesting the url
>
> http://192.168.1.190/gs/puntos_rakel/edit-check
>
> where puntos_rakel is a previously added shape layer. It also occurs with
> all geoserver added layers.
>
> The full output from fiddler is
>
>
> <!DOCTYPE html>
> <html lang="en">
>   <head>
>     <meta charset="utf-8">
>     <meta http-equiv="X-UA-Compatible" content="IE=edge">
>     <meta name="viewport" content="width=device-width, initial-scale=1">
>     <title>GeoNode</title>
>
>
>       <link href="/static/lib/css/assets.min.css?v=2.4" rel="stylesheet"/>
>
>       <link href="/static/geonode/css/ext-compatibility.css?v=2.4"
> rel="stylesheet" />
>       <link href="/static/geonode/css/base.css?v=2.4" rel="stylesheet" />
>       <style
> type="text/css">[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none
> !important;}</style>
>
>
>
>     <!--[if IE]>
>       <script src="https://html5shim.googlecode.com/svn/trunk/html5.js
> "></script>
>       <style>
>         #ieflag{
>             display: block !important;
>             height: 150px;
>             text-align: center;
>         }
>       </style>
>     <![endif]-->
>     <link rel="search" type="application/opensearchdescription+xml"
> href="/catalogue/opensearch" title="GeoNode Search"/>
>   </head>
>
>   <body class="">
>
>
>     <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
>       <div class="container">
>         <div class="navbar-header">
>           <button type="button" class="navbar-toggle collapsed"
> data-toggle="collapse" data-target="#navbar">
>             <span class="sr-only">Toggle navigation</span>
>             <span class="icon-bar"></span>
>             <span class="icon-bar"></span>
>             <span class="icon-bar"></span>
>           </button>
>           <a class="navbar-brand" href="/">GeoNode</a>
>         </div>
>         <div id="navbar" class="navbar-collapse collapse">
>           <ul class="nav navbar-nav">
>
>             <li id="nav_layers">
>               <a href="/layers/">Capas</a>
>             </li>
>             <li id="nav_maps">
>               <a href="/maps/">Mapas</a>
>             </li>
>             <li id="nav_documents">
>               <a href="/documents/">Documentos</a>
>             </li>
>
>
>             <li id="nav_people">
>               <a href="/people/">Personas</a>
>             </li>
>             <li id="nav_groups">
>               <a href="/groups/">Grupos</a>
>             </li>
>
>           </ul>
>           <form class="navbar-form" id="search" action="/search/" >
>             <div class="col-md-3">
>               <div class="input-group">
>
>                 <input id="search_input" type="text" placeholder="Search"
> class="form-control" name="title__icontains">
>
>                 <span class="input-group-btn">
>                   <button class="btn btn-primary" type="submit"><i
> class="fa fa-search"></i></button>
>                 </span>
>               </div>
>             </div>
>           </form>
>           <ul class="nav navbar-nav navbar-right">
>
>
>             <li>
>               <a href="#" data-toggle="modal" data-target="#UserModal"
> role="button" aria-expanded="false">
>                 <img src="
> http://www.gravatar.com/avatar/d41d8cd98f00b204e9800998ecf8427e/?s=30"
> alt="u0899jbe" /> u0899jbe
>               </a>
>             </li>
>
>           </ul>
>         </div><!--/.nav-collapse -->
>       </div>
>     </nav>
>
>
>     <div class="alert alert-danger alert-dismissible" role="alert"
> id="ieflag" style="display:none">
>       <button type="button" class="close" data-dismiss="alert"
> aria-label="Close"><span aria-hidden="true">×</span></button>
>       <h1>You are using an outdated browser that is not supported by
> GeoNode.</h1>
>       <p>Please use a <strong>modern browser</strong> like Mozilla
> Firefox, Google Chrome or Safari.</p>
>     </div>
>
>   <div id="wrap">
>
>     <div class="container">
>       <div class="alert alert-warn" id="status-message" hidden="hidden">
>     <a class="close" onclick="$('.alert').hide()">×</a>
>     <strong><p id="status-message-text">Placeholder for
> status-message</p></strong>
>     <p id="status-message-text-body">Placeholder for
> status-message-body</p>
> </div>
>
>
>
>
>
>
>
>
>
>       <div class="row">
>         <div class="col-md-8">
>
>   <div id="description"><h3>Página no encontrada</h3></div>
>
> La página solicitada no existe. Tal vez usted está utilizando un marcador
> desactualizado.⏎
>
>         </div>
>         <div class="col-md-4">
>
>         </div>
>       </div>
>
>     </div>
>
>   </div>
>
>
>     <footer class="footer">
>       <div class="container">
>         <div class="row">
>           <div class="col-md-8">
>             Proporcionado por: <a href="http://geonode.org">GeoNode</a>
> <em>Versión 2.4</em> |
>             <a href="/developer/">Desarrolladores</a> |
>             <a href="/about/">Acerca de</a>
>           </div>
>           <div class="col-md-4">
>             <label class="hidden">Idioma</label>
>
>
>             <form class="form-inline" action="/i18n/setlang/"
> method="post">
>             <input type='hidden' name='csrfmiddlewaretoken'
> value='jwfEKZjzwie2cflbenmB0s4wNuXKAFTn' />
>               <select class="col-md-6 pull-right" name="language"
> onchange="javascript:form.submit()">
>
>                 <option value="en" >
>                   English
>                 </option>
>
>                 <option value="es"  selected="selected">
>                   Español
>                 </option>
>
>                 <option value="it" >
>                   Italiano
>                 </option>
>
>                 <option value="fr" >
>                   Français
>                 </option>
>
>                 <option value="de" >
>                   Deutsch
>                 </option>
>
>                 <option value="el" >
>                   Ελληνικά
>                 </option>
>
>                 <option value="id" >
>                   Bahasa Indonesia
>                 </option>
>
>                 <option value="zh-cn" >
>                   中文
>                 </option>
>
>                 <option value="ja" >
>                   日本語
>                 </option>
>
>                 <option value="fa" >
>                   Persian
>                 </option>
>
>                 <option value="ar" >
>                   Arabic
>                 </option>
>
>                 <option value="bn" >
>                   Bengali
>                 </option>
>
>                 <option value="ne" >
>                   Nepali
>                 </option>
>
>                 <option value="sq" >
>                   Albanian
>                 </option>
>
>                 <option value="af" >
>                   Afrikaans
>                 </option>
>
>                 <option value="sw" >
>                   Swahili
>                 </option>
>
>                 <option value="pt" >
>                   Portuguese
>                 </option>
>
>                 <option value="ru" >
>                   Russian
>                 </option>
>
>                 <option value="vi" >
>                   Vietnamese
>                 </option>
>
>                 <option value="ko" >
>                   한국어
>                 </option>
>
>                 <option value="am" >
>                   Amharic
>                 </option>
>
>                 <option value="km" >
>                   Khmer
>                 </option>
>
>                 <option value="pl" >
>                   Polish
>                 </option>
>
>                 <option value="sv" >
>                   Swedish
>                 </option>
>
>                 <option value="th" >
>                   ไทย
>                 </option>
>
>                 <option value="uk" >
>                   Ukranian
>                 </option>
>
>                 <option value="si" >
>                   Sinhala
>                 </option>
>
>                 <option value="ta" >
>                   Tamil
>                 </option>
>
>                 <option value="tl" >
>                   Tagalog
>                 </option>
>
>               </select>
>             </form>
>
>           </div>
>         </div>
>       </div>
>     </footer>
>
>
>
>     <!-- Modal must stay outside the navbar -->
>
>     <div class="modal fade" id="UserModal" tabindex="-1" role="dialog"
> aria-labelledby="myModalLabel" aria-hidden="true">
>       <div class="modal-dialog modal-sm">
>         <div class="modal-content">
>           <div class="modal-header">
>             <button type="button" class="close" data-dismiss="modal"
> aria-hidden="true">×</button>
>             <h4 class="modal-title" id="myModalLabel">Menu</h4>
>           </div>
>           <div class="modal-body">
>             <ul class="list-unstyled">
>               <li><a href="/layers/upload"><i class="fa
> fa-cloud-upload"></i> Subir Capas</a></li>
>               <li class="modal-divider"></li>
>               <li><a href="/people/profile/u0899jbe/"><i class="fa
> fa-user"></i> Perfil</a></li>
>               <li><a href="/social/recent-activity"><i class="fa
> fa-fire"></i> Reciente Actividad</a></li>
>               <li><a href="/messages/inbox/"><i class="fa fa-inbox"></i>
> Bandeja de entrada</a></li>
>
>
>
>
>
>
>               <li class="modal-divider"></li>
>               <li><a title="Help" rel="tooltip" href="/help/"><i class="fa
> fa-question-circle"></i> Ayuda</a></li>
>             </ul>
>           </div>
>           <div class="modal-footer">
>             <form action="/account/logout/" id="logout_form" method="post">
>               <input type='hidden' name='csrfmiddlewaretoken'
> value='jwfEKZjzwie2cflbenmB0s4wNuXKAFTn' />
>               <a class="btn btn-warning btn-block" href="javascript:{}"
> onclick="document.getElementById('logout_form').submit();">Salir</a>
>             </form>
>           </div>
>         </div>
>       </div>
>     </div>
>
>     <!-- End of Modal -->
>
>
>     <script src="/static/lib/js/assets.min.js?v=2.4"></script>
>
>     <script src="/static/geonode/js/utils/utils.js?v=2.4"></script>
>     <script src="/static/geonode/js/base/base.js?v=2.4"></script>
>
>
> <script type="text/javascript">
> jQuery(function($) {
> function getCookie(name) {
>     var cookieValue = null;
>     if (document.cookie && document.cookie != '') {
>         var cookies = document.cookie.split(';');
>         for (var i = 0; i < cookies.length; i++) {
>             var cookie = jQuery.trim(cookies[i]);
>             // Does this cookie string begin with the name we want?
>             if (cookie.substring(0, name.length + 1) == (name + '=')) {
>                 cookieValue =
> decodeURIComponent(cookie.substring(name.length + 1));
>                 break;
>             }
>         }
>     }
>     return cookieValue;
> }
> function csrfSafeMethod(method) {
>     // these HTTP methods do not require CSRF protection
>     return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
> }
> function sameOrigin(url) {
>     // test that a given url is a same-origin URL
>     // url could be relative or scheme relative or absolute
>     var host = document.location.host; // host + port
>     var protocol = document.location.protocol;
>     var sr_origin = '//' + host;
>     var origin = protocol + sr_origin;
>     // Allow absolute or scheme relative URLs to same origin
>     return (url == origin || url.slice(0, origin.length + 1) == origin +
> '/') ||
>         (url == sr_origin || url.slice(0, sr_origin.length + 1) ==
> sr_origin + '/') ||
>         // or any other URL that isn't scheme relative or absolute i.e
> relative.
>         !(/^(\/\/|http:|https:).*/.test(url));
> }
> $.ajaxSetup({
>     beforeSend: function(xhr, settings) {
>         if (!csrfSafeMethod(settings.type) && sameOrigin(settings.url)) {
>             // Send the token to same-origin, relative URLs only.
>             // Send the token only if the method warrants CSRF protection
>             // Using the CSRFToken value acquired earlier
>             xhr.setRequestHeader("X-CSRFToken", getCookie('csrftoken'));
>         }
>     }
> });
> });
> </script>
>
>
> <script type="text/javascript"
> src="/static/autocomplete_light/django_admin.js"></script>
> <script type="text/javascript"
> src="/static/autocomplete_light/autocomplete.js"></script>
> <script type="text/javascript"
> src="/static/autocomplete_light/widget.js"></script>
> <script type="text/javascript"
> src="/static/autocomplete_light/addanother.js"></script>
> <script type="text/javascript"
> src="/static/autocomplete_light/text_widget.js"></script>
> <script type="text/javascript"
> src="/static/autocomplete_light/remote.js"></script>
> <link rel="stylesheet" type="text/css"
> href="/static/autocomplete_light/style.css" />
>
>     <script type="text/javascript" src="/jsi18n/"></script>
>
>     <script type="text/javascript">
>         var autocomplete = $('#search_input').yourlabsAutocomplete({
>             url: '/autocomplete/ResourceBaseAutocomplete/',
>             choiceSelector: 'span',
>             hideAfter: 200,
>             minimumCharacters: 1,
>             placeholder: 'Escriba aquí su busqueda  ...',
>             appendAutocomplete: $('#search_input'),
>             autoHilightFirst: false
>         });
>         $('#search_input').bind('selectChoice', function(e, choice,
> autocomplete) {
>             if(choice[0].children[0] == undefined) {
>                 $('#search_input').val($(choice[0]).text());
>                 $('#search').submit();
>             }
>         });
>     </script>
>     <script>
>         // Workaround to fix the autocomplete box positions
>         yourlabs.Autocomplete.prototype.fixPosition = function(html) {
>             this.input.parents().filter(function() {
>                 return $(this).css('overflow') === 'hidden';
>             }).first().css('overflow', 'visible');
>             if(this.input.attr('name') !== 'resource-keywords'){
>               this.box.insertAfter(this.input).css({top: 0, left: 0});
>             }else{
>               var pos = $.extend({}, this.input.position(), {
>                 height: this.input.outerHeight()
>               });
>               this.box.insertAfter(this.input).css({top: pos.top +
> pos.height, left: pos.left});
>             }
>         };
>     </script>
>     <script type="text/javascript" src="/lang.js"></script>
>
>   </body>
> </html>
>
>
>
> Any Ideas?
>
>
> Thanks.
>
>
> Agur bero bat,
>
>
> David Alda Fernández de Lezea
> Área de Sistemas de Información Geográfica, Planificación Territorial y
> Forestal Informazio Geografikoen Sistemak, Lurralde eta Baso Antolaketaren
> Arloa.
> dalda at hazi.eus | www.hazi.eus
> T 945 003 240 – M 627 923 170 – F 945 003 290
> Hazi | Granja Modelo de Arkaute s/n | 01192 Arkaute – Araba
>
> *********************  LEGE OHARRA   *******************   AVISOLEGAL
> *******************   DISCLAIMER   *****************************
> Mezu hau pertsonala eta isilpekoa da eta baimenik gabeko erabilera
> debekatua dago legalki. Jasotzailea ez bazara ezabatu mezua, bidali eta
> kontserbatu gabe.
> Este mensaje es personal y confidencial y su uso no autorizado está
> prohibido legalmente. Si usted no es el destinatario, proceda a borrarlo,
> sin reenviarlo ni conservarlo.
> This message is personal and confidential, unauthorised use is legally
> prohibited. If you are not the intended recipient, delete it without
> resending or backing it.
>
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-users
>
>
>
>
> --
> Simone
>
>
>
>
> --
> Simone
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-users
>



-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160208/5a954275/attachment-0001.html>


More information about the geonode-users mailing list