{% if lat_long is not empty %} <div id="listing_map"></div> {% set lstLatLng = lat_long | split(',') %} <script> function initMap(){ var lat_lng ={lat: {{ lstLatLng[0] }} , lng: {{ lstLatLng[1] }} }; var map = new google.maps.Map(document.getElementById('listing_map'), {zoom: 16, center: lat_lng }); //marker var marker = new google.maps.Marker({position: lat_lng, map: map, icon:'{{ app.request.getBaseURL() }}/public/img/map_marker.png'}); } </script>{% endif %}