i creating routes on google maps , need add info routes. example click in map , create marker a. click again , create marker b. on , b there polyline. when click on b need open window pretty photo in order ask information route. question: how can open pretty photo window contain form using event listener of google maps.
google.maps.event.addlistener(map, 'click', function(e){ //open pretty photo iframe window }); many in advances... best regards,
you can use below code open google map on pretty photo.
<html> <head> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> google.load("jquery", "1.4.2"); </script> <link rel="stylesheet" href="css/prettyphoto.css" type="text/css" media="screen" title="prettyphoto main stylesheet" charset="utf-8" /> <script src="js/jquery.prettyphoto.js" type="text/javascript" charset="utf-8"></script> <!-- google maps code --> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"> </script> <script type="text/javascript"> function initialize() { var latlng = new google.maps.latlng(-34.397, 150.644); var myoptions = { zoom: 8, center: latlng, maptypeid: google.maps.maptypeid.roadmap }; var map = new google.maps.map(document.getelementbyid("map_canvas"), myoptions); } </script> <!-- end google maps code --> </head> <body> <p><a href="#?custom=true&width=260&height=270" rel="prettyphoto">open google map</a></p> <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $("a[rel^='prettyphoto']").prettyphoto({ custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>', changepicturecallback: function(){ initialize(); } }); }); </script> </body> </html>
Comments
Post a Comment