Welcome Guest, Not a member yet? Register   Sign In
can google maps be embedded in codeigniter?
#1

[eluser]WebDev[/eluser]
hi! I'm currently developing a web application that uses google map API but after studying codeIgniter i'm wondering if google maps can be embedded on it or can google maps run on codeIgniter environment. Any reply would be highly appreciated =).
#2

[eluser]CroNiX[/eluser]
Sure, it's just a <div> or whatever in a view that you run javascript on. All CI does is output what you tell it.
#3

[eluser]WebDev[/eluser]
tnx a lot =)
#4

[eluser]WebDev[/eluser]
i have tried it but the errors are the ff:
-> can load the css file
-> google map did not appear

my css and js files are in the codeigniter/application/views folder...should i put these files on different directory of codeigniter?

wrapping code with [code] tags? so i will be wrapping all my js file with it?
#5

[eluser]CroNiX[/eluser]
You can't access anything in /application or /system by the url so that won't work. Put them at the same level as your index.php.

-WebRoot/ (public_html, www, etc)
--application/
--system/
--index.php
--assets/
----css/
----img/
----js/

access like
Code:
base_url('assets/js/your-js-file.js');
like http://yoursite.com/assets/js/your-js-file.js

Edit: changed site_url() to base_url()
#6

[eluser]Matalina[/eluser]
shouldn't that be base_url Cronix? Site_url will give the index.php if it's not removed by .htaccess.
#7

[eluser]BIOSTALL[/eluser]
Hi WebDev,

I've developed a library that allows you to just this. It created the HTML, Javascript etc for you.

For documentation and examples etc see the link below:

http://biostall.com/codeigniter-google-m...pi-library

Hope that helps Smile

BIO
#8

[eluser]CroNiX[/eluser]
[quote author="Matalina" date="1337088426"]shouldn't that be base_url Cronix? Site_url will give the index.php if it's not removed by .htaccess.[/quote]Absolutely! My mistake there. Good catch.




Theme © iAndrew 2016 - Forum software by © MyBB