Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Google Maps in Wordpress CSS Configuration

Posted on 2013-01-13
8
299 Views
Last Modified: 2013-02-12
I have setup to sites to use a Google Map Wordpress plugin.  It works with this Web Site but not with this test Web Site.

In Firefox, on the non-working site I can see the Map Table it<table id="map_table" width="100%" cellspacing="0px" cellpadding="0px"> is where the map should populate.  What CSS configuration should I look at that is keeping this from loading the map image? Everthing else in the plug-in works fine.
0
Comment
Question by:danfiggolf
  • 4
  • 4
8 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38773017
Go through the plugin files until you see it echoing that table tag.
0
 

Author Comment

by:danfiggolf
ID: 38773070
Here is the code that opens and closes the table:

            // Start the map table
            //
            $content =  
                '<table id="map_table" width="100%" cellspacing="0px" cellpadding="0px">' .
                '<tbody id="map_table_body">' .
                '<tr id="map_table_row">'.
                '<td id="map_table_cell" width="100%" valign="top">'
                ;

            // If starting image is set, create the overlay div.
            //
            $startingImage=get_option('sl_starting_image','');
            if ($startingImage != '') {
                $startingImage =
                    ((preg_match('/^http/',$startingImage) <= 0) ?SLPLUS_PLUGINURL:'').
                    $startingImage
                    ;

                $content .=
                    '<div id="map_box_image" ' .
                        'style="'.
                            "width:". $slplus_plugin->data['sl_map_width'].
                                      $slplus_plugin->data['sl_map_width_units'] .
                                      ';'.
                            "height:".$slplus_plugin->data['sl_map_height'].
                                      $slplus_plugin->data['sl_map_height_units'].
                                      ';'.
                        '"'.
                    '>'.
                    "<img src='$startingImage'>".
                    '</div>' .
                    '<div id="map_box_map">'
                    ;
            }
            
            // The Map Div
            //
            $content .=
                '<div id="map" ' .
                    'style="'.
                        "width:". $slplus_plugin->data['sl_map_width'].
                                  $slplus_plugin->data['sl_map_width_units'] .
                                  ';'.
                        "height:".$slplus_plugin->data['sl_map_height'].
                                  $slplus_plugin->data['sl_map_height_units'].
                                  ';'.
                    '"'.
                '>'.
                '</div>'
                ;

            // Credits Line
            if (!(get_option('sl_remove_credits',0)==1)) {
                $content .=
                    '<div id="slp_tagline" ' .
                        'style="'.
                            "width:". $slplus_plugin->data['sl_map_width'].
                                      $slplus_plugin->data['sl_map_width_units'] .
                                      ';'.
                        '"'.
                    '>'.
                    __('search provided by', 'csl-slplus') .
                    "<a href='". $slplus_plugin->url."' target='_blank'>".
                         $slplus_plugin->name.
                    "</a>".
                    '</div>'
                    ;
            }

            // If starting image is set, close the overlay div.
            //
            if ($startingImage != '') {
                $content .= '</div>';
            }
            
            // Close the table

Open in new window


And then the content is rendered, but I don't understand why it renders for my test3 site and not my test2 site - what is preventing the content from displaying?

            $content .= '</td></tr></tbody></table>';

            // Render
            //
            echo apply_filters('slp_map_html',$content);

Open in new window

0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 38773093
Same physical server just different subdomains?  Because

<tr id="map_table_row"> and
<td id="map_table_cell" width="100%" valign="top">

aren't rendering at all.  I'd almost want to say ISP is stripping out the map as an XSS attack but that would be the case on both sites if they are on the same box.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:danfiggolf
ID: 38773171
Same physical system - just a separate Wordpress install with a generic theme.  Very strange that its stripping out the table for I'm not doing anything to do this
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38773175
Does Google Maps need an API key to function? It's been a long time since I worked with it...
0
 

Author Comment

by:danfiggolf
ID: 38773224
Yes - fortunately the Wordpress plugin guides you through the API process
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 38773244
Are you using the same API key on both subdomains?
0
 

Author Comment

by:danfiggolf
ID: 38773320
The problem was with the map height set at 100%.  After switching it to height = 480px.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question