public static function createMap($isAppartment = false) { self::$jsVars = ' var mapGMap; var fenWayPanorama; var markersGMap = []; var markersForClasterGMap = []; var infoWindowsGMap = []; var latLngList = []; var markerClusterGMap; '; self::$jsCode = ' var centerMapGMap = new google.maps.LatLng(' . param('module_apartments_gmapsCenterY', 55.75411314653655) . ', ' . param('module_apartments_gmapsCenterX', 37.620717508911184) . '); mapGMap = new google.maps.Map(document.getElementById("googleMap"), { zoom: ' . ($isAppartment ? param('module_apartments_gmapsZoomApartment', 15) : param('module_apartments_gmapsZoomCity', 11)) . ', center: centerMapGMap, mapTypeId: google.maps.MapTypeId.ROADMAP }); '; }
public static function createMap($isAppartment = false) { //Yii::app()->getClientScript()->registerScriptFile('https://maps.google.com/maps/api/js??v=3.5&sensor=false&language='.Yii::app()->language.'', CClientScript::POS_END); //Yii::app()->getClientScript()->registerScriptFile('http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js', CClientScript::POS_END); self::$jsVars = ' var mapGMap; var fenWayPanorama; var markersGMap = []; var markersForClasterGMap = []; var infoWindowsGMap = []; var latLngList = []; var markerClusterGMap; '; self::$jsCode = ' var centerMapGMap = new google.maps.LatLng(' . param('module_apartments_gmapsCenterY', 55.75411314653655) . ', ' . param('module_apartments_gmapsCenterX', 37.620717508911184) . '); mapGMap = new google.maps.Map(document.getElementById("googleMap"), { zoom: ' . ($isAppartment ? param('module_apartments_gmapsZoomApartment', 15) : param('module_apartments_gmapsZoomCity', 11)) . ', center: centerMapGMap, mapTypeId: google.maps.MapTypeId.ROADMAP }); '; }