Giter Site home page Giter Site logo

ckanext-geoview's Issues

Pip install not installing requirements

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?

 

CORS issue in OpenLayers 2 viewer

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.

display WFS features

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 !

Exception on CKAN 2.3

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

OpenLaters Viewer no attribute "resource"

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'

MapQuest Discontinued Support

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?

Improve appearance of ol controls

Hi !

The extension is great, but I find the looks could be improved by :

  • adding the ol.controls.Zoom() (without it, the zoom bar is too abstract)
  • using the normal openlayers layer switcher UI (esp. for the icon and black background, that don't look pro)

Cheers

Not able to get the preview of KML files.

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.

screen shot 2018-05-15 at 6 02 15 pm

Thanks

Is pip extension version up2date?

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

Unable to add filters for GeoJson View for the resource

CKAN Version 2.6.2

Steps to reproduce the issue (Actual behavior):

  1. Go to "Dataset" tab of the portal
  2. Create new dataset and add geojson file for that resource (or click on some of the existing datasets with geojson file as a resource)
  3. Click on the geojson file and than click on "Manage" button - Edit Resource Page will be opened
  4. Click on Views tab on the same page
  5. From the Drop down of "New View" button choose "GeoJson" option
  6. Add "Title" for that View, "Description" and try to "Add Filters' for that resource view.
    Result no action was taken when clicking on filters.

Expected behavior: for creating geojson views filter should be added to the view.

URL parameter handling inconsistent with/without proxy

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.

No projection definition for code OGC:CRS84

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.

Local WMS as basemap

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.

Display features info

GetFeatureInfo for WMS, feature properties for vector formats, similar to the existing one on the GeoJSON view:

preview-geojson

Change feature style in OL geoview

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 !

Add tests

At least that the view/preview is loaded on CKAN 2.2 / 2.3. Ideally some JS ones as well.

ckanext.spatial.common_map.subdomains not used?

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.

KeyError: 'ckanext'

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.

Plugin is crashing the harvester

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 " {}]

Auto-zoom to visible scale range of WMS layer

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.

  • When GetCapabilities returns both a MinScaleDenominator and a MaxScaleDenominator -> select the zoom so that the scale is halfway between.
  • When GetCapabilities presents only the MaxScaleDenominator -> select a scale that is 80% of the MaxScaleDenominator.
  • When only the MinScaleDenominator is present select a scale that is 120% of the MinScaleDenominator

Leaflet not handling non EPSG:4326 projections

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.

Use resource views without proxy

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.

Option to turn off base layer for a view

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.

Support for ArcGIS base layer

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).

Openlayers views don't support non-specification of basemap or stamen type as suggested by ckanext-spatial notes on common basemap

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.

WMS viewer JS error

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

Freeze of the openlayers geoview page for WMTS layers

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).

Allow custom Leaflet options

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).

How are transforms handled?

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).

Example:
https://smartlane.io/dataset/different-geo-visualizations/resource/045d88a8-6a1e-4f41-b23c-fa5efa549d34?view_id=1a3ce747-e55d-4383-b29c-e8ea70f8d70e

(Select Hamburger Autobahn...ohne Verkehrslagedaten) as that should line up with the motorways)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.