[ckan-dev] Geojson - can't preview

Sasha Cuerda scuerda at ctdata.org
Thu Nov 3 14:36:55 UTC 2016


Hi Pedro,

It looks like your Map Viewer is working but the Leaflet viewer is not. In
the console I'm seeing a projection error stating "Uncaught No projection
definition for code OGC:CRS84".

Proj4Leaflet will either default to WGS84 if no CRS is present or will
coerce the data to the correct projection if CRS is populated. Even though
you are using what should be the default projection, Proj4Leaflet is still
trying to lookup the correct projection information to complete the
transformation.

You can either remove the project string or add a proj4.defs string
somewhere. I made a few modifications to ckanext-geoview and so I stuck a
file with this info in my public/js folder which results in the file being
bundle into geojson_preview.js, but you might be able to add it somewhere
in your template AFTER geojson_preview.js is loaded.

The line I added to deal with the projection I was working with was:

 proj4.defs("EPSG:26910", "+proj=utm +zone=10 +ellps=GRS80 +datum=NAD83
+units=m +no_defs");

Sasha

On Mon, Oct 31, 2016 at 1:55 PM, Pedro Ferro <pedro.ferro at gmail.com> wrote:

> Hi,
>
> I've install the plugin geoview with OpenLayers Viewer and Leaflet GeoJSON
> Viewer.
>
> My development.ini is like that:
> ckan.plugins = stats text_view image_view recline_view datastore
> datapusher pdf_view spatial_metadata spatial_query resource_proxy geo_view
> geojson_view
> ckan.views.default_views = image_view text_view recline_view geo_view
> geojson_view
>
>
> But can't preview this files:
> http://hermes.airc.pt:82/dataset/condeixa-nascimentos/
> resource/beca530a-cfe1-4c05-9f58-1fc4371ad07e?view_id=
> 2dbf4884-6810-4fc3-bcf7-02504b9361a5
>
> http://hermes.airc.pt:82/dataset/condeixa-populacao/
> resource/5e81a856-5aa4-4dab-a1fc-0fa0ccd68656?view_id=
> 1410cf15-f2e4-4b36-8f85-a6089a6273d5
>
> http://hermes.airc.pt:82/dataset/condeixa-edificios/
> resource/3591e3c7-7f75-4905-94ef-0f2875039f28?view_id=
> 00bcf4c9-054d-4f3d-b2f1-7c7dbe6f47a2
>
> http://hermes.airc.pt:82/dataset/condeixa-densidade-populacional/resource/
> 69b62a9f-690f-4047-8db5-ffc3552d074f?view_id=d21b2738-
> 02d2-4ffd-b647-bdfa65e5e8a7
>
>
> Appreciate any help,
>  Pedro
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>


-- 
CT Data Collaborative, Director of Technology
805 Brook St Building 4
Rocky Hill, CT 06067
M: (860) 385-4860
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20161103/d1a8d2cf/attachment-0003.html>


More information about the ckan-dev mailing list