I would like to integrate Google Maps in YII. How can I include custom JS in YII? I’ve read a lot about this stopic but i haven’t understand the concept yet. (Tutorials?)
CClientScript::registerCoreScript()
CClientScript::registerScriptFile()
CClientScript::registerScript()
These are the right functions to include custom JS? How can I use them? How can i pass variables from YII to JS and from JS to YII?
I tried two Extensions, the EGMAPS and the GMAP-Jquery Extensions. Both are not enough for my requirements.
For example in the EGMaps-Extension the Polylines are missing and in the GMap-JQuery Extension the Geocoding. So I need to use the pure Google Maps API. In the YII Guide is nothing about the integration of pure JS in YII or am I wrong?
<?php
$script = <<<EOD
// write pure javascript here without the need to escape
EOD;
Yii::app()->clientScript->registerScript('customFnc', $script, CClientScript::POS_READY);?>