How to use the jupyter-leaflet.LeafletLayerView function in jupyter-leaflet

To help you get started, we’ve selected a few jupyter-leaflet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
this.listenTo(this.model, 'change:radius', function () {
            this.refresh();
        }, this);
        this.listenTo(this.model, 'change:min_opacity', function () {
            this.refresh();
        }, this);
        this.listenTo(this.model, 'change:blur', function () {
            this.refresh();
        }, this);
        this.listenTo(this.model, 'change:max', function () {
            this.refresh();
        }, this);
    }
})

var SuperMapMapVLayerView = leaflet.LeafletLayerView.extend({
    create_obj: function () {
        var dataSet = this.model.get('data_set');
        var options = this.get_options();
        var mapvOptions = this.model.get('map_v_options')
        var mapvDataSet = new mapv.DataSet(dataSet);
        this.obj = L.supermap.mapVLayer(mapvDataSet, mapvOptions, options)
    },

    refresh: function () {
        var mapvOptions = this.model.get('map_v_options')
        mapvOptions.size = this.model.get('size');
        mapvOptions.globalAlpha = this.model.get('global_alpha');
        mapvOptions.fillStyle = this.model.get('fill_style');
        mapvOptions.shadowColor = this.model.get('shadow_color');
        mapvOptions.shadowBlur = this.model.get('shadow_blur');
        // mapvOptions.lineWidth = this.model.get('line_width');
github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
if (!options.attribution) {
            delete options.attribution;
        }
        this.obj = L.supermap.cloudTileLayer(url, options);
    }

})

var SuperMapTileMapLayerView = leaflet.LeafletTileLayerView.extend({
    create_obj: function () {
        var url = this.model.get('url')
        this.obj = L.supermap.tiledMapLayer(url)
    }
})

var SuperMapRankSymbolThemeLayerView = leaflet.LeafletLayerView.extend({
        create_obj: function () {
            var name = this.model.get('name');
            var symbolType = this.model.get('symbol_type')

            var options = this.get_options();
            if (!options.attribution) {
                delete options.attribution;
            }
            this.obj = L.supermap.rankSymbolThemeLayer(name, SuperMap.ChartType[symbolType], options);
            this.obj.addTo(this.map_view.obj);
            var showinfowinbind = _.bind(this.showInfoWin, this)
            var closeinfowinbind = _.bind(this.closeInfoWin, this)
            this.obj.on("mousemove", showinfowinbind);
            this.obj.on("mouseout", closeinfowinbind);
            var mouseoverbind = _.bind(this.mouseover, this)
            this.map_view.obj.on("mousemove", mouseoverbind);