Click on Google Map Pin to open fancybox

Hi,

I have a problem i am using google map have multiple pins i want to click on pin fancybox open and i will show detail in fancybox. my code is

jQuery(document).ready(function(){


			var myMarkers = {"markers": [
                                <?php
                                $gd=0;
                                foreach($deals->deals as $map)
                                    {
                                    if($gd<5)
                                    {
                                ?>




                                   {"latitude": "<?php echo $map->options[0]->redemptionLocations[0]->lat; ?>", "longitude":"<?php echo $map->options[0]->redemptionLocations[0]->lng; ?>", "icon": "images/grouppin.png", "baloon_text": '<strong><?php echo $map->options[0]->redemptionLocations[0]->streetAddress1.' '.$map->options[0]->redemptionLocations[0]->streetAddress2; ?></strong>'},
					
				 <?php
                                 $gd++;
                                    }
                                }
                                ?>



                        ]
			};


			jQuery("#map").mapmarker({
				zoom	: 10,
				center	: '<?php echo $city.', USA'; ?>',
				markers	: myMarkers,
                                	
				
			});

this is my code it show multiple pins on map. now how to open a fancybox when click on pin

When you look at the html source code showing the output into JS of this PHP code, is it displaying correctly?

If not, show what it is displaying vs what you want it to display along with the contents of a var_dump($deals)

it is display google map correctly having pins when click on pin its show address of deal in baloon. I want to show in fancybox.

I guess you follow the instructions on fancybox.

You’d normally a) get all your JS working correctly with one or two hard coded examples, and then b) use PHP to interpolate the code you want so that it exactly mimics the hard coded values you have.

Until you have achieved a) or can show us exactly what that is versus what you have in your array of objects, then I don’t really see how we - on the PHP forum - can help you.

Maybe someone else out there has experience of this fancybox library?