Load items once in controller and not have to reload them. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Load items once in controller and not have to reload them. (/showthread.php?tid=58351) |
Load items once in controller and not have to reload them. - El Forum - 06-05-2013 [eluser]maddtechwf[/eluser] I'm using a Google Maps plugin that someone developed for CodeIgniter and everything works great. The only thing I'm trying to figure out is how I might be able to do something. I have an index function that loads all the necessary configuration items for the map to show on the page. I would like to write a few functions that allow me to update just the points on the page instead of having to redraw the map each time. I know this is more suited for the person that developed this but they don't have a forum to ask questions and they are over sea's so responses are delayed when I have emailed them in the past. Actually, it's been about a week since I last emailed them and no response yet. Below is my controller and function, I will gladly explain anything to anyone if they have questions. I've tried to document the code as best as I can. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Load items once in controller and not have to reload them. - El Forum - 06-05-2013 [eluser]jairoh_[/eluser] create a function w/ params w/ default values and transfer that index codes there. And if you want to show default map in the first page, all you have to do it call the function w/ default input. and if you want to change the map location anytime, make a form and call the function again. |