Title: Responsive google maps
Last modified: August 20, 2016

---

# Responsive google maps

 *  Resolved [mugen2009](https://wordpress.org/support/users/mugen2009/)
 * (@mugen2009)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/responsive-google-maps/)
 * Thanks for your great plugin
 * I am trying to reuse this great jQuery code to make “XML Goole MAPS”‘s compatible
   with responsive design:
    [http://www.waywayway.nl/bin/handig-en-leuk/tutorials/responsive-google-maps-embeds/](http://www.waywayway.nl/bin/handig-en-leuk/tutorials/responsive-google-maps-embeds/)
 * I am trying to get the jquery to work on the .xmlgmdiv <div> which wraps google
   map’s iframe
 *     ```
       <script>
   
       		$(document).ready(function(){
       			// Target your .container, .wrapper, .post, etc.
       			$(".xmlgmdiv").fitMaps( {w: '100%', h:'250px'} );
       		});
   
           </script>
       ```
   
 * but it doesn’t work.
 * Any idea ?
    That would be great if you could integrate this jQuery in the next
   version by the way…
 * [http://wordpress.org/extend/plugins/xml-google-maps/](http://wordpress.org/extend/plugins/xml-google-maps/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [mugen2009](https://wordpress.org/support/users/mugen2009/)
 * (@mugen2009)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/responsive-google-maps/#post-3246739)
 * I got it. It works
    The jquery.fitmaps.js code filters the iframe source url 
   to urls containing ‘maps.google’ On line 65 see `"iframe[src*='maps.google']"`
   I changed this to `"iframe[src*='xml-google-maps']"` and it now works like a 
   charm.
 * I think this is a must to include in the next version of your plugin.
    The ability
   to choose markers icons depending on the symbol of the GPX waypoint would be 
   a great thing too but that’s another story.
 *  Thread Starter [mugen2009](https://wordpress.org/support/users/mugen2009/)
 * (@mugen2009)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/responsive-google-maps/#post-3246740)
 * Oh, I forgot…
    I also to remove the below piece of code `width: '.$params->width.'
   px; height: '.$params->height.'px;"` everywhere in the xmlgooglemaps.php file
   in the plugin
 *  Thread Starter [mugen2009](https://wordpress.org/support/users/mugen2009/)
 * (@mugen2009)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/responsive-google-maps/#post-3246741)
 * It appears I erased a double quote too much in the smlgooglemaps.php file.
    The
   code that must be stripped is `width: '.$params->width.'px; height: '.$params-
   >height.'px;`
 * (without the double quote at the end compare to what I was saying previously

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Responsive google maps’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/xml-google-maps.svg)
 * [XML Google Maps](https://wordpress.org/plugins/xml-google-maps/)
 * [Support Threads](https://wordpress.org/support/plugin/xml-google-maps/)
 * [Active Topics](https://wordpress.org/support/plugin/xml-google-maps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/xml-google-maps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/xml-google-maps/reviews/)

 * 3 replies
 * 1 participant
 * Last reply from: [mugen2009](https://wordpress.org/support/users/mugen2009/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/responsive-google-maps/#post-3246741)
 * Status: resolved