Python Bokeh – Plot for all Types of Google Maps ( roadmap, satellite, hybrid, terrain)
gmap() function of the
There are 4 basic types of Google maps – roadmap, satellite, hybrid, terrain
We need to configure the Google map using
GMapOptions() function. The
GMapOptions() function contains the parameter
map_type. Using this parameter we can determine the map type of the Google map. Assign one of the 4 values to this parameter discussed above.
In order to use these maps we have to :
- Import the required libraries and modules :
- gmap from bokeh.plotting
- GMapOptions from bokeh.models
- output_file and show from bokeh.io
- Create a file to store our model using
- Configure the Google map using
GMapOptions(). During the configuration, assign the desired value to the
- Generate a GoogleMap object using
- Display the Google map using
This displays the default road map view. In this type of map, the terrain is smoothened and the roads are highlighted. It is suited to navigate an area in a vehicle. This is the default map type.
This displays the Google Earth satellite view. It is the bird-eye view without any sort of graphics.
As the name suggests, this displays the combination of road map and satellite map. The satellite map is overlayed with graphics of roads.
This displays a physical map based on the terrain information.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course