I am using the library with Symfony 3.2.7 (through the bundle).
I am loading the map, rendered in a template with an ajax request. The initial loading goes perfect.
When I replace the map-container's content with a different map, with the same function, the correct makers are added. Only the map's auto zoom is not working.
Do you have any idea what could be causing this problem?
// returned rendered by ajax response
{{ ivory_google_map(map) }}
{{ ivory_google_api([map]) }}
// javascript
var map_container = $('.map-container');
// AUTO ZOOM WORKS PERFECTLY
$(document).ready(function()
{
loadMap();
});
// AUTO ZOOM DOES NOT WORK AT ALL
$('.obs-select').change(function()
{
loadMap();
});
var loadMap = function()
{
var ctl = getControls();
var routeName = 'map_filter_' + ctl.filter;
var url = Routing.generate(routeName);
$.ajax({
type: "POST",
url: url,
success: function(response){
if (response.length) {
map_container.html(response);
}
},
error: function(xhr){
console.log("Oops something went wrong in the controller with route: " + url + " Returns: " + xhr.status + " " + xhr.statusText);
}
});
};
I am using the library with Symfony 3.2.7 (through the bundle).
I am loading the map, rendered in a template with an ajax request. The initial loading goes perfect.
When I replace the map-container's content with a different map, with the same function, the correct makers are added. Only the map's auto zoom is not working.
Do you have any idea what could be causing this problem?