<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Roland</title>
    <description>The latest articles on DEV Community by Roland (@iranon).</description>
    <link>https://dev.to/iranon</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3740630%2Fa06837ca-c89f-4e86-a4a8-05a90b9a347f.png</url>
      <title>DEV Community: Roland</title>
      <link>https://dev.to/iranon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iranon"/>
    <language>en</language>
    <item>
      <title>protomaps-leaflet label display</title>
      <dc:creator>Roland</dc:creator>
      <pubDate>Thu, 29 Jan 2026 22:03:02 +0000</pubDate>
      <link>https://dev.to/iranon/protomaps-leaflet-label-display-758</link>
      <guid>https://dev.to/iranon/protomaps-leaflet-label-display-758</guid>
      <description>&lt;p&gt;Hello everyone, I'm new in this place, but I have a problem that I couldn't solve.&lt;br&gt;
I created some pmtiles files. I used tippecanoe and ogr2ogr, with various settings. My goal is: show the files with protomaps-leaflet.js. I already have some leaflet projects with basemaps, geojson layers, but i never used protomaps.&lt;br&gt;
I can create the tiles, and the geometries are correct. I used geometry symbolizers (LineSymbolizer, CircleSymbolizer, PolygonSymbolizer), and I tried text symbolizers. But no matter how hard I tried, I couldn't display the texts. The dataLayer is right, apparently all settings are good, there are no error messages in the console. But labels aren't display. Now I created 3 test files: polygons (i would like to label one of the attributes), lines (for line-labels), and one file which contains only labels.&lt;br&gt;
I checked everything on pmtiles.io and in the meta data. Based on the examples, it doesn't work for me. Does anyone have any experience with what else to look out for?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  const labels = [
    {
      dataLayer: "test",
      symbolizer: new protomapsL.TextSymbolizer({ //LineLabelSymbolizer, LineSymbolizer, PolygonSymbolizer, CenteredTextSymbolizer
        labelProps: (z, f) =&amp;gt; { //label, text, label_props, dynamic and static text for testing
            console.log("centroid:", f.geom[0][0].x, f.geom[0][0].y);
            return "TEST";
        },
        font: "12px sans-serif",
        fill: "red",
        stroke: "white",
        width: 3,
        collide: false
      })
    }
  ];

const layer = protomapsL.leafletLayer({
    url: "data_pmtiles/only_labels.pmtiles",
    labelRules: labels,
    view: "2d"
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>frontend</category>
      <category>help</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
