[qgis-qwc2] How to display local KML files inside the map

Roman Meier roman.meier at gismap.ch
Sun Jan 26 00:49:16 PST 2020


Hi folks,

I forgot to mention that the browser console throws the following error
when trying to add the  kml file:

TypeError: style.getStroke(...) is null QWC2App.js line 16770 > eval:256:30
    kmlToGeoJSON
webpack:///./node_modules/qwc2/utils/VectorLayerUtils.js?:256
    ImportLayer
webpack:///./node_modules/qwc2/components/ImportLayer.jsx?:276
    onload webpack:///./node_modules/qwc2/components/ImportLayer.jsx?:255

I have also attached the kml file I'm using for these tests.

Kind regards,
Roman

> Hi Sandro,
>
> I'm using the last theme of the demo-app which covers the whole world. The
> kml file contains data located in USA. It shows nicely using QGIS.
>
> The issue seems to be that the layer is not added upon clicking "Add
> layer". Shouldn't the layer be added to the layer tree?
>
> This is not happening here.
>
> Kind regards,
> Roman
>
>> Hi Roman
>>
>> Make sure the sample data you are trying to display is actually located
>> somewhere in the extent of your theme, otherwise it might be that you
>> don't see it just because it's somewhere far away.
>>
>> Supported formats are KML and GeoJSON. For instance, you can also export
>> a redlining layer to GeoJSON from the layertree and then re-import that
>> file.
>>
>> Sandro
>>
>> On 10.01.20 13:06, Roman Meier wrote:
>>> Hi folks,
>>>
>>> The demo-app allows the display of data stored locally in a file.
>>> Unfortunately I couldn't find any documentation on this topic related
>>> to
>>> QWC2.
>>>
>>> It appears though that KML files are supported. I downloaded a sample
>>> file
>>> from https://developers.google.com/kml/documentation/kml_tut.
>>>
>>> This file seams to be read and the file size is displayed but upon
>>> click
>>> on "Add layer" nothing happens.
>>>
>>> Es there a sample file known to work in the demo-app so I can test
>>> this?
>>>
>>> Kind regards,
>>> Roman
>>>
>>> _______________________________________________
>>> qgis-qwc2 mailing list
>>> qgis-qwc2 at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/qgis-qwc2
>>
>
>
> _______________________________________________
> qgis-qwc2 mailing list
> qgis-qwc2 at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/qgis-qwc2
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KML_Samples.kml
Type: application/vnd.google-earth.kml+xml
Size: 35920 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-qwc2/attachments/20200126/21d9a382/attachment-0001.kml>


More information about the qgis-qwc2 mailing list