<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Tamas,<br></div><div><br></div><div>Thanks for the feedback. I was unaware of your excellent addition of being able to read styles and apply them to individual features before going through the code, and then reading <a href="https://mapserver.org/development/rfc/ms-rfc-61.html">https://mapserver.org/development/rfc/ms-rfc-61.html</a><br></div><div>As you say it should be relatively straight forward to apply SLD from a string retrieved from a feature attribute defined in STYLEITEM - I'll add a note to the RFC. <br></div><div><br></div><div>Seth<br></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a><br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div>On Mon, Feb 12, 2024, at 3:38 PM, Tamas Szekeres wrote:<br></div><blockquote type="cite" id="qt" style=""><div dir="ltr"><div>Hi Seth,<br></div><div><br></div><div>That seems to be a great addition, +1 from me.<br></div><div><br></div><div>I see you don't want to support to read SLD from online sources at this stage, but it would be relatively easy to allow specifying the SLD string directly in the feature attribute, since in some cases it is easier to store the data and the style at the same place. For example when the data is coming from a database table or view, it may be challenging to keep the database and the external files in sync. As soon as we can identify that the style string is SLD (for example it ends with </StyledLayerDescriptor>) we could probably call msSLDApplySLD from msLayerGetFeatureStyle directly (not requiring to read the content from a file at all)<br></div><div><br></div><div>Best regards,<br></div><div><br></div><div>Tamas<br></div><div><br></div><div><br></div><div><br></div><div class="qt-gmail_quote"><div dir="ltr" class="qt-gmail_attr">Seth G via MapServer-dev <<a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a>> ezt írta (időpont: 2024. febr. 10., Szo, 0:04):<br></div><blockquote class="qt-gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div>Hi all,<br></div><div> <br></div><div> I've added a new RFC - MS RFC 138: Reference SLD files in Mapfiles at <a href="https://mapserver.org/development/rfc/ms-rfc-138.html" rel="noreferrer" target="_blank">https://mapserver.org/development/rfc/ms-rfc-138.html</a><br></div><div> This would allow SLD files to be referenced in a Mapfile using the STYLEITEM (similar to how JS files are referenced):<br></div><div> <br></div><div> LAYER<br></div><div> STYLEITEM "sld://mysldfile.xml" # uses SHAPEPATH and if not set then relative path to the Mapfile or absolute path<br></div><div> CLASS # define an empty CLASS here<br></div><div> END<br></div><div> END<br></div><div> <br></div><div> It will make it easier to export Mapfiles from other application such as QGIS, and to share styles e.g. between MapServer and GeoServer. More details are in the RFC.<br></div><div> Feedback and comments appreciated. <br></div><div> <br></div><div> I'll start with my +1,<br></div><div> <br></div><div> Seth<br></div><div> <br></div><div> --<br></div><div> web:<a href="https://geographika.net" rel="noreferrer" target="_blank">https://geographika.net</a> & <a href="https://mapserverstudio.net" rel="noreferrer" target="_blank">https://mapserverstudio.net</a><br></div><div> twitter: @geographika<br></div><div> _______________________________________________<br></div><div> MapServer-dev mailing list<br></div><div> <a href="mailto:MapServer-dev@lists.osgeo.org" target="_blank">MapServer-dev@lists.osgeo.org</a><br></div><div> <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br></div></blockquote></div></div></blockquote><div><br></div></body></html>