Okay
  Public Ticket #3786025
How to render JS and HTML based on DB fields
Open

Comments

  • Evgeniy Orlov started the conversation

    In my database I have geodata, logitude and latitude for database objects. 

    Now I need to render a  Google Map for each object. It can be done, mostly simple with Maps Embed API and an iframe, or Maps Javascript API and full JS/HTML/CSS code.

    Q: hat are ways to work with multiple transformed values at once?

    For example, like this

    <iframe
      width="450"
      height="250"
      frameborder="0" style="border:0"
      referrerpolicy="no-referrer-when-downgrade"
      src="https://maps.google.com/maps?q={latitude.value},{longitude.value}&hl=de&z=14&output=embed"
      allowfullscreen>
    </iframe>

    Is it a smarter way, to store the code in a separate MySQL column and query longitude/latitude into it?