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 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 force-pushed the gnestor:geojson-2 branch from d3231f7 to 867c82d Feb 22, 2017
@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:`????`

This comment has been minimized.

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

This comment has been minimized.

Copy link
@takluyver

takluyver Feb 23, 2017

Member

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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.