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

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

Open
mattfullerton opened this issue Jan 10, 2018 · 1 comment
Assignees

Comments

@mattfullerton
Copy link

mattfullerton commented Jan 10, 2018

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.

@pduchesne pduchesne self-assigned this Jan 10, 2018
@pduchesne
Copy link

Indeed, there have been significant changes since the ckanext-spatial fork, and merely redirecting to the 'old' ckanext-spatial doc is no longer valid.
I'll rewrite that doc.

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

No branches or pull requests

2 participants