ipyreact icon indicating copy to clipboard operation
ipyreact copied to clipboard

Developing widgets for ipyleaflet

Open giswqs opened this issue 2 years ago • 0 comments

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

giswqs avatar Aug 27 '23 02:08 giswqs