Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use MapLoom as map client for Cartoview #144

Open
lolob opened this issue Feb 21, 2018 · 0 comments
Open

Use MapLoom as map client for Cartoview #144

lolob opened this issue Feb 21, 2018 · 0 comments
Labels

Comments

@lolob
Copy link

lolob commented Feb 21, 2018

  • Cartoview Version : 1.2.55
  • Geonode Version : 2.6.1

I need help to make MapLoom (pip install django-maploom) as map client for Cartoview. The default is geoExplorer. Does anyone know how to configure it? Bellow are snippets of my settings.py file;

OGC_SERVER['default']['GEOGIG_ENABLED'] = True
OGC_SERVER['default']['WMST_ENABLED'] = False
OGC_SERVER['default']['BACKEND_WRITE_ENABLED'] = True
OGC_SERVER['default']['WPS_ENABLED'] = True
OGC_SERVER['default']['LOG_FILE'] = os.path.join(BASE_DIR, "geoserver.log")
OGC_SERVER['default']['PG_GEOGIG'] = False
OGC_SERVER['default']['GEOGIG_DATASTORE_DIR'] = "postgres://postgres:sdadmin@localhost:5432/cartoview_datastore"
if 'datastore' in DATABASES:
  OGC_SERVER['default']['DATASTORE'] = 'datastore'

MIDDLEWARE_CLASSES += ( "django.middleware.gzip.GZipMiddleware",)

if 'geonode.geoserver' in INSTALLED_APPS and "LOCAL_GEOSERVER" in locals() and LOCAL_GEOSERVER in MAP_BASELAYERS:
       LOCAL_GEOSERVER["source"]["url"] = OGC_SERVER['default']['PUBLIC_LOCATION'] + "wms"


#uncomment the following to enable geonode client
INSTALLED_APPS += ('maploom',)
#LAYER_PREVIEW_LIBRARY="react"

And my urls.py file;

from django.conf.urls import include, url
from django.contrib import admin
from maploom.geonode.urls import urlpatterns as maploom_urls

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
]
maploom_urls = patterns('',
                       url(r'^maploom/maps/new', 'geonode.maps.views.new_map', {'template': 'maps/maploom.html'},
                           name='maploom-map-new'),
                       url(r'^maploom/maps/(?P<mapid>\d+)/view', 'geonode.maps.views.map_view',
                           {'template': 'maps/maploom.html'}, name='maploom-map-view'),)
#from osgeo_importer.urls import urlpatterns as importer_urlpatterns
#urlpatterns += importer_urlpatterns
urlpatterns += maploom_urls

I also run python manage.py collectstatic at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants