widgetti / ipyreact

React for ipywidgets that just works. No webpack, no npm, no hassle
BSD 3-Clause "New" or "Revised" License
119 stars 8 forks source link

Developing widgets for ipyleaflet #44

Open giswqs opened 1 year ago

giswqs commented 1 year ago

Is it possible to develop widgets for ipyleaflet using ipyreact or anywidget? For example, I am interested in using the Leaflet.TileLayer.MBTiles plugin with ipyleaflet. Below is a sample Javascript snippet. Any avdice on how to make this work with ipyleaflet would be greatly appreciated. @maartenbreddels @manzt

Sample dataset: countries.mbtiles

    import { MBTiles, mbtiles } from 'leaflet-tilelayer-mbtiles-ts';

    // Using the constructor...
    let mbtiles = new MBTiles('./assets/mysuperfile.mbtiles', options);

    // ... or use the factory
    mbtiles = mbtiles('./assets/mysuperfile.mbtiles', options);

    mbtiles.addTo(map);

https://github.com/jupyter-widgets/ipyleaflet/issues/1134