Closed ocefpaf closed 9 years ago
@ocefpaf I'm finally getting around to taking a look at this.
I often use mplleaflet
locally, so just from IPython I'll make a plot and type mplleaflet.show()
. I think what happens with the scheme agnostic URLs is that //
expands to file://
which likely won't exist.
Thoughts?
Not really. From IPython it should still expand to HTTP. IPython starts a server at http://localhost:8888, right? I think it will get expanded to file://
only it the user tries to load the HTML
in the browser with the open file...
option.
BTW, here are examples of HTTPS and HTTP using that PR.
https://ocefpaf.github.io/python4oceanographers/blog/2014/07/14/corrida/
This also renders fine when using the notebook locally ( http://localhost:8888).
PS: Never mind the horrible CSS border on the tiles in my webpage! I am trying to fix that...
Agreed that it will work if you're using the notebook and therefore a server, but I frequently just run mplleaflet
from the IPython shell or in a script outside of the IPython notebook. When you run mplleaflet.show()
, it creates and saves a local html file, which gets loaded by the browser at file:///Users/jwass/_map.html
or similar, which will fail to load everything.
I wonder if the right answer isn't to hardcode https wherever we know it's supported.?
One could argue that mplleaflet.show()
should start a web server to show the HTML instead. But maybe you are right: http://www.paulirish.com/2010/the-protocol-relative-url/
I will close this.
I also updated leaflet to the latest release.