[Qgis-developer] Layer Name and Title in QGIS Mapserver GetCapabilities response
Hi all, I wonder if value layer Name is correct in QGIS Mapserver GetCapabilities response. Currently both Name and Title are the same - it is a layer name as visible in QGIS. Shouldn't it be more correct if the Name value will contain layer internal ID (for example roads2013135915389) and Title will contain user visible value (for example Roads). It could also help solving problem when user will set the same name for multiple layers. Could we provide a patch ? -- Ivan Minčík ivan.min...@gmail.com GPG: 0x79529A1E http://imincik.github.io/0x79529A1E.key ivan.min...@gista.sk GPG: 0xD714B02C http://imincik.github.io/0xD714B02C.key ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Layer Name and Title in QGIS Mapserver GetCapabilities response
Hi, Layer title and name are only the same if the title in the metadata is not set (see metadata tab of a layer). If you set the title in the metadata tab it will be different from the name in the GetCapabilities response. Naming the same layer twice: it's just bad practice. Authors should not do that. Many plugins also rely on the fact that the same layer name does not appear multiple times (or how would you distinguish layers (e.g. in a combobox) if the same layer name is used multiple times?) I would just tell users: don't do that. It's your own fault if you do it. I wouldn't mind if you add the layer id in the GetProjectSettings command (in addition to layer and title, not instead of), but I don't think that the layer id's should be exposed in GetCapabilities. Andreas Am 04.04.2014 12:58, schrieb Ivan Minčík: Hi all, I wonder if value layer Name is correct in QGIS Mapserver GetCapabilities response. Currently both Name and Title are the same - it is a layer name as visible in QGIS. Shouldn't it be more correct if the Name value will contain layer internal ID (for example roads2013135915389) and Title will contain user visible value (for example Roads). It could also help solving problem when user will set the same name for multiple layers. Could we provide a patch ? ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Layer Name and Title in QGIS Mapserver GetCapabilities response
Andreas, thanks for your response. My comments are below: On Fri, Apr 4, 2014 at 3:54 PM, Andreas Neumann a.neum...@carto.net wrote: Hi, Layer title and name are only the same if the title in the metadata is not set (see metadata tab of a layer). If you set the title in the metadata tab it will be different from the name in the GetCapabilities response. Thanks, I wasn't aware of that. Naming the same layer twice: it's just bad practice. Authors should not do that. Many plugins also rely on the fact that the same layer name does not appear multiple times (or how would you distinguish layers (e.g. in a combobox) if the same layer name is used multiple times?) I would just tell users: don't do that. It's your own fault if you do it. I agree, but it would be fine if QGIS would deny to create layers with same name, rather than to rely on user's decision. I wouldn't mind if you add the layer id in the GetProjectSettings command (in addition to layer and title, not instead of), but I don't think that the layer id's should be exposed in GetCapabilities. OK, we are in process of preparing patch which will add multiple new parameters to GetProjectSettings. We will include also layer ID. -- Ivan Minčík ivan.min...@gmail.com GPG: 0x79529A1E http://imincik.github.io/0x79529A1E.key ivan.min...@gista.sk GPG: 0xD714B02C http://imincik.github.io/0xD714B02C.key ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer