Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda