javascript - Move map then show dialog -
i need move map , need show dialog. next code show dialog , map gets move opposite behavior.
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()); }
as dr. molle points out. sleep() function blocking access other code beingness run. utilize settimeout function. this:
function showdetails(property_id) { map.panby(300,0); window.settimeout(function() { window.showmodaldialog("<?php echo base_url();?>index.php/admin/add_property_from_map/"+18+"/"+73); }, 3000); }
javascript google-maps
No comments:
Post a Comment