Referring the document at Tilerserver I am using my local tileserver-gl-light but my label are not rendered correctly. Label appears as {name:latin}{name:nonlatin} or {name:en}{name:nonlatin} refer the screenshot

Label appears as {name:latin}{name:nonlatin} or {name:en}{name:nonlatin}

This happens only when I change the style to http://localhost:7070/styles/osm-bright/style.json whereas If using the default https://openmaptiles.github.io/klokantech-basic-gl-style/style-cdn-undecorated.json it works fine.

Am using ol v4.3.1 and olms.js v2.6


1 Answer 1


It seemed that 'text' parameter to the fromTemplate function in olms.js is passed with 2 objects {name:latin}{name:nonlatin} and the match() function fails to find it. I modified the my olms.js file to and now I am able to see labels of point entities, namely City, Town, Locality names

function fromTemplate(text, properties) { // hardcoded to show only 'name_int' text = "{name_int}"; var parts = text.match(templateRegEx); if (parts) { var value = properties[parts[2]] || ''; return parts[1] + value + parts[3]; } else { return text; } }

but still I am unable to display labels on Road/Street. As suggested by @scai would post the query on https://help.openstreetmap.org/ to get a better solution which fixes for point, line and polygon labels.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.