pbugnion / gmaps

Google maps for Jupyter notebooks
https://jupyter-gmaps.readthedocs.io/en/stable/
Other
760 stars 147 forks source link

Export direction_layer to HTML #332

Open HuynhThanhQuan opened 4 years ago

HuynhThanhQuan commented 4 years ago

I can see that exporting map with direction_layer is not supported for PNG. So is it possible for HTML ? Because I can't export these direction_layer with using embed_minimal_html or I did it in the wrong way? Please help me

miguelmaragon commented 4 years ago

Hello @HuynhThanhQuan and @pbugnion!!

I have been working with the gmaps library and I think I am facing the same problem as you. Have you been able to come up with a solution to export the direction_layer in html? As mentioned in the documentation, there is no warning that it cannot be exported in html. Therefore, I think it can be done. However, the documentation specifies that if you want to export in png, there is a warning.

First, I wanted to solve the problem for jupyter notebook, but later I wanted to pass it to a python script to be run from the terminal.

Please, if you could help me or someone who has a solution. Thanks

HuynhThanhQuan commented 4 years ago

Hello @HuynhThanhQuan and @pbugnion!!

I have been working with the gmaps library and I think I am facing the same problem as you. Have you been able to come up with a solution to export the direction_layer in html? As mentioned in the documentation, there is no warning that it cannot be exported in html. Therefore, I think it can be done. However, the documentation specifies that if you want to export in png, there is a warning.

First, I wanted to solve the problem for jupyter notebook, but later I wanted to pass it to a python script to be run from the terminal.

Please, if you could help me or someone who has a solution. Thanks

I found a way to go around this by attaching Javascript API into my html https://developers.google.com/maps/documentation/javascript/examples/directions-simple Of course python embed_minimal_html is not support this so I have to attached it manually

miguelmaragon commented 4 years ago

Hello @HuynhThanhQuan and @pbugnion!! I have been working with the gmaps library and I think I am facing the same problem as you. Have you been able to come up with a solution to export the direction_layer in html? As mentioned in the documentation, there is no warning that it cannot be exported in html. Therefore, I think it can be done. However, the documentation specifies that if you want to export in png, there is a warning. First, I wanted to solve the problem for jupyter notebook, but later I wanted to pass it to a python script to be run from the terminal. Please, if you could help me or someone who has a solution. Thanks

I found a way to go around this by attaching Javascript API into my html https://developers.google.com/maps/documentation/javascript/examples/directions-simple Of course python embed_minimal_html is not support this so I have to attached it manually

Thanks for your help!!