sparna-git / Sparnatural

Sparnatural : Typescript visual SPARQL query builder for knowledge graphs, configurable with SHACL
http://sparnatural.eu
GNU Lesser General Public License v3.0
206 stars 34 forks source link

Map is not displayed #576

Closed tfrancart closed 3 months ago

tfrancart commented 3 months ago

@antoine37120 I get an error in MapWidget on branch issue-549. I tried to compile and deployed on a demo page. The Map does not show up:

image

I get this console error:

Uncaught TypeError: L.PM is undefined
    addInitHooks leaflet-geoman.min.js:1
    callInitHooks leaflet-src.js:359
    initialize leaflet-src.js:3269
    n leaflet-src.js:302
    map leaflet-src.js:4863
    Ae MapWidget.ts:179
    render AddUserInputBtn.ts:21

Console screenshot:

image

tfrancart commented 3 months ago

Note : this works in the dev page, but does not work when bundled in Sparnatural through webpack

image

tfrancart commented 3 months ago

I suspect this is a conflict of versions between geoman and leaflet ? I tried updating the version in the package.json

tfrancart commented 3 months ago

See also https://github.com/geoman-io/leaflet-geoman/issues/790#issuecomment-803457036

tfrancart commented 3 months ago

This is an interaction with the Yasr Map display plugin, already fixed by Pascal here : https://github.com/SteinerPascal/plant-twin/blob/master/src/sparnaturalmanager/yasgui/plugins/map-plugin/MapPlugin.ts#L13 - Thanks @SteinerPascal :-)