I am designing a web page that will be accessed by 10-20 users simultaneously, with the following requirements:
- Display Google map data as the base layer (higher quality street information in our area of interest than OSM)
- Display ~30 pre-existing KMLs, each toggleable for display by the user. These contain markers, lines, and polygons.
- Perform filtering based upon KML meta-data (i.e. color of a feature)
- Allow user to specify a polygon
- Perform filtering based upon polygons (both user specified and pre-existing, i.e. counties)
- Export filtered results to a new KML file.
An example usage would be: User selects two of the 30 KML layers (i.e. view only bridges and dams, not hospitals), and displays these on the map. User filters these features by a single county (pre-defined polygon). User further filters the data with a user-defined polygon. User 'exports' filtered data: filtered data is added to a (versioned) KML, which aggregates all user-filtered data and (the latest version of which) is hosted for download.
I have built a prototype using OpenLayers (2.13.1), but the performance when rendering 1000+ (but generally less than 5000) features is unacceptable. I am currently exploring the use of OpenLayers 3, but it does not support a Google Maps layer, which is fairly important to this project (again, due to quality of data vs OSM in the area of interest).
I have also built a prototype using fusiontables and the GMaps API, which was able to render the data with excellent performance - however I have not been successful at filtering the data. The fusiontablelayer API provides a single ST_INTERSECTS clause as part of an SQL query, but I would need to call this once per marker, per geographic filter, equating to ~300,000 GET requests... [If there is another way to perform this filtering using the fusiontable/GMaps API that I've overlooked, please let me know!]
So, the question boils down to: Can this be done client-side (to include clientside + existing 3rd party server API)? If not, and a server-based approach could fulfill these requirements, what do you recommend?
Recommendations or not, thanks for your time reading this!