Filter Vector Points by Class (Maps)

We have a map server on a disconnected network that is serving vector tiles only (tileserver-gl-light). I can create a basemap in the Elastic Maps, but would like to be able to filter the points by class. For example, "place" is a point, but I would like to only display Country Name, so I would like to filter something like "class == country" to remove all city, state and continent names. Is that possible in Elastic Maps?

Did you know that Elasticsearch can serve vector tiles? You could load our map server features into Elasticsearch and use layer filtering to narrow down the results by any feature property.

If your vector tile server specifies different feature classes as different sources, then another option would be to add vector tiles with Vector tiles wizard and specify source field to only show features a single source

Layer filtering seems like what I would want, but I don't see the filtering option when I add the map source layer. Not sure if that is just for data coming from Elastic?

Unfortunately, the vector tiles we have don't have the sources broken out that granularly. In the example I posted "place" is a source layer, but it includes classes for "continent, country, state, and city" so all of those names show up. I was unsuccessful trying to specify a single class as the source layer.

Layer filtering seems like what I would want, but I don't see the filtering option when I add the map source layer. Not sure if that is just for data coming from Elastic?

That is correct, filtering is only supported for layers from Elasticsearch

Unfortunately, the vector tiles we have don't have the sources broken out that granularly

What are you using to serve the vector tiles? Does that application allow you to specify styles for the vector tiles? You could use style expressions to hide features.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.