maps: fire combo:map-ready even if there is no GeoJSON URL (#24854)
This commit is contained in:
parent
743cadaf89
commit
891f39be87
|
@ -131,15 +131,19 @@ $(function() {
|
|||
attribution: map_attribution,
|
||||
maxZoom: map_options.maxZoom
|
||||
}).addTo(map);
|
||||
map.add_geojson_layer(function(geo_json) {
|
||||
var bounds = geo_json.getBounds();
|
||||
if (bounds.isValid()) {
|
||||
if (init_state == 'fit-markers') {
|
||||
map.fitBounds(bounds);
|
||||
if (geojson_url) {
|
||||
map.add_geojson_layer(function(geo_json) {
|
||||
var bounds = geo_json.getBounds();
|
||||
if (bounds.isValid()) {
|
||||
if (init_state == 'fit-markers') {
|
||||
map.fitBounds(bounds);
|
||||
}
|
||||
}
|
||||
}
|
||||
$(cell).trigger('combo:map-ready');
|
||||
});
|
||||
} else {
|
||||
$(cell).trigger('combo:map-ready');
|
||||
});
|
||||
}
|
||||
};
|
||||
$('div.cell.map').each(function() {
|
||||
render_map(this);
|
||||
|
|
Loading…
Reference in New Issue