I have successfully created a basic HTML code to display data from a JSON file. Everything is working fine, but now I would like to incorporate an Openlayers map. Openlayers has the capability to show a map with predefined center coordinates without the need for JavaScript. However, I am facing a challenge in dynamically changing these parameters using my JSON data.
Below is the current code snippet:
<div id="contact">
<h1>{{data.title}}</h1>
<p>{{data.description}}</p>
<openlayers lat="-33.86" lon="151.20" zoom="9" attribution="false">
</openlayers>
</div>
The code is functioning correctly (displaying JSON data), but I need help in updating the "lat" and "lon" parameters with my JSON data {{data.latitude}} and {{data.longitude}}
Thank you in advance for any assistance :) (and apologies for any language errors)