New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMAP underflowing Bokeh figure #5801

Closed
RobbiePritchard opened this Issue Jan 26, 2017 · 16 comments

Comments

Projects
None yet
5 participants
@RobbiePritchard

RobbiePritchard commented Jan 26, 2017

https://groups.google.com/a/continuum.io/forum/#!topic/bokeh/4GaPygTvhC8

issue can be recreated(tested safari, and chrome on bokeh 0.12.3 and 0.12.4) with any gmap plot:

from bokeh.plotting import Figure, ColumnDataSource, show, vplot
from bokeh.io import output_file
from bokeh.models import (Slider, CustomJS, GMapPlot,GMapOptions, DataRange1d, Circle, Line)

import numpy as np
from bokeh.plotting import curdoc, figure
from bokeh.layouts import row, column, widgetbox
from bokeh.client import push_session



r = 0.000192
x1 = np.linspace(-1, 1, 100) * r
x2 = np.linspace(1, -1, 100) * r
x = np.hstack((x1, x2))
f = lambda x: np.sqrt(r ** 2 - x ** 2)
y1 = f(x1)
y2 = -f(x2)
y = np.hstack((y1, y2))
init_x = 40.233688
init_y = -111.646784
lon = init_x + x
lat = init_y + y

# Initialize data sources.

location = ColumnDataSource(data=dict(x=[lon[0]], y=[lat[0]]))
path = ColumnDataSource(data=dict(x=lon, y=lat))

options = GMapOptions(lat=40.233681, lng=-111.646595, map_type="roadmap", zoom=15)
fig = GMapPlot(x_range=DataRange1d(), y_range=DataRange1d(), map_options=options, api_key='x')

c = Circle(x='x', y='y', size=10)
p = Line(x='x', y='y')
fig.add_glyph(location, c)
fig.add_glyph(path, p)


layout = column(fig)
curdoc().clear()
curdoc().add_root(layout)
session = push_session(curdoc())
session.show()
session.loop_until_closed()
@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jan 26, 2017

Member

Adding overflow:hidden to bk-canvas-map seems to fix the issue, why this has never been needed before, I have no idea. I feel like I recall noting GMap adding this to their own DOM elements previously.

Member

bryevdv commented Jan 26, 2017

Adding overflow:hidden to bk-canvas-map seems to fix the issue, why this has never been needed before, I have no idea. I feel like I recall noting GMap adding this to their own DOM elements previously.

@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jan 26, 2017

Member

I spoke too soon, panning the map, removed the property I added by hand, and the problem returned. Will have to investigate adding it in the library next to see if that persists better.

Member

bryevdv commented Jan 26, 2017

I spoke too soon, panning the map, removed the property I added by hand, and the problem returned. Will have to investigate adding it in the library next to see if that persists better.

@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jan 26, 2017

Member

Unfortunately I can't reproduce this locally when running maps.py, so there is also apparently something about being embedding in a more complex document that also has bearing.

Member

bryevdv commented Jan 26, 2017

Unfortunately I can't reproduce this locally when running maps.py, so there is also apparently something about being embedding in a more complex document that also has bearing.

@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jan 26, 2017

Member

I actually can't reproduce this with master. @RobbiePritchard do yo have the ability to build and test from source?

Member

bryevdv commented Jan 26, 2017

I actually can't reproduce this with master. @RobbiePritchard do yo have the ability to build and test from source?

@RobbiePritchard

This comment has been minimized.

Show comment
Hide comment
@RobbiePritchard

RobbiePritchard Jan 26, 2017

what is maps.py?

RobbiePritchard commented Jan 26, 2017

what is maps.py?

@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jan 26, 2017

Member

it's under examples/models but let's use you code above as a baseline. Right now with that code it seems to have the problem with 0.12.4 but not if I run from master, but I can I can't find anything that would account for that. On master overflow: hidden is present on the map div

Member

bryevdv commented Jan 26, 2017

it's under examples/models but let's use you code above as a baseline. Right now with that code it seems to have the problem with 0.12.4 but not if I run from master, but I can I can't find anything that would account for that. On master overflow: hidden is present on the map div

@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jan 26, 2017

Member

@mattpap I'm not sure what caused the sudden break in older versions, but after a bisection, the current "fix" seemed to happen your drop JQuery PR.

Member

bryevdv commented Jan 26, 2017

@mattpap I'm not sure what caused the sudden break in older versions, but after a bisection, the current "fix" seemed to happen your drop JQuery PR.

@RobbiePritchard

This comment has been minimized.

Show comment
Hide comment
@RobbiePritchard

