Show More
@@ -28,6 +28,28 b' def test_image_size():' | |||||
28 | img = display.Image(url=thisurl, unconfined=True) |
|
28 | img = display.Image(url=thisurl, unconfined=True) | |
29 | nt.assert_equal(u'<img src="%s" class="unconfined"/>' % (thisurl), img._repr_html_()) |
|
29 | nt.assert_equal(u'<img src="%s" class="unconfined"/>' % (thisurl), img._repr_html_()) | |
30 |
|
30 | |||
|
31 | ||||
|
32 | def test_geojson(): | |||
|
33 | ||||
|
34 | gj = display.GeoJSON(data={ | |||
|
35 | "type": "Feature", | |||
|
36 | "geometry": { | |||
|
37 | "type": "Point", | |||
|
38 | "coordinates": [-81.327, 296.038] | |||
|
39 | }, | |||
|
40 | "properties": { | |||
|
41 | "name": "Inca City" | |||
|
42 | } | |||
|
43 | }, | |||
|
44 | url_template="http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/{basemap_id}/{z}/{x}/{y}.png", | |||
|
45 | layer_options={ | |||
|
46 | "basemap_id": "celestia_mars-shaded-16k_global", | |||
|
47 | "attribution": "Celestia/praesepe", | |||
|
48 | "minZoom": 0, | |||
|
49 | "maxZoom": 18, | |||
|
50 | }) | |||
|
51 | nt.assert_equal(u'<IPython.core.display.GeoJSON object>', str(g)) | |||
|
52 | ||||
31 | def test_retina_png(): |
|
53 | def test_retina_png(): | |
32 | here = os.path.dirname(__file__) |
|
54 | here = os.path.dirname(__file__) | |
33 | img = display.Image(os.path.join(here, "2x2.png"), retina=True) |
|
55 | img = display.Image(os.path.join(here, "2x2.png"), retina=True) |
General Comments 0
You need to be logged in to leave comments.
Login now