0
我需要移動地圖,然後需要顯示對話框。下面的代碼顯示對話框,然後地圖得到移動,這是完全相反的行爲。移動地圖然後顯示對話框
function showDetails(property_id)
{
map.panBy(300,0);
sleep(3000);
window.showModalDialog("<?php echo base_url();?>index.php/admin/add_property_from_map/"+18+"/"+73);
}
function sleep(ms)
{
var dt = new Date();
dt.setTime(dt.getTime() + ms);
while (new Date().getTime() < dt.getTime());
}