|
632 | 632 | "outputs": [], |
633 | 633 | "source": [ |
634 | 634 | "from bokeh.plotting import figure\n", |
635 | | - "from bokeh.tile_providers import get_provider, Vendors\n", |
636 | 635 | "from bokeh.io import output_notebook, show\n", |
637 | 636 | "output_notebook()" |
638 | 637 | ] |
|
658 | 657 | "# When using in standard Python env\n", |
659 | 658 | "# output_file(\"tile.html\")\n", |
660 | 659 | "\n", |
661 | | - "tile_provider = get_provider(Vendors.CARTODBPOSITRON)\n", |
662 | | - "\n", |
663 | 660 | "# range bounds supplied in web mercator coordinates\n", |
664 | 661 | "p = figure(tools='pan, wheel_zoom', x_range=(-10000000, -3000000), y_range=(-6000000, 0),\n", |
665 | 662 | " x_axis_type='mercator', y_axis_type='mercator')\n", |
666 | | - "p.add_tile(tile_provider)\n", |
| 663 | + "p.add_tile(\"CartoDB Positron\", retina=True)\n", |
667 | 664 | "\n", |
668 | 665 | "show(p)" |
669 | 666 | ] |
|
785 | 782 | "outputs": [], |
786 | 783 | "source": [ |
787 | 784 | "# p = figure(title=\"A map of populated places from a GeoPackage\")\n", |
788 | | - "p.circle('x', 'y', source=psource, color='lightblue',size=15, alpha=0.7)\n", |
| 785 | + "p.scatter('x', 'y', source=psource, color='lightblue',size=15, alpha=0.7)\n", |
789 | 786 | "show(p)" |
790 | 787 | ] |
791 | 788 | }, |
|
831 | 828 | "source": [ |
832 | 829 | "from bokeh.models import GeoJSONDataSource\n", |
833 | 830 | "from bokeh.plotting import figure\n", |
834 | | - "from bokeh.tile_providers import get_provider, Vendors\n", |
835 | 831 | "from bokeh.io import output_notebook, show\n", |
836 | 832 | "output_notebook()\n", |
837 | 833 | "\n", |
|
882 | 878 | "p = figure(tools='pan, wheel_zoom', x_axis_type='mercator', y_axis_type='mercator', width=800, height=500)\n", |
883 | 879 | "\n", |
884 | 880 | "# add background tiles layer from CARTO\n", |
885 | | - "p.add_tile(get_provider(Vendors.CARTODBPOSITRON))\n", |
| 881 | + "p.add_tile(\"CartoDB Positron\", retina=True)\n", |
886 | 882 | "\n", |
887 | 883 | "# add populated places point overlay\n", |
888 | | - "p.circle(x='x', y='y', size=10, alpha=0.7, source=geo_source, color='lightblue', legend_label='Populated Places')\n", |
| 884 | + "p.scatter(x='x', y='y', size=10, alpha=0.7, source=geo_source, color='lightblue', legend_label='Populated Places')\n", |
889 | 885 | "\n", |
890 | 886 | "show(p)" |
891 | 887 | ] |
|
908 | 904 | }, |
909 | 905 | { |
910 | 906 | "cell_type": "code", |
911 | | - "execution_count": 0, |
| 907 | + "execution_count": null, |
912 | 908 | "metadata": { |
913 | 909 | "scrolled": true |
914 | 910 | }, |
|
979 | 975 | "name": "python", |
980 | 976 | "nbconvert_exporter": "python", |
981 | 977 | "pygments_lexer": "ipython3", |
982 | | - "version": "3.10.12" |
| 978 | + "version": "3.12.3" |
983 | 979 | } |
984 | 980 | }, |
985 | 981 | "nbformat": 4, |
|
0 commit comments