[Qgis-developer] show grid on map canvas (similiar to grid used in composer) - strategy?

Martin Dobias wonder.sk at gmail.com
Thu May 10 13:39:06 PDT 2012


On Thu, May 10, 2012 at 2:06 PM, Nathan Woodrow <madmanwoo at gmail.com> wrote:
> I think if QgsPluginLayer is a usable option that would be the way to go, or
> maybe  QgsVectorLayer  but I suspect that you will need a provider for
> that.

I would suggest _not_ to create another provider for grids (for use as
a vector layer). A grid is not really made of vector features, and
lots of vector operations do not make much sense for grid. An
interesting approach might be to use QgsPluginLayer class, but IMHO a
grid is not even a layer... e.g. does it make any sense to draw some
other layers on top of a grid?

For me a grid is a good candidate to be implemented as another type of
decoration (currently there is north arrow, scale bar and copyright
label). A decoration is drawn on top of the map when map rendering has
finished. And symbology can still be applied when drawing grid as a


More information about the Qgis-developer mailing list