MCPcopy Index your code
hub / github.com/ipython/ipython / __init__

Method __init__

IPython/core/display.py:673–721  ·  view source on GitHub ↗

Create a GeoJSON display object given raw data. Parameters ---------- data : dict or list VegaLite data. Not an already-serialized JSON string. Scalar types (None, number, string) are not allowed, only dict or list containers. url_

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

671 """
672
673 def __init__(self, *args, **kwargs):
674 """Create a GeoJSON display object given raw data.
675
676 Parameters
677 ----------
678 data : dict or list
679 VegaLite data. Not an already-serialized JSON string.
680 Scalar types (None, number, string) are not allowed, only dict
681 or list containers.
682 url_template : string
683 Leaflet TileLayer URL template: http://leafletjs.com/reference.html#url-template
684 layer_options : dict
685 Leaflet TileLayer options: http://leafletjs.com/reference.html#tilelayer-options
686 url : unicode
687 A URL to download the data from.
688 filename : unicode
689 Path to a local file to load the data from.
690 metadata : dict
691 Specify extra metadata to attach to the json display object.
692
693 Examples
694 --------
695 The following will display an interactive map of Mars with a point of
696 interest on frontend that do support GeoJSON display.
697
698 >>> from IPython.display import GeoJSON
699
700 >>> GeoJSON(data={
701 ... "type": "Feature",
702 ... "geometry": {
703 ... "type": "Point",
704 ... "coordinates": [-81.327, 296.038]
705 ... }
706 ... },
707 ... url_template="http://s3-eu-west-1.amazonaws.com/whereonmars.cartodb.net/{basemap_id}/{z}/{x}/{y}.png",
708 ... layer_options={
709 ... "basemap_id": "celestia_mars-shaded-16k_global",
710 ... "attribution" : "Celestia/praesepe",
711 ... "minZoom" : 0,
712 ... "maxZoom" : 18,
713 ... })
714 <IPython.core.display.GeoJSON object>
715
716 In the terminal IPython, you will only see the text representation of
717 the GeoJSON object.
718
719 """
720
721 super(GeoJSON, self).__init__(*args, **kwargs)
722
723
724 def _ipython_display_(self):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected