Package: ckanext-versioned-tiledmap
ckanext-versioned-tiledmapA CKAN extension with a map view for versioned-datastore backed resources.OverviewA CKAN plugin with a map view for versioned-datastore backed resources allowing for map visualizations of large resources with millions of data points.This repository is a fork* ofckanext-map.*you can't fork repositories within the same organisation, so this repository is a duplicate of ckanext-map.InstallationPath variables used below:$INSTALL_FOLDER(i.e. where CKAN is installed), e.g./usr/lib/ckan/default$CONFIG_FILE, e.g./etc/ckan/default/development.iniPre-install setupThis extension depends on the following projects, which must be installedfirst:versioned-datastore-tile-serverInstalling from PyPIpipinstallckanext-versioned-tiledmapInstalling from sourceClone the repository into thesrcfolder:cd$INSTALL_FOLDER/src
gitclonehttps://github.com/NaturalHistoryMuseum/ckanext-versioned-tiledmap.gitActivate the virtual env:.$INSTALL_FOLDER/bin/activateInstall via pip:pipinstall$INSTALL_FOLDER/src/ckanext-versioned-tiledmapInstalling in editable modeInstalling from apyproject.tomlin editable mode (i.e.pip install -e) requiressetuptools>=64; however, CKAN 2.9 requiressetuptools==44.1.0. Seeour CKAN forkfor a version of v2.9 that uses an updated setuptools if this functionality is something you need.Post-install setupAdd 'versioned_tiledmap' to the list of plugins in your$CONFIG_FILE:ckan.plugins=... versioned_tiledmapInstalllesscglobally:npminstall-g"less@~4.1"Add latitude and longitude fields for the resources you want to use this view for.ConfigurationThese are the options that can be specified in your .ini config file.NameDescriptionDefaultversioned_tilemap.tile_layer.urlThe URL to use for the base world tileshttps://{s}.tile.openstreetmap.org/{z}/{x}/{y}.pngversioned_tilemap.tile_layer.attributionThe attribution text to show for this layer (can be HTML)Base tiles provided by OpenStreetMap. <a href="openstreetmap.org/copyright">View copyright information</a>versioned_tilemap.tile_layer.opacityThe opacity for the tile layer0.8versioned_tilemap.zoom_bounds.minMinimum zoom level for initial display of the resource's data3versioned_tilemap.zoom_bounds.maxMaximum zoom level for initial display of the resource's data18versioned_tilemap.style.plot.point_radiusThe integer radius of the rendered points (including the border)4versioned_tilemap.style.plot.point_colourThe hex value to render the points in#ee0000versioned_tilemap.style.plot.border_widthThe integer border width of the rendered points1versioned_tilemap.style.plot.border_colourThe hex value to render the borders of the points in#ffffffversioned_tilemap.style.plot.grid_resolutionThe integer size of the cells in the grid that each tile is split into for the UTFGrid. The default of4produces a 64x64 grid within each tile4versioned_tilemap.style.gridded.cold_colourThe hex value to be used to render the points with the lowest counts#f4f11aversioned_tilemap.style.gridded.hot_colourThe hex value to be used to render the points with the highest counts#f02323versioned_tilemap.style.gridded.range_sizeThis many colours will be used to render the points dependant on their counts12versioned_tilemap.style.gridded.resize_factorA resize value to use when smoothing the tile. This value will be used to scale the tile and then down (with anti-aliasing) to produce a smoother output. Increasing this value will negatively impact performance4versioned_tilemap.style.gridded.grid_resolutionThe integer size of the cells in the grid that each tile is split into. The default of8produces a 32x32 grid within each tile and therefore matches the defaultgrid.jsonsetting too8versioned_tilemap.style.heatmap.point_radiusThe integer radius of the rendered points (including the border)8versioned_tilemap.style.heatmap.cold_colourThe hex value to be used to render the points with the lowest counts#0000eeversioned_tilemap.style.heatmap.hot_colourThe hex value to be used to render the points with the highest counts#ee0000versioned_tilemap.style.heatmap.intensityThe decimal intensity (between 0 and 1) to render the tile with0.5versioned_tilemap.info_templateThe name of the template to use when a point is clickedpoint_detailversioned_tilemap.quick_info_templateThe name of the template to use when a point is hovered overpoint_detail_hoverUsageAfter enabling this extension in the list of plugins, the Map view should become available for resources with latitude and longitude values.TestingThere is a Docker compose configuration available in this repository to make it easier to run tests. The ckan image uses the Dockerfile in thedocker/folder.To run the tests against ckan 2.9.x on Python3:Build the required images:docker-composebuildThen run the tests.
The root of the repository is mounted into the ckan container as a volume by the Docker compose
configuration, so you should only need to rebuild the ckan image if you change the extension's
dependencies.docker-composerunckan