Hello!
I am working on a project, where I will feature lots interesting geological locations on a globe, using Arcgis API for Javascript. These locations will be featured in GEOJSON layer and people should be able to click on the symbols and a pop-up window with pictures and texts will appear. This works fine so far, but I would like to apply a filter. I assigned different categories to the selected locations, like "Volcanoes", "Mountains", "Reefs" and much more. I would like to add a filter, so that users can select for example "Volcanoes" and just the volcanoes will be visible on the globe.
I looked at tutorials (e.g. https://developers.arcgis.com/javascript/latest/sample-code/featurefilter-attributes/), but I am not able to apply it on my globe. I am beginner and probably I am doing something wrong. Is the sample code in link applicable for GEOJSON layers as well? Or maybe someone has another idea or knows about other tutorials or sample codes, that could help in this case.
Below is a small excerpt of the GEOJSON file. There are more properties, but I would like to filter them only by the "category". The geometry type stays the same throughout the file.
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "Mount Fuji",
"category":"Volcanoes",
"type": "...............",
"location": "................",
"description": "......"
},
"geometry": {
"type": "Point",
"coordinates": [
138.7275,
35.360556
]
}
},
..
..
..
Thank you very much!