Using the gmaps starter example:
import os
import requests
import gmaps
import gmaps.datasets
gmaps.configure(api_key="API KEY HERE")
earthquake_df = gmaps.datasets.load_dataset_as_df('earthquakes')
earthquake_df.head()
locations = earthquake_df[['latitude', 'longitude']]
weights = earthquake_df['magnitude']
fig = gmaps.figure()
fig.add_layer(gmaps.heatmap_layer(locations, weights=weights))
fig
I have followed all the setup instructions from gmaps and nbextensions etc - everything enabled, but when I run I get this error and cannot display the map (the dataset table displays fine):
Model class 'FigureModel' from module 'jupyter-gmaps' is loaded but can not be instantiated
I can see in the console this error too: [Error] Refused to execute http://localhost:8888/nbextensions/gmaps.js?v=20230810111648 as script because "X-Content-Type-Options: nosniff" was given and its Content-Type is not a script MIME type.
Have searched and searched and tried everything but still facing this error
Downgraded to Jupyter notebook 5.7.5 and it worked!