Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add url_template and layer_options arguments to GeoJSON display class #10288

Merged
merged 4 commits into from Feb 23, 2017

Conversation

gnestor
Copy link
Contributor

@gnestor 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 [WIP] Add url_template and layer_options arguments to GeoJSON display class Add url_template and layer_options arguments to GeoJSON display class Feb 23, 2017
@gnestor
Copy link
Contributor Author

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
Copy link
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:`????`
Copy link
Member

@takluyver takluyver Feb 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"minZoom": 0,
"maxZoom": 18,
})
nt.assert_equal(u'<IPython.core.display.GeoJSON object>', str(g))
Copy link
Member

@takluyver takluyver Feb 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

g -> gj

@Carreau
Copy link
Member

Carreau commented Feb 23, 2017

Thanks both !

@Carreau Carreau merged commit c4c4097 into ipython:master Feb 23, 2017
2 checks passed
@gnestor gnestor deleted the geojson-2 branch Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants