appgeo / ckanext-agsview Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Users generally expect to see additional info when hovering over features.
cc @pgirard
The default value of ags_view_proxy function is set to an empty string, which throws Value Error: No JSON object could be decoded
if ckanext.ags_view_procy
is not set in the ini file
Fix: https://github.com/AppGeo/ckanext-agsview/blob/master/ckanext/agsview/plugin.py#L25 shall be set to {}
.
For maps like this - https://data.boston.gov/dataset/pedestrian-ramp-inventory/resource/f986314e-9fc2-4744-8522-33e9a772cc63
the resulting viz is not really usable. Could agsview be improved to support clustering? Perhaps, as a resource view option?
Was able to use a Proxy to serve up the this info
from
http://mapservices.bostonredevelopmentauthority.org/arcgis/rest/services/Maps/Zoning/MapServer/0
However, there is still mixed content warning from ags_fs_view/ags_ms_view js loading http://epsg.io.
https://github.com/AppGeo/ckanext-agsview/blob/master/ckanext/agsview/public/js/ags_fs_view.js#L72
https://github.com/AppGeo/ckanext-agsview/blob/master/ckanext/agsview/public/js/ags_ms_view.js#L106
See https://data.boston.gov/dataset/zoning-districts/resource/d993c51f-0224-429e-81c1-d71e1b507b5e
The git clone code in the readme is pointing to a non-existing repo.
Fixed it through this PR
When trying to embed it on a third party site, or when using ckanext-featuredviews to feature the map on the dataset landing page.
You get this Javascript error:
Uncaught TypeError: str.replace is not a function
at Object.trim (ags_fs_view.js:497)
at cleanUrl (ags_fs_view.js:14179)
at NewClass.initialize (ags_fs_view.js:16565)
at NewClass.initialize (ags_fs_view.js:17075)
at new NewClass (ags_fs_view.js:648)
at Object.featureLayer (ags_fs_view.js:17376)
at Module.loadJson (ags_fs_view.js:23094)
at Module.initialize (ags_fs_view.js:23090)
at Function.module.createInstance (jquery.form-warning.min.js;sandbox.min.js;module.min.js;pubsub.min.js;client.min.js;notify.min.js;i…:64)
at String.<anonymous> (jquery.form-warning.min.js;sandbox.min.js;module.min.js;pubsub.min.js;client.min.js;notify.min.js;i…:64)
There is a namespace issue if you install this extension along with ckanext-spatial.
Both extensions have a file that's labeled the same "public/js/common_map.js".
We are not running proxies and agsview has been returning an internal server error for the services we're working with. Logs below:
[Thu Aug 17 17:46:37.620186 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] data-module-path="{{ h.with_proxy(resource_view.get('ags_url') or resource.url) }}"
[Thu Aug 17 17:46:37.620188 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] File '/usr/lib/ckan/default/src/ckanext-agsview/ckanext/agsview/plugin.py', line 31 in w$
[Thu Aug 17 17:46:37.620190 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] proxies = json.loads(ags_view_proxy())
[Thu Aug 17 17:46:37.620192 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] File '/usr/lib/python2.7/json/init.py', line 338 in loads
[Thu Aug 17 17:46:37.620194 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] return _default_decoder.decode(s)
[Thu Aug 17 17:46:37.620195 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] File '/usr/lib/python2.7/json/decoder.py', line 366 in decode
[Thu Aug 17 17:46:37.620197 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] obj, end = self.raw_decode(s, idx=_w(s, 0).end())
[Thu Aug 17 17:46:37.620199 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] File '/usr/lib/python2.7/json/decoder.py', line 385 in raw_decode
[Thu Aug 17 17:46:37.620201 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] raise ValueError("No JSON object could be decoded")
[Thu Aug 17 17:46:37.620203 2017] [:error] [pid 17045:tid 140527971874560] [remote 127.0.0.1:42818] ValueError: No JSON object could be decoded
Rolled back to ac26b9e and now the plugin works. Are proxies required or is this a bug?
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.