I have a GeoServer layer that contains all buildings (houses, schools, library, museums) with their locations, data is stored in PostGIS database, and now creating a geoportal for showing that online with some symbols.
Is there a way to split this layer into multiple layers so I can use a built-in function, in OpenLayers, for showing and hiding layers?
I need that because for example if someone wants to see only schools he can turn all other layers off. If this can't be done can someone give me an idea what I should do?
My other idea is to try creating external checkboxes and then use them to show/hide features. I know that I can split them with an SQL view, but there is a lot of data for that. I am using OpenLayers 3.