ckan / ckanext-geoview Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pduchesne/ckanext-geoview
CKAN Geospatial ResourceView
License: MIT License
This project forked from pduchesne/ckanext-geoview
CKAN Geospatial ResourceView
License: MIT License
Shouldnt Pip Install the requirements in pip-requirements.txt?
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting ckanext-geoview
Downloading https://files.pythonhosted.org/packages/e6/48/4e6fa5fe6a12d33440081a0873229bc6e8dbb38f959a6eb98513f166b99a/ckanext-geoview-0.0.16.tar.gz (988kB)
|████████████████████████████████| 993kB 2.1MB/s
Building wheels for collected packages: ckanext-geoview
Building wheel for ckanext-geoview (setup.py) ... done
Created wheel for ckanext-geoview: filename=ckanext_geoview-0.0.16-cp27-none-any.whl size=1041138 sha256=2025eb8c27218ff4fcdef45cd73ea815f1671c0f2e9b42923fe11a70634b4a66
Stored in directory: /home/user/.cache/pip/wheels/af/fc/00/0baa05a88dee758b515db082ee66e385715e235a8123f02356
Successfully built ckanext-geoview
Installing collected packages: ckanext-geoview
Successfully installed ckanext-geoview-0.0.16
(default) [user@server ckan]$ paster db upgrade -c /etc/ckan/default/production.ini
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 11, in <module>
sys.exit(run())
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 102, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 141, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/script/command.py", line 236, in run
result = self.command()
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 357, in command
self._load_config(cmd!='upgrade')
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 330, in _load_config
self.site_user = load_config(self.options.config, load_site_user)
File "/usr/lib/ckan/default/src/ckan/ckan/lib/cli.py", line 237, in load_config
load_environment(conf.global_conf, conf.local_conf)
File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 112, in load_environment
p.load_all()
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 140, in load_all
load(*plugins)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 154, in load
service = _get_service(plugin)
File "/usr/lib/ckan/default/src/ckan/ckan/plugins/core.py", line 256, in _get_service
return plugin.load()(name=plugin_name)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/lib/ckan/default/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/ckanext/geoview/plugin.py", line 7, in <module>
import ckantoolkit as toolkit
ImportError: No module named ckantoolkit
txt?
I'm trying to display https://raw.githubusercontent.com/chrisfinch/over9k/master/public/experiments/march-2013/GBR_adm2.json as a GeoJSON resource. In the GeoJSON tab I get the correct map. But in the Map viewer tab which is displayed first (why are there two anyway here?) I get this error in the browser console:
XMLHttpRequest cannot load https://raw.githubusercontent.com/chrisfinch/over9k/master/public/experiments/march-2013/GBR_adm2.json.
Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers in preflight response.
Note that I deliberately do not use resource_proxy since I only want to support resources with proper CORS headers, which in this case above it has.
Hi,
This is a fine extension, thank you for this.
I've managed to display geojson data without problem (well, actually, it took me some time to understand I needed to declare 'geojson' in the format field for it to work), but I am having trouble displaying WFS data.
I'm trying to follow the instructions on https://github.com/ckan/ckanext-geoview#openlayers-viewer and thus, if I understand correctly the instructions, http://webgis.regione.sardegna.it/geoserver/wfs#anagrafe_biblioteche_view should display the anagrafe_biblioteche_view data (dots) on the OL map. But I'm gettinf nothing. Could you tell me what I'm doing wrong ?
Thanks !
But GML from a WFS link does, e.g.
For the WFS service:
http://geodienste-hamburg.de/HH_WFS_BWVI_opendata?REQUEST=GetCapabilities&SERVICE=WFS
You can get a single layer like this:
http://geodienste-hamburg.de/HH_WFS_BWVI_opendata?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&TYPENAME=verkehr_baustellen_prod&srsName=EPSG:4326
The format is then GML and not WFS.
File '/home/adria/dev/pyenvs/ckan_plain/src/ckan/ckan/controllers/package.py', line 1623 in resource_view
return h.rendered_resource_view(view, resource, package, embed=True)
File '/home/adria/dev/pyenvs/ckan_plain/src/ckan/ckan/lib/helpers.py', line 1757 in rendered_resource_view
vars = view_plugin.setup_template_variables(context, data_dict) or {}
File '/home/adria/dev/pyenvs/ckan_plain/src/ckanext-geoview/ckanext/geoview/plugin.py', line 152 in setup_template_variables
p.toolkit.c.resource['proxy_url'] = proxy.get_proxified_resource_url(data_dict)
TypeError: 'str' object does not support item assignment
After installing the latest version of ckanext-geoview
with OpenLayers Viewer
(CKAN 2.8), the server produce the following exception:
2019-10-29 13:54:00,074 ERROR [ckan.config.middleware.flask_app] 'werkzeug.local.LocalProxy object' has no attribute 'resource'
Traceback (most recent call last):
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/lib/ckan/venv/src/ckan/ckan/views/resource.py", line 585, in view
return h.rendered_resource_view(view, resource, package, embed=True)
File "/usr/lib/ckan/venv/src/ckan/ckan/lib/helpers.py", line 2303, in rendered_resource_view
return literal(base.render(template, extra_vars=data_dict))
File "/usr/lib/ckan/venv/src/ckan/ckan/lib/base.py", line 150, in render
return flask_render_template(template_name, **extra_vars)
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/flask/templating.py", line 140, in render_template
...
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/dataviewer/base.html", line 1, in top-level template code
{% extends "base.html" %}
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/ckanext/geoview/templates/base.html", line 1, in top-level template code
{% ckan_extends %}
File "/usr/lib/ckan/venv/src/ckan/ckan/templates/base.html", line 106, in top-level template code
{%- block page %}{% endblock -%}
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/ckanext/geoview/templates/dataviewer/openlayers2.html", line 9, in block "page"
data-module-gapi_key="{{ gapi_key or c.resource.gapi_key }}"
File "/usr/lib/ckan/venv/local/lib/python2.7/site-packages/jinja2/environment.py", line 430, in getattr
return getattr(obj, attribute)
UndefinedError: 'werkzeug.local.LocalProxy object' has no attribute 'resource'
We can probably remove the fusion table bits now it's dead as of 3rd Dec 2019: https://support.google.com/fusiontables/answer/2571232
Per this article:
http://devblog.mapquest.com/2016/06/15/modernization-of-mapquest-results-in-changes-to-open-tile-access/
This change seems to cause several, if not all, of the maps generated by this extension to no longer display as expected. Instead, the geo layer still renders over the map as expected but the map tiles are replaced with an image stating:
As of July 11,2016 direct tile access has been discontinued.
Please visit our blog post for more information http://goo.gl/xB0xXt
Have questions?
Contact us:
[email protected]
Visit us:
developer.mapquest.com/forum
I don't think this is an issue with this extension per-say... but is there any plan for remediation to restore functionality here?
Hi !
The extension is great, but I find the looks could be improved by :
Cheers
Hi Team
I have installed the extension as per readme, but I am not able to get the preview. No error is coming either in JS or in CKAN. Are there any dependencies that I need to install for ckanext-geoview to work properly.
The preview is completely blank page. Attaching the screenshot for the same.
Loading... The text is coming and after that, it went blank.
Thanks
Hi,
When configuring a WMS background layer,
ckanext-spatial requires a ckanext.spatial.common_map.wms.layers parameter
but geoview is looking for a ckanext.spatial.common_map.wms.layer one (singular)
when I install geoview with pip I'm not sure to install last plugin release. Could you tell me if I'm right or not?
Thanks
Sylvain
CKAN Version 2.6.2
Steps to reproduce the issue (Actual behavior):
Expected behavior: for creating geojson views filter should be added to the view.
This code:
https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/plugin.py#L149-L157
Is a problem. If we are on the same domain or the proxy is not enabled, proxy_service_url does not get set, even though it is unconditionally needed later
WIth proxy, a WMS URL like
http://services.nationalmap.gov/arcgis/services/nhd/MapServer/WMSServer?request=GetCapabilities&service=WMS
is transformed to
http://services.nationalmap.gov/arcgis/services/nhd/MapServer/WMSServer
before adding the parameters again.
But, when not using the proxy this stripping doesn't happen, so the result is something like:
http://services.nationalmap.gov/arcgis/services/nhd/MapServer/WMSServer?request=GetCapabilities&service=WMS&REQUEST=GetCapabilities&SERVICE=WMS
The only work-around currently is to define the resource url without parameters: http://services.nationalmap.gov/arcgis/services/nhd/MapServer/WMSServer
Otherwise some servers just fail with something like "cannot parse request".
Both scenarios, with and without proxy should behave identically.
In file ckanext/geoview/public/js/ol2_preview.js:
https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/js/ol2_preview.js#L286
https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/js/ol2_preview.js#L286
if CKAN instance root path differs from / (like /data) then path to images not valid
Rather than hanging up on "Loading..." forever
The GeoJSON preview in our CKAN instance has stopped working, the JavaScript console says
uncaught exception: No projection definition for code OGC:CRS84
That seems to be raised by proj4leaflet.
The relevant dataset definitely hasn't changed, and since it had been working before there's something else that I must have modified (although I don't remember what).
I'll look into it.
I would like to have multi basemap. However, adding a wms doesn't work as it only supports wms version 1.1.1. It seems in the code that if I do not define the version by default it is 1.3. So how in the json file I should indicate the version.
This is at the moment my configuration which doesn't load the wms due to the lack of version support from the wms:
(source: https://geodatenonline.bayern.de/geodatenonline/seiten/wms_dop80cm;jsessionid=EA8846B3A6D4D0418DB558049EB56F8F)
{ "title": "BY WMS", "type" : "wms", "url" : "https://geoservices.bayern.de/wms/v2/ogc_dop80_oa.cgi?", "version" : "1.1.1", "layer" : "by_dop80c", "srs" : "EPSG:4326", "extent" : [-180,-90,180,90] }
In addition, I would like to have mapbox as another basemap. How the configuration should look like? I thought it is there as it is the default basemap for my ckanext-spatial.
WMS layer displayed as broken tile on demo.ckan.org site . This is happening on kml layer too.
@corey Erickson
Hi,
The doc mentions the possibility to override the StyleMap in the resource's view config. But there is no StyleMap object, as far as I know, in OL4. Could you provide an example of a style override that would work, please ?
Thanks !
local variable 'proxy_service_url' referenced before assignment, because update_config doesn't seem to get called in plugin.py, so self.proxy_enabled isn't properly set
At least that the view/preview is loaded on CKAN 2.2 / 2.3. Ideally some JS ones as well.
I am using SSL, so with ckanext-spatial, I needed to use a custom tile server just so I could add the extra two characters in the url :)
I see SSL is now working without the custom server (brilliant!) but I'd like to keep using both extensions for a little while longer and stick with the custom server.
In any case, the problem: I've included the {s} wildcard for subdomains but it isn't getting replaced by one of the characters in ckanext.spatial.common_map.subdomains as used to happen with ckanext-spatial.
After install geoview, I see this error in the /var/log/apache2/ckan_default.error.log
file:
[Tue Feb 09 13:06:56.078155 2016] [:error] [pid 9319:tid 139956197000960] Error processing line 2 of /usr/lib/ckan/default/lib/python2.7/site-packages/ckanext_geoview-0.0.9-py2.7-nspkg.pth:
[Tue Feb 09 13:06:56.078219 2016] [:error] [pid 9319:tid 139956197000960]
[Tue Feb 09 13:06:56.078475 2016] [:error] [pid 9319:tid 139956197000960] Traceback (most recent call last):
[Tue Feb 09 13:06:56.078519 2016] [:error] [pid 9319:tid 139956197000960] File "/usr/lib/python2.7/site.py", line 158, in addpackage
[Tue Feb 09 13:06:56.078533 2016] [:error] [pid 9319:tid 139956197000960] exec line
[Tue Feb 09 13:06:56.078559 2016] [:error] [pid 9319:tid 139956197000960] File "<string>", line 1, in <module>
[Tue Feb 09 13:06:56.078574 2016] [:error] [pid 9319:tid 139956197000960] KeyError: 'ckanext'
[Tue Feb 09 13:06:56.078586 2016] [:error] [pid 9319:tid 139956197000960]
[Tue Feb 09 13:06:56.078597 2016] [:error] [pid 9319:tid 139956197000960] Remainder of file ignored
Once this plugin is installed I am unable to install other plugins - the same error gets generated.
On import phase, the following gets thrown by geoview:
$ paster --plugin=ckanext-harvest harvester import --config /etc/ckan/default/development.ini
/usr/lib/ckan/default/src/ckan/ckan/new_authz.py:6: FutureWarning: ckan.new_authz has been renamed to ckan.authz. The ckan.new_authz module will be removed in a future release.
FutureWarning)
2015-10-17 09:06:50,410 DEBUG [ckanext.spatial.model.package_extent] Spatial tables defined in memory
2015-10-17 09:06:50,417 DEBUG [ckanext.spatial.model.package_extent] Spatial tables already exist
2015-10-17 09:06:50,431 DEBUG [ckanext.harvest.model] Harvest tables defined in memory
2015-10-17 09:06:50,432 DEBUG [ckanext.harvest.model] Harvest tables already exist
2015-10-17 09:06:50,478 DEBUG [ckanext.harvest.model] Harvest tables already exist
DB tables created
2015-10-17 09:06:50,483 INFO [ckanext.harvest.logic.action.update] Harvest objects import: {'source_id': None, 'package_id': False, 'harvest_object_id': False}
2015-10-17 09:06:50,494 DEBUG [ckanext.dcat.harvesters.rdf] In DCATRDFHarvester import_stage
/usr/lib/ckan/default/local/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:79: SAWarning: Usage of the 'related attribute set' operation is not currently supported within the execution stage of the flush process. Results may not be consistent. Consider using alternative event listeners or connection-level operations instead.
sess._flush_warning("related attribute set")
2015-10-17 09:06:50,599 DEBUG [ckanext.spatial.plugin] Received: u'{"type": "Polygon", "coordinates": [[[-180.0, -90.0], [180.0, -90.0], [180.0, 90.0], [-180.0, 90.0], [-180.0, -90.0]]]}'
2015-10-17 09:06:50,610 DEBUG [ckanext.spatial.lib] Extent for package 1e85a8ef-efcc-4fa1-a40a-3cc1bec5c8bc unchanged
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 9, in <module>
load_entry_point('PasteScript==1.7.5', 'console_scripts', 'paster')()
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 143, in invoke
exit_code = runner.run(args)
File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py", line 238, in run
result = self.command()
File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/commands/harvester.py", line 152, in command
self.import_stage()
File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/commands/harvester.py", line 325, in import_stage
'package_id': self.options.package_id,
File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 429, in wrapped
result = _action(context, data_dict, **kw)
File "/usr/lib/ckan/default/src/ckanext-harvest/ckanext/harvest/logic/action/update.py", line 273, in harvest_objects_import
harvester.import_stage(obj)
File "/usr/lib/ckan/default/src/ckanext-dcat/ckanext/dcat/harvesters/rdf.py", line 284, in import_stage
p.toolkit.get_action('package_update')(context, dataset)
File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 429, in wrapped
result = _action(context, data_dict, **kw)
File "/usr/lib/ckan/default/src/ckan/ckan/logic/action/update.py", line 371, in package_update
{'package': data})
File "/usr/lib/ckan/default/src/ckan/ckan/logic/__init__.py", line 429, in wrapped
result = _action(context, data_dict, **kw)
File "/usr/lib/ckan/default/src/ckan/ckan/logic/action/create.py", line 468, in package_create_default_resource_views
create_datastore_views=create_datastore_views)
File "/usr/lib/ckan/default/src/ckan/ckan/lib/datapreview.py", line 303, in add_views_to_dataset_resources
create_datastore_views)
File "/usr/lib/ckan/default/src/ckan/ckan/lib/datapreview.py", line 261, in add_views_to_resource
'package': dataset_dict
File "/usr/lib/ckan/default/src/ckanext-geoview/ckanext/geoview/plugin.py", line 279, in can_view
format_lower = resource['format'].lower()
KeyError: 'format'
And I have no clue how to recover from that, since none of the clear or purge operations seem to work since the DB entries are now in an inconsistent state somehow. When I try to clear jobs I get:
An error occurred: [(IntegrityError) update or delete on table "package" violates foreign key constraint "harvest_object_package_id_fkey" on table "harvest_object" DETAIL: Key (id)=(1e85a8ef-efcc-4fa1-a40a-3cc1bec5c8bc) is still referenced from table "harvest_object". "begin; \n update package set state = 'to_delete' where id in (select package_id from harvest_object where harvest_source_id = 'fd15d7cd-b576-4577-acbb-7246eee9b41e');\n delete from resource_view where resource_id in (select id from resource where package_id in (select id from package where state = 'to_delete' ));\n delete from resource_revision where package_id in (select id from package where state = 'to_delete' );\n delete from resource where package_id in (select id from package where state = 'to_delete' );\n \n delete from harvest_object_error where harvest_object_id in (select id from harvest_object where harvest_source_id = 'fd15d7cd-b576-4577-acbb-7246eee9b41e');\n delete from harvest_object_extra where harvest_object_id in (select id from harvest_object where harvest_source_id = 'fd15d7cd-b576-4577-acbb-7246eee9b41e');\n delete from harvest_object where harvest_source_id = 'fd15d7cd-b576-4577-acbb-7246eee9b41e';\n delete from harvest_gather_error where harvest_job_id in (select id from harvest_job where source_id = 'fd15d7cd-b576-4577-acbb-7246eee9b41e');\n delete from harvest_job where source_id = 'fd15d7cd-b576-4577-acbb-7246eee9b41e';\n delete from package_role where package_id in (select id from package where state = 'to_delete' );\n delete from user_object_role where id not in (select user_object_role_id from package_role) and context = 'Package';\n delete from package_tag_revision where package_id in (select id from package where state = 'to_delete');\n delete from member_revision where table_id in (select id from package where state = 'to_delete');\n delete from package_extra_revision where package_id in (select id from package where state = 'to_delete');\n delete from package_revision where id in (select id from package where state = 'to_delete');\n delete from package_tag where package_id in (select id from package where state = 'to_delete');\n delete from package_extra where package_id in (select id from package where state = 'to_delete');\n delete from package_relationship_revision where subject_package_id in (select id from package where state = 'to_delete');\n delete from package_relationship_revision where object_package_id in (select id from package where state = 'to_delete');\n delete from package_relationship where subject_package_id in (select id from package where state = 'to_delete');\n delete from package_relationship where object_package_id in (select id from package where state = 'to_delete');\n delete from member where table_id in (select id from package where state = 'to_delete');\n delete from related_dataset where dataset_id in (select id from package where state = 'to_delete');\n delete from related where id in ('');\n delete from package where id in (select id from package where state = 'to_delete');\n commit;\n " {}]
I don't know what the release schedule is like, but may i request a newer version be tagged and have the pypi package updated to the newest version? The current version on pypi is v0.0.9 (Nov 2015).
Reason being is our environment is limited to pypi packages and our own github repos.
Hi,
I've had a hard time finding a configuration that would go well with both ckanext-spatial minimap and geoview openlayer's view. Wouldn't it be better to use completely separate config ?
For instance, this doc mentions the possibility of configuring WMTS base maps. But ckanext-spatial does not support it, as far as I know: https://github.com/ckan/ckanext-spatial/blob/master/ckanext/spatial/public/js/common_map.js#L42
When a GetCapabilities response example returns more than one style for a layer - list the style names and allow the user to select one of the styles for the resource preview.
If a legendURL element is included for a style, present the corresponding legend graphic with the display of the selected style.
As a viewer using GeoView to preview a WMS layer I would like the map to automatically zoom to a scale range so that the WMS layer is visible when the resource preview map is presented.
For example, this resource preview requires the viewer to zoom in until the WMS reaches the draw threshold, where as this resource preview presents the WMS layers at the default small scale used for the map (taken from the layer extent).
The WMS GetCapabilities response may provide MinScaleDenominator and MaxScaleDenominator parameters which specify the draw thresholds for the layer. It is proposed that the GeoView use these parameters if present to ensure the map zooms to a visible scale range for preview.
Proj4Leaflet requires that a projection definition statement is included. Something like:
proj4.defs("EPSG:26910", "+proj=utm +zone=10 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");
Should be trivial to pull out the projection from the geojson CRS property, but still necessary to find a way to populate the definition with the actual proj4 string.
There is some problems on execution, with CKAN 2.9 and python 3, did you try it on this configuration ?
Entered ESRI REST end point to dataset and tried to create new viewer for it but It only shows image as dropdown. See screen shot below:
@corey Erickson
The bundled version is 4.2, which was released Jun 12, 2017.
Has the team considered at least updating to the latest 4.x release (4.6.5), which has the Vector image render mode, which gives a big performance boost?
Try out the image vector render here - https://openlayers.org/en/latest/examples/drag-and-drop-image-vector.html
I'd like to use resource views of geoview without a proxy, which is ok since I require resources to have proper CORS headers. However, when I disable the resource_proxy extension, the WMS viewer still uses the proxy URL and gets a 404. The GeoJSON viewer uses the correct URL though.
I installed ckanext-geoview following installation instructions.
When I try to open a KML resource, CKAN isn't able to open OpenLayers in order to display my KML.
This is my ckan installation
If we are working with a WMS server that already provides a base layer and/or refuses to supply a base layer with Spherical Mercator projection, there is no way to transform the data to overlay the map. Right now OpenLayers decides to request Spherical Mercator projection anyway which returns XML error messages instead of PNG tiles which can then get plotted as big pink squares.
Brownish and Markers rather than default OL ones
As far as I can see, ckanext-geoview supports the visualization of resources of the format arcgis_rest
. However, it seems that using an ArcGIS MapServer as the base layer for visualizing resources of other formats (e.g. a separate GeoJSON file) is currently not supported (according to the docs, supported are Stamen, MapBox and custom XYZ URLs).
In the docs, we're told that geoview supports the same options as the ckanext-spatial map widgets. However, specifying type = stamen does not work because it isn't accounted for in this code:
https://github.com/ckan/ckanext-ghttps://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/js/ol_preview.js#L113
Also, the handler for no setting (https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/js/ol_preview.js#L129) doesn't work because OL_HELPERS.createLayerFromConfig (https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/js/ol_preview.js#L138) expects the type to be set:
https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/js/vendor/ol-helpers/ol-helpers.js#L1473
...the setting ought to be "XYZ", which is easy to fix, but this leads to the next problem where somewhere else a string is expected instead of an array of URLs. Around this point I gave up and just specified the map fully, and then the preview was fine. I also suspect this would be the easiest solution: say in the docs that the map must be fully specified and include/reference the example from ckanext-spatial for Stamen Watercolour but use Terrain instead as CKAN itself is trying to do.
I did not found any compatibility matrix for this extension.
Is this extension compatible with python3/ckan 2.9 ?
Thx.
When trying to view a WMS resource, using http://services.arcgisonline.com/arcgis/rest/Demographics/USE_Population_Density/MapServer/WMTS or other public wms
Uncaught TypeError: Cannot read property 'layers' of undefined(anonymous function) @ ol2_preview.js:5198OpenLayers.Request.GET.success @ ol2_preview.js:5043OpenLayers.Util.extend.runCallbacks @ ol2_preview.js:1871request.onreadystatechange @ ol2_preview.js:1867cXMLHttpRequest.dispatchEvent @ ol2_preview.js:1901fReadyStateChange @ ol2_preview.js:1904_object.onreadystatechange @ ol2_preview.js:1887
Here, on loading, for WMTS resources, the openlayers view freezes ("a web page is slowing down your browser"). The whole browser becomes unresponsive, as if there was some infinite loop or similar issue.
The issue happens both on firefox and chrome. It's not completely systematic though, somethings it works well (seems to work better when I have the debug console open, but doesn't work every time still...). Seems to work better also on initial load (as if having the scripts cached by the browser caused issues).
I get an orange colour that is almost identical to the roads on the mapquest tiles. I preferred the big ugly blue :)
Currently it's impossible to change most of the Leaflet options, since they are set automatically based on the more general map options (ckanext.spatial.common_map.*
). In my opinion, the options for Leaflet's map
should be separately configurable both via the INI:
ckanext.spatial.leaflet.map.zoom = 14
ckanext.spatial.leaflet.map.maxZoom = 16
This would require the support for a corresponding data-module-*
attribute in the JS modules, with the additional benefit of being able to change the Leaflet map options for a specific instance of the map (for example, if you're using both the normal preview and ckanext-spatial's dataset extent map and only want to change the configuration of the latter).
Dear Sir/Madam,
With present ckanext-geoview we are not able to add single WMS Layer i.e for ex:
WMS URL: http://localhost:8080/geoserver/test/wms
layer name: 'test:INDIA_STATE_250K'.
If we add getcability document ulr it is listing all the layrers, there is no mechanism to retrive single WMS layer details. Please add above capability to CKAN which will helpful create metadata/info regarding individual layer
ckanext-geoview version 0.0.16 does not work with CKAN 2.8, as Leaflet GeoJSON Viewer is showing TypeError: ckan is undefined
(reference: https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/js/common_map.js#L26) and the OpenLayers Viewer shows TypeError: this.ckan is undefined
(reference: https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/public/js/ol_preview.js#L13)
I was never able to tell how the data was being transformed with the old wms_view extension because there was no base layer. Now, I see that it is offset (for one source slightly, for another it would appear so badly that I see no data in the image).
(Select Hamburger Autobahn...ohne Verkehrslagedaten) as that should line up with the motorways)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.