This RFC describes a work plan for improving the state of parsing and displaying remote data, with the goal of simplifying the existing code with as little change to existing layers as possible.
Loading Remote Data
Two mechanisms:
- Single URL Load (Layer.GML, Layer.GeoRSS, Layer.Text)
- Geographic-based reload (Layer.WFS)
Either of these mechanisms should provide the ability to use either markers + popups or vector features for displaying data.
Parsing Remote Data
Currently, there are two ways that remote data is parsed:
- Using the Format classes
- Using layer-specific parsing.
Rather than having these two mechanisms, instead, all parsing should be done through format classes.
Layers affected:
- Layer.WFS: parsing currently done in Tile.WFS and in Feature.WFS
- Layer.GeoRSS: parses XML data, and displays markers and popups -- this is addressed by #1025
- Layer.Text: parses textual data, and displays markers according to the parsed data and popups -- this is addressed by #1033
Displaying Remote Data
Currently, there are three ways that remote data is displayed:
- Vector Features. No attribute information is displayed: users can use SelectFeature control to display information on hover or select.
- Marker Features. Events are registered at marker creation time, with popups showing content based on attributes on the feature interpolated into a template or reading directly from an attribute.
The latter applies to GeoRSS and Text layers. Instead of having these layers/display types be specific to the format, two layer types are proposed:
- Remote Data Vector Layer: Uses a passed Format to parse the remote data format, and displays attributes. This is the same as the current GML Layer.
- Remote Data Marker Layer: Uses a marker, and registers popups whose content is based on an interpolation string from attribute data.
These two should allow us to fully replace the existing GeoRSS and Text layers with something that can mimick their behavior, or display more complex geometries as vectors from which users can generate their own SelectFeature control.
