Google maps API and Yii

Hello guys,

there comes lots of javascript code when using google maps API. My question is, where to put the code? In a controller, in a view or in a separate JS file loaded to the view?

Many thanks

xsnowy

JS code is view data… .so not good to put it in the controller…

so you can choose from view file or separate JS file… that’s up to you… if there is lot of JS code it’s always better to have it in a separate JS file…