[ckan-dev] GeoJSON preview misses resources in non-debug mode

Adrià Mercader adria.mercader at okfn.org
Wed Jun 26 11:18:50 UTC 2013


Hi, this can be fixed at the extension level.
I'll try and push a fix at some point this week.

https://github.com/okfn/ckanext-spatial/issues/26


Cheers,

Adrià

On 24 June 2013 09:56, Toby Dacre <toby.okfn at gmail.com> wrote:
> On 21 June 2013 14:50, Philippe Duchesne <pduchesne at gmail.com> wrote:
>> Hello all,
>>
>> i have had problems previewing geoJSON containing single points, as the icon
>> is not rendered in the browser.
>>
>> After some debugging, it turns out that:
>>
>>  - leaflet.js uses some regex to build icons URLs from the leaflet script
>> URL (see leaflet-src.js:3033 & 3039)
>>
>>  - when in no-debug mode, fanstatic is configured to generate bundled
>> resources URLs (middleware.py:87), resulting in :
>> http://master.ckan.org/fanstatic/ckanext-spatial/:version:2013-06-20T14:07:36/:bundle:js/vendor/leaflet/leaflet.js;js/geojson_preview.js
>>
>>  - my guess is that the leaflet mechanism chokes on those bundled URLs and
>> produces wrong icon URLs :
>> http://master.ckan.org/fanstatic/ckanext-spatial/:version:2013-06-20T14:07:36/:bundle:js/vendor/leaflet/images/marker-icon.png
>> (here i'm guessing that's what would happen on master.ckan.org)
>>
>> I temporarily solved this by deactivating the bundling altogether ; don't
>> know if there's a way to force a specific script (here leaflet.js) to be
>> left out of the bundle.
>
> dont_bundle would do this http://docs.ckan.org/en/latest/resources.html#main
>
>
>>
>> --p.
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>>
>
>
>
> --
> Toby Dacre
>
> The Open Knowledge Foundation
>
> Empowering through Open Knowledge
> http://okfn.org/  |  @okfn
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev




More information about the ckan-dev mailing list