RobbiePritchard Jan 26, 2017

I threw

     .bk-canvas-map{
            overflow: hidden;
        }

into the head of the html document I'm embedding the map into for another temp "fix"

RobbiePritchard commented Jan 26, 2017

I threw

     .bk-canvas-map{
            overflow: hidden;
        }

into the head of the html document I'm embedding the map into for another temp "fix"

@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jan 26, 2017

Member

Well I think overflow: hidden might be the real fix, I just don't know:

  • why it was not needed previously
  • why it suddenly is necessary
  • how started getting added as a result of @mattpap 's PR
Member

bryevdv commented Jan 26, 2017

Well I think overflow: hidden might be the real fix, I just don't know:

  • why it was not needed previously
  • why it suddenly is necessary
  • how started getting added as a result of @mattpap 's PR
@mattpap

This comment has been minimized.

Show comment
Hide comment
@mattpap

mattpap Jan 26, 2017

Contributor

the current "fix" seemed to happen your drop JQuery PR.

Something is missing in this sentence. Is my JQuery PR helping or not?

Contributor

mattpap commented Jan 26, 2017

the current "fix" seemed to happen your drop JQuery PR.

Something is missing in this sentence. Is my JQuery PR helping or not?

@mattpap

This comment has been minimized.

Show comment
Hide comment
@mattpap

mattpap Jan 26, 2017

Contributor

overflow: hidden;

Assuming that JQuery is at fault, seeing this I can presume that this isn't the real fix and there is something wrong with computation of dimensions (box model differences, because jquery does a lot of magic in this area).

Contributor

mattpap commented Jan 26, 2017

overflow: hidden;

Assuming that JQuery is at fault, seeing this I can presume that this isn't the real fix and there is something wrong with computation of dimensions (box model differences, because jquery does a lot of magic in this area).

@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jan 27, 2017

Member

Hi, dev build 0.12.5dev11 is available which appears to fix the issue:

http://bokeh.pydata.org/en/dev/docs/user_guide/geo.html

Several other outstanding GMap issues also fixed (reset tool, updatable map options, blanking on refresh)

Member

bryevdv commented Jan 27, 2017

Hi, dev build 0.12.5dev11 is available which appears to fix the issue:

http://bokeh.pydata.org/en/dev/docs/user_guide/geo.html

Several other outstanding GMap issues also fixed (reset tool, updatable map options, blanking on refresh)

@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Jan 28, 2017

Member

@RobbiePritchard can you confirm that 0.12.5dev11 is working for you?

Member

bryevdv commented Jan 28, 2017

@RobbiePritchard can you confirm that 0.12.5dev11 is working for you?

@kgullikson88

This comment has been minimized.

Show comment
Hide comment
@kgullikson88

kgullikson88 Feb 9, 2017

I have this issue with some 0.12.3 plots that I'm currently displaying on my blog. Will the overflow:hidden thing fix the existing plots or do I need to regenerate them with the dev version of bokeh? As an html noob, where would I put the overflow:hidden?

kgullikson88 commented Feb 9, 2017

I have this issue with some 0.12.3 plots that I'm currently displaying on my blog. Will the overflow:hidden thing fix the existing plots or do I need to regenerate them with the dev version of bokeh? As an html noob, where would I put the overflow:hidden?

@syonekura

This comment has been minimized.

Show comment
Hide comment
@syonekura

syonekura Feb 15, 2017

I have the same issue on the User Guide using Chrome:

image

sometimes the issue doesn't appear at first sight, but it happens after panning the GMap

syonekura commented Feb 15, 2017

I have the same issue on the User Guide using Chrome:

image

sometimes the issue doesn't appear at first sight, but it happens after panning the GMap

@bryevdv

This comment has been minimized.

Show comment
Hide comment
@bryevdv

bryevdv Feb 15, 2017

Member

This issue is fixed in master, in the latest dev builds as well, and will be in 0.12.5. Unfortunately I don not have the bandwidth to do a custom re-deploy of existing docs. The latest dev docs, and the 0.12.5 docs will have working versions.

Member

bryevdv commented Feb 15, 2017

This issue is fixed in master, in the latest dev builds as well, and will be in 0.12.5. Unfortunately I don not have the bandwidth to do a custom re-deploy of existing docs. The latest dev docs, and the 0.12.5 docs will have working versions.

@bryevdv bryevdv closed this Feb 27, 2017

@bryevdv bryevdv changed the title from 0.12.4 GMAP underflowing Bokeh figure to GMAP underflowing Bokeh figure Mar 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment