I’m trying to create an interactive map for a GeoJSONView, and according to the docs I have to give an identifier to each geometric object, e.g. point_1 = MapPoint(..., identifier="point1")
However, this doesn’t seem to be working for GeoJSONView. Some context: I create a GeoDataFrame with several columns (including “stroke” and “type” etc., all properties which are used for plotting). Then I convert this to a GeoJSON and return it as GeoJSONResult. I tried adding “identifier” as a column, like I did with other properties, but this doesn’t seem to work. Should I do it differently?
Thank you for your question. As you noticed, it is not documented how to use map select interaction for a GeoJSONResult. We will fix this. The identifier can be added to the raw json with “id” on the same level as “type” within a feature:
Hi Bas, I tried creating the “id” field but while interaction it doesn’t provide the field I copied but some number. Could you please let me know if I am missing something.