frombokeh.documentimportDocumentfrombokeh.embedimportfile_htmlfrombokeh.modelsimport(Circle,ColumnDataSource,GMapOptions,GMapPlot,Label,PanTool,WheelZoomTool)frombokeh.resourcesimportINLINEfrombokeh.sampledata.world_citiesimportdatafrombokeh.util.browserimportview# Google Maps now requires an API key. You can find out how to get one here:# https://developers.google.com/maps/documentation/javascript/get-api-keyAPI_KEY="GOOGLE_API_KEY"map_options=GMapOptions(lat=15,lng=0,zoom=2)plot=GMapPlot(width=1000,height=500,map_options=map_options,api_key=API_KEY,output_backend="webgl",)ifplot.api_key=="GOOGLE_API_KEY":plot.add_layout(Label(x=500,y=320,x_units='screen',y_units='screen',text='Replace GOOGLE_API_KEY with your own key',text_color='red',text_align='center'))plot.title.text="Cities of the world with a population over 5,000 people."circle=Circle(x="lng",y="lat",size=5,line_color=None,fill_color='firebrick',fill_alpha=0.2)plot.add_glyph(ColumnDataSource(data),circle)plot.add_tools(PanTool(),WheelZoomTool())doc=Document()doc.add_root(plot)if__name__=="__main__":doc.validate()filename="maps_cities.html"withopen(filename,"w")asf:f.write(file_html(doc,INLINE,"Google Maps - World cities Example"))print(f"Wrote {filename}")view(filename)