WordPress.org

Ready to get started?Download WordPress

Forums

XML Google Maps
[resolved] Responsive google maps (4 posts)

  1. mugen2009
    Member
    Posted 1 year ago #

    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/

    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/

  2. mugen2009
    Member
    Posted 1 year ago #

    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.

  3. mugen2009
    Member
    Posted 1 year ago #

    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

  4. mugen2009
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic