question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gmaps incompatible with DataRange1d, make error louder/earlier

See original GitHub issue

Runtime Info:

notebook server is 5.0.0 Python 3.6.1 |Continuum Analytics, Inc.| (default, May 11 2017, 13:09:58) IPython 6.0.0 bokeh ‘0.12.9’ ipywidgets ‘7.0.1’ ubuntu 16

When i run the gmaps demo with push notebook it displays the dots in the wrong location until i interact with he map.

from bokeh.io import output_file, show
from bokeh.models import (
  GMapPlot, GMapOptions, ColumnDataSource, Circle, DataRange1d, PanTool, WheelZoomTool, BoxSelectTool
)

map_options = GMapOptions(lat=30.29, lng=-97.73, map_type="roadmap", zoom=11)

plot = GMapPlot(
    x_range=DataRange1d(), y_range=DataRange1d(), map_options=map_options
)
plot.title.text = "Austin"


plot.api_key = API_KEY

source = ColumnDataSource(
    data=dict(
        lat=[],
        lon=[],
    )
)

circle = Circle(x="lon", y="lat", size=15, fill_color="blue", fill_alpha=0.8, line_color=None)
plot.add_glyph(source, circle)

plot.add_tools(PanTool(), WheelZoomTool(), BoxSelectTool())
h = show(plot, notebook_handle=True)
source.data = dict(
        lat=[30.29, 30.20, 30.29],
        lon=[-97.70, -97.74, -97.78],
    )
push_notebook(handle=h)

pre interaction image

post interaction image

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bryevdvcommented, Oct 9, 2017

DataRange1d is incompatible with GmapPlot, which must defer to the google maps API to set ranges. Use Range1d instead. I’ll leave this issue as a task to make it fail earlier and louder.

0reactions
bryevdvcommented, Nov 6, 2017

This started getting pretty hairy, I think I will just add a check at __init__ as well as a validation error after all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'Invalid value for 'x_range' Bokeh Gmap error - Stack Overflow
Exactly as the message states, only Range1d can be used with GMapPlot . This is because unlike regular Bokeh plots, Google Maps maintains ......
Read more >
bokeh Changelog - pyup.io
7028 Gmaps incompatible with datarange1d, make error louder/earlier - 7039 [component: docs] Clarify some security considerations
Read more >
jet noise shielding: Topics by Science.gov
The noise source localization data obtained on cold, shock-containing jets suggests that the constructive interference of sound waves that produces noise at a ......
Read more >
Quantum Optical Mechanics (QOM) - viXra.org
Modern physics began around 1700 with attempts to create ... The two metaphysical viewpoints that have been in conflict for the first 200...
Read more >
Crash Profits: Make Money When Stocks Sink And Soar Martin Weiss
but twice: While stocks were plunging in the early 1930s, he made his first fortune. And when stocks hit bottom, he made a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found