I have (from database):
<?php
$l = array();
$l['lat'] = $row['lat']; //51.507351
$l['lon'] = $row['lon']; //-0.127758
$l['animation'] = $row['animation']; //google.maps.Animation.DROP - stored without quotes in database
?>
If I var_dump($l):
array(3) { ["lat"]=> string(9) "51.507351" ["lon"]=> string(9) "-0.127758" ["animation"]=> string(26) "google.maps.Animation.DROP" }
Then "google.maps.Animation.DROP" is in quotes. How to avoid that? lat and lon must be in quotes. How to force that animation is not string?
Edit: I want to achieve that (using Twig and json_encode) - google.maps.Animation.DROP and this should be without quotes:
var l = {{ l|json_encode|raw }};
$(function() {
new Maplace({
show_markers: true,
locations: [l],
}).Load();