How to use jupyter-leaflet - 10 common examples

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
}, this);
        // this.listenTo(this.model, 'change:line_width', function () {
        //     this.refresh();
        // }, this);
    }

})

var SuperMapEchartsLayerView = leaflet.LeafletLayerView.extend({
    create_obj: function () {
        var options = this.model.get('option');
        this.obj = L.supermap.echartsLayer(options);
    }
})

var SuperMapMapView = leaflet.LeafletMapView.extend({
    create_obj: function () {
        var that = this;
        var options = this.get_options();
        options.crs = L.CRS[options.crs]
        that.obj = L.map(this.el, options);
        var fit_bounds = that.model.get('fit_bounds')
        if (fit_bounds.length === 2) {
            that.obj.fitBounds(fit_bounds);
            that.update_bounds();
            this.model.set('zoom', that.obj.getZoom());
        }
    }
})


var SuperMapCloudTileLayerModel = leaflet.LeafletTileLayerModel.extend({
github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
_model_name: "SuperMapRankSymbolThemeLayerModel",
        _view_module: 'iclientpy',
        _model_module: 'iclientpy',
        _view_module_version: version,
        _model_module_version: version,


        name: '',
        data: [],
        theme_field: '',
        symbol_type: '',
        symbol_setting: {}
    })
})

var SuperMapMapVLayerModel = leaflet.LeafletLayerModel.extend({
    defaults: _.extend({}, leaflet.LeafletLayerModel.defaults, {
        _view_name: "SuperMapMapVLayerView",
        _model_name: "SuperMapMapVLayerModel",
        _view_module: 'iclientpy',
        _model_module: 'iclientpy',
        _view_module_version: version,
        _model_module_version: version,


        data_set: [],
        size: 1,
        global_alpha: 0.0,
        fill_style: '',
        shadow_color: '',
        shadow_blur: 0
    })
github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
map_name: '',
        type: ''
    })
})

var SuperMapTileMapLayerModel = leaflet.LeafletTileLayerModel.extend({
    defaults: _.extend({}, leaflet.LeafletTileLayerModel.defaults, {
        _view_name: 'SuperMapTileMapLayerView',
        _model_name: 'SuperMapTileMapLayerModel',
        _view_module: 'iclientpy',
        _model_module: 'iclientpy'
    })
})

var SuperMapRankSymbolThemeLayerModel = leaflet.LeafletLayerModel.extend({
    defaults: _.extend({}, leaflet.LeafletLayerModel.defaults, {
        _view_name: "SuperMapRankSymbolThemeLayerView",
        _model_name: "SuperMapRankSymbolThemeLayerModel",
        _view_module: 'iclientpy',
        _model_module: 'iclientpy',
        _view_module_version: version,
        _model_module_version: version,


        name: '',
        data: [],
        theme_field: '',
        symbol_type: '',
        symbol_setting: {}
    })
})
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);
github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
})
})

var SuperMapEchartsLayerModel = leaflet.LeafletLayerModel.extend({
    defaults: _.extend({}, leaflet.LeafletLayerModel.prototype.defaults, {
        _view_name: 'SuperMapEchartsLayerView',
        _model_name: 'SuperMapEchartsLayerModel',
        _view_module: 'iclientpy',
        _model_module: 'iclientpy',
        _view_module_version: version,
        _model_module_version: version,
        option: {}
    })
})

var SuperMapMapModel = leaflet.LeafletMapModel.extend({
    defaults: _.extend({}, leaflet.LeafletMapModel.prototype.defaults, {
        _view_name: 'SuperMapMapView',
        _model_name: 'SuperMapMapModel',
        _view_module: 'iclientpy',
        _model_module: 'iclientpy',
        _view_module_version: version,
        _model_module_version: version,
        crs: ''
    })
})

module.exports = _.extend({}, leaflet, {
    SuperMapRankSymbolThemeLayerView: SuperMapRankSymbolThemeLayerView,
    SuperMapCloudTileLayerView: SuperMapCloudTileLayerView,
    SuperMapTileMapLayerView: SuperMapTileMapLayerView,
    SuperMapHeatLayerView: SuperMapHeatLayerView,
github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
})

