PATH:
home
/
letacommog
/
letaweb
/
admin
/
widgets
/
views
/
modules
/
script
<script type="text/javascript"> window.initializeMap = function() { window.maps = window.maps || []; console.log('maps-API has been loaded, ready to use'); for(var i =window.maps.length-1; i >=0;i--) { if(initMap(window.maps[i].id, window.maps[i].center,window.maps[i].zoom,window.maps[i].description)) window.maps.splice(i,1); } } function initMap(id, center,zoom,description) { console.log("initMap"); try { if(google == undefined || google.maps == undefined) return; var map_element = $('#' + id); var map_element_width = map_element.width(); var map_element_height = map_element.height(); if(map_element_width == 0 || map_element_height == 0 ) { if(map_element_width == 0) { var p_map_element_width = map_element.parent().width(); map_element_width = p_map_element_width; map_element.width(map_element_width); } if(map_element_height == 0) { map_element.height(map_element_width * 9 / 16); } } var marker; var map; var map = new google.maps.Map(document.getElementById(id), { center: center, zoom: zoom }); marker = new google.maps.Marker({ map:map, draggable: true, animation: google.maps.Animation.DROP, position: center }); var infowindow = new google.maps.InfoWindow({ content: description, }); infowindow.open(map, marker); google.maps.event.addListener(marker, 'click', function() { if (marker.getAnimation() != null) { marker.setAnimation(null); } else { marker.setAnimation(google.maps.Animation.BOUNCE); } }); google.maps.event.addListener(marker, 'drag', function() { var pos = marker.getPosition(); infowindow.setPosition(pos); }); google.maps.event.addListener(marker, 'dragend', function() { var c = marker.getPosition(); this.map.setCenter(c); }); google.maps.event.addListener(map, 'zoom_changed', function() { var c = this.getCenter(); this.setCenter(c); }); map_element.data('map', map); map_element.data('marker', marker); map_element.data('infowindow', infowindow); return true; } catch(e) { return false; } return false; } function registerMap(id, center,zoom,description) { console.log("registerMap"); window.maps = window.maps || []; window.maps.push({id:id, center:center,zoom:zoom,description:description}); initializeMap(); } </script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=<?php echo Yii::app()->params['google_api_key'] ?>&sensor=true&callback=initializeMap" ></script>
[+]
..
[-] master_slider.php
[edit]
[-] embed.php
[edit]
[-] facebook.php
[edit]
[-] facebookcomment.php
[edit]
[-] audio_player.php
[edit]
[-] form.php
[edit]
[-] module_list.php
[edit]
[-] menu.php
[edit]
[-] flash.php
[edit]
[-] social_buttons.php
[edit]
[-] cameraslider.php
[edit]
[-] profilemanager.php
[edit]
[-] ihover.php
[edit]
[-] facebooklike.php
[edit]
[-] gallery.php
[edit]
[-] accordion.php
[edit]
[-] cartcontent.php
[edit]
[-] facebookpost.php
[edit]
[-] skitterslider.php
[edit]
[-] share_buttons.php
[edit]
[-] googlemap.php
[edit]
[-] cycleslider.php
[edit]
[-] facebookpage.php
[edit]
[-] fancytext.php
[edit]
[-] form_password.php
[edit]
[-] tab.php
[edit]
[-] checkout.php
[edit]
[-] slideshow.php
[edit]
[-] infobanner.php
[edit]
[-] contactform.php
[edit]
[-] facebookvideo.php
[edit]
[-] familytree.php
[edit]
[-] statcounter.php
[edit]
[-] carousel.php
[edit]
[-] typedtext.php
[edit]
[-] countdown.php
[edit]
[-] navbar.php
[edit]
[-] newscomment.php
[edit]
[-] facebooksend.php
[edit]