
Hi All,
I’m trying to get a GeoJSONDataSource working for a simple test Polygon shape and not having any luck. Please see code below: the point appears but the square doesn’t - am I missing something obvious or is this a bug?
I’m using Bokeh 0.12.6 and Firefox 54.0.
Thanks,
Marcus.
from bokeh.models import GeoJSONDataSource
from bokeh.plotting import figure
from bokeh.io import show
geojsondata_point = ‘’’
{
“type”: “FeatureCollection”,
“features”: [
{ “type”: “Feature”,
“geometry”: {
“type”: “Point”,
“coordinates”: [0, 0]
},
“properties”: {
“name”: “Point”
}
}
]
}
‘’’
geojsondata_square = ‘’’
{
“type”: “FeatureCollection”,
“features”: [
{ “type”: “Feature”,
“geometry”: {
“type”: “Polygon”,
“coordinates”: [[0, 0], [1, 0], [1, 1], [0, 1]]
},
“properties”: {
“name”: “Square”
}
}
]
}
‘’’
geo_source_point = GeoJSONDataSource(geojson=geojsondata_point)
geo_source_square = GeoJSONDataSource(geojson=geojsondata_square)
p = figure()
p.circle(x=‘x’, y=‘y’, source=geo_source_point, size=10, color=‘blue’)
p.line(x=‘xs’, y=‘ys’, source=geo_source_square, color=‘red’)
show(p)
``

