[Qgis-developer] Plugin specific maplayers
Borys Jurgiel
borysiasty at aster.pl
Sun Nov 22 03:44:37 EST 2009
I've just found this quite old email - why not to open a ticket on trac?
Probably nobody has a spare time to work on it at the time, but it's worth to
save the idea. We could even implement a mapserver provider in the future.
Dnia wtorek, 6 października 2009 o 11:05:13 Mathias Walker napisał(a):
> Hello
>
> At the moment our mapfile plugin only works when adding a mapfile layer
> using the plugin dialog. This is done by creating a temporary image and
> adding it as a raster layer. This image is then rerendered on every change
> of the map canvas extents.
> But this layer will not be restored when saving it in a project, as the
> temporary image no longer exists. Also the plugin can not detect which
> layer belonged to it or what parameters to use.
>
> To solve these issues it would be nice to have a new plugin specific
> maplayer type.
>
> Desired features:
> - attach layer to corresponding plugin when loading a project
> - get plugin specific parameters to recreate the layer
> - handle layers with missing plugins
> - save plugin specific parameters when saving a project
> - detach from plugin when removing the layer
> - create and add layer using the plugin
> - get layer draw events for custom rendering based on current extents and
> image size
> - customizable layer properties dialog
>
> Several of these features can be solved with workarounds using the QGIS
> API. But especially the problem of restoring a layer when loading a
> project is still unsolved.
>
> What would be the best approach to integrate plugin specific maplayers into
> QGIS?
>
> Some ideas:
> - add a new class QgsPluginRasterDataProvider : QgsRasterDataProvider,
> though the QgsRasterDataProvider interface is rather WMS specific
> - or add a new class QgsPluginLayer : QgsMapLayer and
> LayerType::PluginLayer which would cause a lot of adjustments all over the
> place
>
> Best regards
> Mathias Walker
>
More information about the Qgis-developer
mailing list