#!/usr/bin/env python # coding: utf-8 # # geojson-extension # ## GeoJSON(data: dict) # In[1]: from IPython.display import GeoJSON GeoJSON({ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-118.4563712, 34.0163116] } }) # ## GeoJSON(data: dict, url_template=string, layer_options=dict) # In[2]: GeoJSON(data={ "type": "Feature", "geometry": { "type": "Point", "coordinates": [-118.4563712, 34.0163116] } }, url_template="https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1Ijoic2Vub3JuZXN0b3IiLCJhIjoiY2l4MHU4MWJsMDIwcjJ0cGwybWQzbnhpeiJ9.beQ7B_WHe3K7_YMUJ684yg", layer_options={ "id": "mapbox.streets", "attribution" : '© OpenStreetMap' }) # In[3]: GeoJSON(data={ "type": "Feature", "geometry": { "type": "Point", "coordinates": [11.8, -45.04] } }, url_template="http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/{basemap_id}/{z}/{x}/{y}.png", layer_options={ "basemap_id": "celestia_mars-shaded-16k_global", "attribution" : "Celestia/praesepe", "tms": True, "minZoom" : 0, "maxZoom" : 5 }) # In[ ]: