Add `url_template` and `layer_options` arguments to GeoJSON display class #10288

Merged
merged 4 commits into from Feb 23, 2017

Conversation

Projects
None yet
3 participants
@gnestor
Contributor

gnestor commented Feb 10, 2017

This would enable users to configure Leaflet and e.g. map points on other planets.

from IPython.display import GeoJSON

GeoJSON(data={
    "type": "Feature",
    "geometry": {
        "type": "Point",
        "coordinates": [-81.327, 296.038]
    },
    "properties": {
        "name": "Inca City"
    }
}, 
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",
    "minZoom" : 0,
    "maxZoom" : 18,
})

@gnestor gnestor changed the title from [WIP] Add `url_template` and `layer_options` arguments to GeoJSON display class to Add `url_template` and `layer_options` arguments to GeoJSON display class Feb 23, 2017

@gnestor

This comment has been minimized.

Show comment
Hide comment
@gnestor

gnestor Feb 23, 2017

Contributor

@Carreau @takluyver This think this is ready

Contributor

gnestor commented Feb 23, 2017

@Carreau @takluyver This think this is ready

@Carreau Carreau added this to the 6.0 milestone Feb 23, 2017

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Feb 23, 2017

Member

I've added test, docs and a line in the what's new. Let me know if that's allright.

Member

Carreau commented Feb 23, 2017

I've added test, docs and a line in the what's new. Let me know if that's allright.

@@ -0,0 +1,2 @@
+* IPython.display has gained a :any:`GeoJSON <IPython.display.GeoJSON>` object.
+ :ghpull:`10288` and :ghpull:`????`

This comment has been minimized.

IPython/core/tests/test_display.py
+ "minZoom": 0,
+ "maxZoom": 18,
+ })
+ nt.assert_equal(u'<IPython.core.display.GeoJSON object>', str(g))

This comment has been minimized.

@takluyver

takluyver Feb 23, 2017

Member

g -> gj

@takluyver

takluyver Feb 23, 2017

Member

g -> gj

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Feb 23, 2017

Member

Thanks both !

Member

Carreau commented Feb 23, 2017

Thanks both !

@Carreau Carreau merged commit c4c4097 into ipython:master Feb 23, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gnestor gnestor deleted the gnestor:geojson-2 branch Feb 23, 2017

@rgbkrk rgbkrk referenced this pull request in nteract/nteract Mar 22, 2017

Closed

mapbox 401 auth error #1574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment