Hi, I am having code for google map weather information display.Using overlay text on image to pass text on google map.How can I add blinking effect in image .php code. Can some body guide me ??
Below are the part of PHP code HTML: if($fish_info) { ?> var latlng = new GLatLng(northEast.lat()-latSpan * 0.3, northEast.lng()-lngSpan * 0.1); info = "<?php echo $fish_info; ?>" ; file = "<?php echo 'img/fish.png'; ?>" ; map.addOverlay(createMarker(latlng,file,info)); <?php }?> In the attachment fish image display on Google map.But I want to give blinking effect on Fish image How can I do???? Suggest something Upon this.......
But we can also do using Java Script,HTML?? How can I replace the Fish.png with Blinking Animated .gif.Will it work with PHP code if I Replace with Animated Image?? If I am saving downloaded animated .gif image and using that image in php code its not blinking....
Hi, Google search I found JAVA script for Blinking used that script to introduce the blinking effect and get some success in doing but its Blinking Outside Google map separate fish image.Not on Google map.Thing become clear in attachment. Code: <script type="text/javascript"> var blinkImg = function (imgname, s) { clearTimeout(blinkImg['blinking' + imgname]); var obj = document.images[imgname]; if (arguments[1] === 'blink') { obj.style.visibility = !(blinkImg[s + imgname] = !blinkImg[s + imgname])? '' : 'hidden'; blinkImg['blinking' + imgname] = setTimeout(function(){blinkImg(imgname, s);}, 350); } else { blinkImg['blink' + imgname] = false; obj.style.visibility = ''; } }; </script> <body> <img name="blinker1" src="img/imagename.gif"><br> <input type="button" onclick="blinkImg('blinker1', 'blink');" value="Blink"> <input type="button" onclick="blinkImg('blinker1', 'stop');" value="Stop"> </body> Below are PHP code PHP: if($fish_info) { ?> var latlng = new GLatLng(northEast.lat()-latSpan * 0.3, northEast.lng()-lngSpan * 0.1); info = "<?php echo $fish_info; ?>" ; file = "<?php echo 'img/imagename.gif'; ?>" ; map.addOverlay(createMarker(latlng,file,info)); and in above code imagename.gif is fish image .And want this image will be blinking on google map.Right now its which is not happening on google map.Can somebody assist what change I supposed to do make it blinking on google map.Kindly help me out from this.Something missing from my side please let me know..
Hi, See in PHP code var latlng = new GLatLng(northEast.lat()-latSpan * 0.3,northEast.lng()-lngSpan * 0.1); is location of Fish Image on google map and file = "<?php echo 'img/fish.png'; ?>" ; is the Image path.And problem is that How can I call blinking function inside map.addOverlay(createMarker(latlng,file,info)); so that Image will start blinking on Map.Suggest me upon this????