from CesiumWidget import CesiumWidget
from IPython import display
import numpy as np

"""
Explanation: Cesium Widget Example KML
If the installation of Cesiumjs is ok, it should be reachable here:
http://localhost:8888/nbextensions/CesiumWidget/cesium/index.html
End of explanation
"""


cesium = CesiumWidget()

"""
Explanation: Create widget object
End of explanation
"""


cesium

"""
Explanation: Display the widget:
End of explanation
"""


cesium.kml_url = '/nbextensions/CesiumWidget/cesium/Apps/SampleData/kml/gdpPerCapita2008.kmz'

"""
Explanation: Cesium is packed with example data. Let's look at some GDP per captia data from 2008.
End of explanation
"""


for lon in np.arange(0, 360, 0.5):
    cesium.zoom_to(lon, 0, 36000000, 0 ,-90, 0)

cesium._zoomto

"""
Explanation: Example zoomto
End of explanation
"""


cesium.fly_to(14, 90, 20000001)

cesium._flyto

"""
Explanation: Example flyto
End of explanation
"""


