google map app help

#4
[eluser]eoinmcg[/eluser]
Quote:I’m trying to get back to the controller and am using this (which doesn’t seem to work)

Code:
var url = "<?=site_url('mapapp/test_form'); ?>/fname/" + fname + "/lat/" + latlng.lat() + "/lng/" + latlng.lng();

If you're loading the above javascript in a *.js file the php (<?=site_url('mapapp/test_form'); ?&gtWink isn't going to get parsed. One way around this is to load the javascript as a view in the head of your page this way codeigniter can run the site_url() function.

Quote:Also, I suspect there may be a problem in getting the JavaScript onclick to work. This is the script that is supposed to get the marker position…does CI need to do this differently???

I'm not familiar with the google supplied javascript you're using, but I'd imagine that it shouldn't cause you any problems as it all happens client side. For debugging javascript I can't recommend Firebug enough. console.log() and breakpoints are your friends!

Hope that helps, if not what errors / javascript errors are you gettings?


Messages In This Thread
google map app help - by El Forum - 09-29-2009, 04:05 AM
google map app help - by El Forum - 09-29-2009, 05:13 AM
google map app help - by El Forum - 09-29-2009, 11:54 PM
google map app help - by El Forum - 09-30-2009, 06:34 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.