Google map not working

Hi,

i use iframe tag in my application at the time my application take more loading time how can i solve this issue.This is my code

without using iframe tag my application very fast.

Your topic says google map not working, your question says taking long to load I’m confused on what’s your question :slight_smile:


With regards to loading, you will have to write a script that makes the iframe load once the whole page has loaded.

Here’s a topic: http://stackoverflow.com/a/10380887/4285276

<?php
                            foreach ($result as $res) { ?>

                                <tr>
                                    <td>
                                        <?php
                                        if($res['applicant_owner_address']!='N/A') {

                                            ?>
                                            <h1>Owner Address</h1>
                                            <iframe width="1000" height="480" frameborder="0" scrolling="no"
                                                    marginheight="0" marginwidth="0"
                                                    src="https://maps.google.it/maps?q=<?php echo $res['applicant_owner_address']; ?>&output=embed"></iframe>
                                            <?php   

                                        }else {

                                            ?>
                                            <h1>Site Address</h1>
                                            <iframe width="1000" height="480" frameborder="0" scrolling="no"
                                                    marginheight="0" marginwidth="0"
                                                    src="https://maps.google.it/maps?q=<?php echo $res['other_properties1']; ?>&output=embed"></iframe>
                                            <?php
                                        }
                                        ?>

                                    </td>
                                </tr>

                                <?php
                            }
                            ?>

This is my code i use table view with data table once i open this page my application too slow

How many iframes are you displaying?

one iframe only i display but that iframe src value is dynamic $res[‘applicant_owner_address’]!=‘N/A’ means if condition iframe otherwise show else part iframe

But you’ve got your iframe in a foreach loop.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.