ROGUE-JCTD / django-maploom

A Django wrapper for MapLoom.
Other
9 stars 21 forks source link

Error: We were unable to connect to this server, would still like to add this server ? #7

Open Gpetrak opened 7 years ago

Gpetrak commented 7 years ago

Hello, I replaced GeoExplorer with MapLoom in GeoNode following the instructions from django-maploom in GitHub( https://github.com/ROGUE-JCTD/django-maploom ). When browser renders the template, displays a popup error with the message: We were unable to connect to this server, would still like to add this server ? If I click yes it does nothing. Otherwise it displays the following:

Failed to load the server for the following reason: {"id":null"ptype":"gxp_wmscsource",,"config": {"url":"http://localhost:8080/geoserver/wms","restUrl":" /gs/rest","type:"gxp_wmscsource",isVirtualService":false}, "populatingLayerssConfig":false,"isVirtalService":false,lazy":false,"url" :"http:/localhost:8080/geoserver/wms","restUrl":"/gs/rest", "isLocal":true,"name":"local Geoserver","layersConfig":[]}

For the replacement of GeoExplorer in GeoNode I followed the steps below:

-- I installed GeoNode with custom installation. My GeoNode instance lives in /home/geonode/geonode -- I created a geonode-project and added data. -- Then with the command: pip install django-maploom Maploom was installed in /usr/local/lib/python2.7/dist-packages/maploom. --I Added maploom to INSTALLED_APPS in your project's settings module:

INSTALLED_APPS = ( 'maploom',

other apps

) before geoexplorer app. -- I added the MapLoom urls to the bottom of the urls.py file in GeoNode and append them to the GeoNode url patterns.

from maploom.geonode.urls import urlpatterns as maploom_urls

urlpatterns += maploom_urls

When I refreshed for the first time the /maps/new page browser could not find the MapLoom.js and MapLoom.css files. Thus I added them in geonode/static_root.

So after the above steps, after every refresh it raises the popup error. What am I doing wrong ?

garnertb commented 7 years ago

Can you confirm the address for your geoserver is: http://localhost:8080/geoserver?

Gpetrak commented 7 years ago

Yes, this is the address of my geoserver. Geonode runs in my local system also (http://localhost).

garnertb commented 7 years ago

Can you use the developer tools to inspect the network traffic going to localhost:8080/geoserver and post the request/response here?

Gpetrak commented 7 years ago

This is the only request related to geoserver that I found: http://localhost:8080/geoserver/wms?SERVICE=WMS&REQUEST=GetCapabilities Request method: OPTIONS status code: 200 ok Response: It displays an empty file

Also no logs in tomcat7 (catalina.out)

richard3d commented 7 years ago

Tyler,

I can confirm the same issue. I have been dealing with the same issue since working on Maploom/OSH. Although It's weird because it does seem to be able to hit the endpoint and I see the basic map render if I click 'yes'.