I think it could be usefull to implement a tool to hide/unhide the google map background in a bokeh GMap object. Maybe some JS could do the job.
And maybe a way to save to PNG the background too, not only the glyphs.
Thanks for your
thoughts Arjuna. Feel free to open a feature request on bokeh’s github.
B ut off the top of my
head it seems unlikely
that this would be something for bokeh core. This s hould
be do able with either
CustomJS a CustomModel
or the bokeh server - or any combination
of them
I'm not sure
whether saving google 's tile
backgrounds would violate th eir
API. But regardless this
should be easy to imple ment
as a CustomM odel
also.
I think it could be usefull to implement a tool to
hide/unhide the google map background in a bokeh GMap object.
Maybe some JS could do the job.
And maybe a way to save to PNG the background too, not only
the glyphs.
extracted from stackoverflow question
thanks
Arjuna
–
You received this message because you are subscribed to the Google
Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it,
To post to this group, send email to [email protected].
To view this discussion on the web visit [](https://groups.google.com/a/continuum.io/d/msgid/bokeh/76f647ad-825b-4de5-b903-2ef8ba1f6b1a%40continuum.io?utm_medium=email&utm_source=footer) .
I was going to suggest a CustomJS callback to set GMapPlot.map_options in a way that makes everything invisible. That would probably be fairly straightforward. We can't just "turn off" the gmap completely as we rely on gmap to drive pan/zoom events.
Bryan
···
On Jun 17, 2016, at 9:03 PM, Sarah Bird - Continuum <[email protected]> wrote:
Thanks for your thoughts Arjuna. Feel free to open a feature request on bokeh's github.
But off the top of my head it seems unlikely that this would be something for bokeh core. This should be doable with either CustomJS a CustomModel or the bokeh server - or any combination of them
I'm not sure whether saving google's tile backgrounds would violate their API. But regardless this should be easy to implement as a CustomModel also.
I think it could be usefull to implement a tool to hide/unhide the google map background in a bokeh GMap object. Maybe some JS could do the job.
And maybe a way to save to PNG the background too, not only the glyphs.
I was able to do more investigation, and I am afraid this is not something that will currently work. I had hoped to get you started with this quick example:
from bokeh.io import output_file, show
from bokeh.models import GMapPlot, Range1d, CustomJS, Button, VBox, GMapOptions
Unfortunately, it did not work, and after a little digging, I can see that the google map, and its options are only initialized once. Changing the map options does not have any effect later. I do think that changing map options later should be supported (and possibly even a show/hide functionality too). But it will rely on future work. I'd encourage you to submit a GH feature request, and reference this mailing list thread in the issue.
Sorry, I don't have better immediate news for you,
Bryan
···
On Jun 17, 2016, at 9:05 PM, Bryan Van de Ven <[email protected]> wrote:
I was going to suggest a CustomJS callback to set GMapPlot.map_options in a way that makes everything invisible. That would probably be fairly straightforward. We can't just "turn off" the gmap completely as we rely on gmap to drive pan/zoom events.
Bryan
On Jun 17, 2016, at 9:03 PM, Sarah Bird - Continuum <[email protected]> wrote:
Thanks for your thoughts Arjuna. Feel free to open a feature request on bokeh's github.
But off the top of my head it seems unlikely that this would be something for bokeh core. This should be doable with either CustomJS a CustomModel or the bokeh server - or any combination of them
I'm not sure whether saving google's tile backgrounds would violate their API. But regardless this should be easy to implement as a CustomModel also.
I think it could be usefull to implement a tool to hide/unhide the google map background in a bokeh GMap object. Maybe some JS could do the job.
And maybe a way to save to PNG the background too, not only the glyphs.