Hi,
A fellow student and i are working with viktor for a schoolproject.
We both ran into the same problem with GeoJSONView.
Individually the datasets load in perfectly fine, but when we try to load more than one dataset we get the following error:
AttributeError: ‘str’ object has no attribute ‘_serialize’
This is the code im using:
@GeoJSONView(‘GeoJSON view’, duration_guess=1)
def get_geojson_view(self,params,**kwargs):
features = waterwegen[“features”]
for feature in features:
for point in feature[“geometry”][“coordinates”][0]:
point[1], point[0] = RDWGSConverter.from_rd_to_wgs((point[0], point[1]))
# return GeoJSONResult(waterwegen)
# @GeoJSONView('GeoJSON view', duration_guess=1)
# def get_geojson_view(self, params, **kwargs):
features = horeca["features"]
for feature in features:
feature["geometry"]["coordinates"][1], feature["geometry"]["coordinates"][0] = RDWGSConverter.from_rd_to_wgs((feature["geometry"]["coordinates"][0], feature["geometry"]["coordinates"][1]))
# return GeoJSONResult(horeca)
return GeoJSONResult(horeca, waterwegen)