Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

153
Visualizações
MapBox marker popup error displaying in PHP smarty template view

I am attempting to create a popup marker for my website. The popups work fine when using codepen: https://codepen.io/awd1236/pen/GROVKdm

For some reason when importing the EXACT SAME CODE in the EXACT SAME format I recieve this error:

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/var/www/vhosts/secretwebsitedomain/subdomains/secretwebsitedomain/httpdocs/views/pages/map.tpl" on line 60 "<h3>${feature.properties.title}</h3><p>${feature.properties.description}</p>" - Unexpected ".", expected one of: "}" <-- thrown in /var/www/vhosts/secretwebsitedomain/subdomains/secretwebsitedomain/httpdocs/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 60.

This is the initial code that works on codepen:


new mapboxgl.Marker(el)
.setLngLat(feature.geometry.coordinates)
.setPopup(
new mapboxgl.Popup({ offset: 25 }) // add popups
.setHTML(
`<h3>${feature.properties.title}</h3><p>${feature.properties.description}</p>`
)
)
.addTo(map);
}

This is the line that is causing the error (line 60) in the smarty.../sysplugins/ folder:

I am unsure what I can do to fix this error.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda