Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def render(self, **kwargs):
super(TimestampedWmsTileLayers, self).render()
figure = self.get_root()
assert isinstance(figure, Figure), ('You cannot render this Element '
'if it is not in a Figure.')
figure.header.add_child(
JavascriptLink('https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js'), # noqa
name='jquery2.0.0')
figure.header.add_child(
JavascriptLink('https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js'), # noqa
name='jqueryui1.10.2')
figure.header.add_child(
JavascriptLink('https://rawcdn.githack.com/nezasa/iso8601-js-period/master/iso8601.min.js'), # noqa
name='iso8601')
figure.header.add_child(
JavascriptLink('https://rawcdn.githack.com/socib/Leaflet.TimeDimension/master/dist/leaflet.timedimension.min.js'), # noqa
name='leaflet.timedimension')
figure.header.add_child(
CssLink('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css'), # noqa
name='highlight.js_css')
figure.header.add_child(
CssLink('http://apps.socib.es/Leaflet.TimeDimension/dist/leaflet.timedimension.control.min.css'), # noqa
def render(self, **kwargs):
"""Renders the HTML representation of the element."""
super(RegularPolygonMarker, self).render()
figure = self.get_root()
assert isinstance(figure, Figure), ('You cannot render this Element '
'if it is not in a Figure.')
figure.header.add_child(
JavascriptLink('https://cdnjs.cloudflare.com/ajax/libs/leaflet-dvf/0.3.0/leaflet-dvf.markers.min.js'),
# noqa
name='dvf_js')
def _embed_vegalite_v2(self, figure):
self._vega_embed()
figure.header.add_child(JavascriptLink('https://cdn.jsdelivr.net/npm/vega@3'), name='vega')
figure.header.add_child(JavascriptLink('https://cdn.jsdelivr.net/npm/vega-lite@2'), name='vega-lite')
figure.header.add_child(JavascriptLink('https://cdn.jsdelivr.net/npm/vega-embed@3'), name='vega-embed')
def render(self, **kwargs):
figure = self.get_root()
assert isinstance(figure, Figure), ('You cannot render this Element '
'if it is not in a Figure.')
figure.header.add_child(JavascriptLink('https://rawcdn.githack.com/jieter/Leaflet.Sync/master/L.Map.Sync.js'), # noqa
name='Leaflet.Sync')
super(DualMap, self).render(**kwargs)
for child, name, index in self.children_for_m2:
if child._id in self.children_for_m2_copied:
# This map has been rendered before, child was copied already.
continue
child_copy = deep_copy(child)
if isinstance(child_copy, LayerControl):
child_copy.reset()
self.m2.add_child(child_copy, name, index)
# m2 has already been rendered, so render the child here:
child_copy.render()
self.children_for_m2_copied.append(child._id)
def render(self, **kwargs):
super(MousePosition, self).render()
figure = self.get_root()
assert isinstance(figure, Figure), ('You cannot render this Element '
'if it is not in a Figure.')
figure.header.add_child(JavascriptLink('https://rawcdn.githack.com/ardhi/Leaflet.MousePosition/c32f1c84/src/L.Control.MousePosition.js')) # noqa
figure.header.add_child(CssLink('https://rawcdn.githack.com/ardhi/Leaflet.MousePosition/c32f1c84/src/L.Control.MousePosition.css')) # noqa
figure = self._parent.get_root()
assert isinstance(figure, Figure), (
"You cannot render this Element if it's not in a Figure.")
figure.header.add_child(
CssLink("https://cdnjs.cloudflare.com/ajax/libs/dc/1.7.5/dc.css"),
name='dcjs_css')
figure.header.add_child(
CssLink("https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css"),
name='leaflet_css')
figure.header.add_child(
CssLink("https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"),
name='bootstrap_css')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"),
name='d3js')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.12/crossfilter.min.js"), # noqa
name='crossfilterjs')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/dc/2.0.0-beta.20/dc.js"),
name='dcjs')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"),
name='leaflet')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"), # noqa
name='underscorejs')
def _embed_vegalite_v3(self, figure):
self._vega_embed()
figure.header.add_child(JavascriptLink('https://cdn.jsdelivr.net/npm/vega@4'), name='vega')
figure.header.add_child(JavascriptLink('https://cdn.jsdelivr.net/npm/vega-lite@3'), name='vega-lite')
figure.header.add_child(JavascriptLink('https://cdn.jsdelivr.net/npm/vega-embed@3'), name='vega-embed')
name='leaflet_css')
figure.header.add_child(
CssLink("https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"),
name='bootstrap_css')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"),
name='d3js')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/crossfilter/1.3.12/crossfilter.min.js"), # noqa
name='crossfilterjs')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/dc/2.0.0-beta.20/dc.js"),
name='dcjs')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"),
name='leaflet')
figure.header.add_child(
JavascriptLink("https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"), # noqa
name='underscorejs')
def render(self, **kwargs):
super(HeatMapWithTime, self).render(**kwargs)
figure = self.get_root()
assert isinstance(figure, Figure), ('You cannot render this Element '
'if it is not in a Figure.')
figure.header.add_child(
JavascriptLink('https://rawcdn.githack.com/nezasa/iso8601-js-period/master/iso8601.min.js'), # noqa
name='iso8601')
figure.header.add_child(
JavascriptLink('https://rawcdn.githack.com/socib/Leaflet.TimeDimension/master/dist/leaflet.timedimension.min.js'), # noqa
name='leaflet.timedimension.min.js')
figure.header.add_child(
JavascriptLink(
'https://rawcdn.githack.com/python-visualization/folium/master/folium/templates/pa7_hm.min.js'), # noqa
name='heatmap.min.js')
figure.header.add_child(
JavascriptLink('https://rawcdn.githack.com/pa7/heatmap.js/develop/plugins/leaflet-heatmap/leaflet-heatmap.js'), # noqa
name='leaflet-heatmap.js')
figure.header.add_child(
CssLink('http://apps.socib.es/Leaflet.TimeDimension/dist/leaflet.timedimension.control.min.css'), # noqa
name='leaflet.timedimension.control.min.css')
figure.header.add_child(
def render(self, **kwargs):
super(TimestampedWmsTileLayers, self).render()
figure = self.get_root()
assert isinstance(figure, Figure), ('You cannot render this Element '
'if it is not in a Figure.')
figure.header.add_child(
JavascriptLink('https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js'), # noqa
name='jquery2.0.0')
figure.header.add_child(
JavascriptLink('https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js'), # noqa
name='jqueryui1.10.2')
figure.header.add_child(
JavascriptLink('https://rawcdn.githack.com/nezasa/iso8601-js-period/master/iso8601.min.js'), # noqa
name='iso8601')
figure.header.add_child(
JavascriptLink('https://rawcdn.githack.com/socib/Leaflet.TimeDimension/master/dist/leaflet.timedimension.min.js'), # noqa
name='leaflet.timedimension')
figure.header.add_child(
CssLink('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css'), # noqa