var SuperMapEchartsLayerModel = leaflet.LeafletLayerModel.extend({
    defaults: _.extend({}, leaflet.LeafletLayerModel.prototype.defaults, {
        _view_name: 'SuperMapEchartsLayerView',
        _model_name: 'SuperMapEchartsLayerModel',
        _view_module: 'iclientpy',
        _model_module: 'iclientpy',
        _view_module_version: version,
        _model_module_version: version,
        option: {}
    })
})

var SuperMapMapModel = leaflet.LeafletMapModel.extend({
    defaults: _.extend({}, leaflet.LeafletMapModel.prototype.defaults, {
        _view_name: 'SuperMapMapView',
        _model_name: 'SuperMapMapModel',
        _view_module: 'iclientpy',
        _model_module: 'iclientpy',
        _view_module_version: version,
        _model_module_version: version,
        crs: ''
    })
})

module.exports = _.extend({}, leaflet, {
    SuperMapRankSymbolThemeLayerView: SuperMapRankSymbolThemeLayerView,
    SuperMapCloudTileLayerView: SuperMapCloudTileLayerView,
    SuperMapTileMapLayerView: SuperMapTileMapLayerView,
    SuperMapHeatLayerView: SuperMapHeatLayerView,
    SuperMapMapVLayerView: SuperMapMapVLayerView,
github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
create_obj: function () {
        var that = this;
        var options = this.get_options();
        options.crs = L.CRS[options.crs]
        that.obj = L.map(this.el, options);
        var fit_bounds = that.model.get('fit_bounds')
        if (fit_bounds.length === 2) {
            that.obj.fitBounds(fit_bounds);
            that.update_bounds();
            this.model.set('zoom', that.obj.getZoom());
        }
    }
})


var SuperMapCloudTileLayerModel = leaflet.LeafletTileLayerModel.extend({
    defaults: _.extend({}, leaflet.LeafletTileLayerModel.prototype.defaults, {
        _view_name: 'SuperMapCloudTileLayerView',
        _model_name: 'SuperMapCloudTileLayerModel',
        _view_module: 'iclientpy',
        _model_module: 'iclientpy',
        map_name: '',
        type: ''
    })
})

var SuperMapTileMapLayerModel = leaflet.LeafletTileLayerModel.extend({
    defaults: _.extend({}, leaflet.LeafletTileLayerModel.defaults, {
        _view_name: 'SuperMapTileMapLayerView',
        _model_name: 'SuperMapTileMapLayerModel',
        _view_module: 'iclientpy',
        _model_module: 'iclientpy'
github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
var that = this;
        var options = this.get_options();
        options.crs = L.CRS[options.crs]
        that.obj = L.map(this.el, options);
        var fit_bounds = that.model.get('fit_bounds')
        if (fit_bounds.length === 2) {
            that.obj.fitBounds(fit_bounds);
            that.update_bounds();
            this.model.set('zoom', that.obj.getZoom());
        }
    }
})


var SuperMapCloudTileLayerModel = leaflet.LeafletTileLayerModel.extend({
    defaults: _.extend({}, leaflet.LeafletTileLayerModel.prototype.defaults, {
        _view_name: 'SuperMapCloudTileLayerView',
        _model_name: 'SuperMapCloudTileLayerModel',
        _view_module: 'iclientpy',
        _model_module: 'iclientpy',
        map_name: '',
        type: ''
    })
})

var SuperMapTileMapLayerModel = leaflet.LeafletTileLayerModel.extend({
    defaults: _.extend({}, leaflet.LeafletTileLayerModel.defaults, {
        _view_name: 'SuperMapTileMapLayerView',
        _model_name: 'SuperMapTileMapLayerModel',
        _view_module: 'iclientpy',
        _model_module: 'iclientpy'
    })
github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
var mapv = require('mapv')

var SuperMapCloudTileLayerView = leaflet.LeafletTileLayerView.extend({

    create_obj: function () {
        var url = this.model.get('url');
        var options = this.get_options();
        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);