Merge branch 'release/gmapfix'
This commit is contained in:
@@ -442,7 +442,7 @@ def googlemap_chart(lat,lon,name=""):
|
|||||||
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,resize'
|
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,resize'
|
||||||
|
|
||||||
map_options = GMapOptions(lat = lat.mean(),lng=lon.mean(),
|
map_options = GMapOptions(lat = lat.mean(),lng=lon.mean(),
|
||||||
map_type="roadmap",zoom=11)
|
map_type="roadmap",zoom=13)
|
||||||
|
|
||||||
plot = GMapPlot(
|
plot = GMapPlot(
|
||||||
x_range=DataRange1d(), y_range=DataRange1d(),
|
x_range=DataRange1d(), y_range=DataRange1d(),
|
||||||
|
|||||||
@@ -167,21 +167,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
|
||||||
// Set things up to resize the plot on a window resize. You can play with
|
|
||||||
// the arguments of resize_width_height() to change the plot's behavior.
|
|
||||||
var plot_resize_setup = function () {
|
|
||||||
var plotid = Object.keys(Bokeh.index)[0]; // assume we have just one plot
|
|
||||||
var plot = Bokeh.index[plotid];
|
|
||||||
var plotresizer = function() {
|
|
||||||
// arguments: use width, use height, maintain aspect ratio
|
|
||||||
plot.resize_width_height(true, true, true);
|
|
||||||
};
|
|
||||||
window.addEventListener('resize', plotresizer);
|
|
||||||
plotresizer();
|
|
||||||
};
|
|
||||||
window.addEventListener('load', plot_resize_setup);
|
|
||||||
</script>
|
|
||||||
<style>
|
<style>
|
||||||
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
||||||
html, body {height: 100%; margin:5px;}
|
html, body {height: 100%; margin:5px;}
|
||||||
@@ -211,27 +196,22 @@
|
|||||||
|
|
||||||
{{ gmscript |safe }}
|
{{ gmscript |safe }}
|
||||||
|
|
||||||
<script>
|
|
||||||
// Set things up to resize the plot on a window resize. You can play with
|
|
||||||
// the arguments of resize_width_height() to change the plot's behavior.
|
|
||||||
var plot_resize_setup = function () {
|
|
||||||
var plotid = Object.keys(Bokeh.index)[0]; // assume we have just one plot
|
|
||||||
var plot = Bokeh.index[plotid];
|
|
||||||
var plotresizer = function() {
|
|
||||||
// arguments: use width, use height, maintain aspect ratio
|
|
||||||
plot.resize_width_height(true, true, true);
|
|
||||||
};
|
|
||||||
window.addEventListener('resize', plotresizer);
|
|
||||||
plotresizer();
|
|
||||||
};
|
|
||||||
window.addEventListener('load', plot_resize_setup);
|
|
||||||
</script>
|
|
||||||
<style>
|
<style>
|
||||||
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
/* Need this to get the page in "desktop mode"; not having an infinite height.*/
|
||||||
html, body {height: 100%; margin:5px;}
|
html, body, #map_canvas {
|
||||||
</style>
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin:0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#map_canvas_container {position: relative; top:0; right:0; bottom:0; left:0;}
|
||||||
|
|
||||||
{{ gmdiv|safe }}
|
#map_canvas {position: relative; top: 0; right: 0; bottom: 0; left: 0;}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
<div id="map_canvas">
|
||||||
|
{{ gmdiv|safe }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -549,3 +549,8 @@ a.wh:visited {
|
|||||||
a.wh:hover {
|
a.wh:hover {
|
||||||
color: #e9e9e9;
|
color: #e9e9e9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.bk-canvas-map {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user