Open atiyehk opened 6 years ago
Maybe we should add async support to loading locations when there are so many. Since all the locations are being loaded on the server, its causing the application page to hang until all addresses are resolved to lat/long
I ended up cache the addresses lat/longs to make this faster. No feedback about the issue so needed to get a workaround.
Example below takes more than 10 mins to load. Didn't really debug the add_marker function, but I am assuming its trying to resolve the address to lat/long, etc.. which might be causing it to take too much time?
foreach($query as $sale) { $marker = array(); $marker['infowindow_content'] = ($sale['client_name'] . ' - ' . $sale['quote_unit_number'] . ' - ' . $sale['item_name'] . ' - ' . $sale['quote_number']); $marker['position'] = $sale['client_address_1'] . ' ' . $sale['client_city'] . ' ' . $sale['client_state'] . ', ' . $sale['client_zip']; $this->googlemaps->add_marker($marker); }