Advertisement:

Author Topic: Map in fancybox  (Read 976 times)

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Map in fancybox
« on: May 01, 2015, 04:58:24 pm »
Hello. I would like to show the map inside fancybox and have some issues

If i use
Code: [Select]
<a class="google_iframe" href="https://maps.google.com/maps/ms?ie=UTF8&amp;msa=0&amp;msid=202414688179067925321.0004d62815a849d23c081&amp;t=h&amp;ll=43.36373,16.508332&amp;spn=1.617251,3.364563&amp;output=embed">
    click here for fancy
</a>

<script>
    $(document).ready(function() {
        $(".google_iframe").fancybox({
            'width'             : '75%',
            'height'            : '75%',
            'autoScale'         : false,
            'transitionIn'      : 'none',
            'transitionOut'     : 'none',
            'type'              : 'iframe',
        }
        });
    });
 
</script>

the map shows fine but i need to show the location of the listing.

So, i try to use it like this
Code: [Select]
<a id="google_iframe" href="#view">
    click here for fancy
</a>
<div id="view" style="width:500px; height:300px; display: none;">
<?php osc_run_hook('location'); ?>
</div>

<script>
    $(document).ready(function() {
        $("a#google_iframe").fancybox({
            'width'             : '75%',
            'height'            : '75%',
            'autoScale'         : false,
            'transitionIn'      : 'none',
            'transitionOut'     : 'none',
            'type'              : 'iframe',
        });
    });
 
</script>
and is not working. Fancy box opens but map doesn't show.

If i use
Code: [Select]
<script type="text/javascript">
$(document).ready(function() {
$("a#popupmap").fancybox({
fitToView : true,
        'autoSize': false,
closeClick : false,
closeEffect : 'none',

   

});
});
</script>

the map will show but only for half and on resize will not stay centered.

The pointer must stay always in the center and i would like to have the map big, like 100% no matter on which device is shown
Something like you see when you click on the map from http://auto.demoflynax.com/autos/dodge/challenger/dodge-challenger-srt-8-8.html
« Last Edit: May 01, 2015, 05:02:31 pm by Adyyda »

itcafeonline

  • Full Member
  • ***
  • Posts: 245
Re: Map in fancybox
« Reply #1 on: May 08, 2015, 09:16:27 am »
following...........