cartoview
cartoview copied to clipboard
Use MapLoom as map client for Cartoview
- 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.