GetSimple Support Forum

Full Version: GoogleMap, several bugs patched
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was working with Google Map plugin and found several bugs. I worked hard to find it and solve.

The bugs
[*] Working with several maps and anchors causes a mistake on saving that changes or deletes several anchors. (Javascript code bug)
[*] Some html elements are bad formatted
[+] Optimized search of elements in jquery
[+] Checks if Shadow elements are setted to prevent E-notice errors.

I have seen a lot of changes that can be done to improve performance and use. But nowadays i havenĀ“t so much time.
Well, it didn't show a map on my site.
I had to change line 103:
Code:
$(document).ready(function()'
to
Code:
jQuery(function($)'

You also forgot to include the translation for "NOMBRE_MENU".
But now it works for me.
By the way, can you tell me why my zoom controls are broken?
[Image: 19496814nh.jpg]
So long,
moped
Ok, I fixed it myself.
The broken zoom controls came from my bootstrap css file, where <img> is set to max-width:100%.
In googlemap.php you use
Code:
$div ='<div class="gmapsxenon" id="gmap_'.$gmap_config[$i]['id'].'"></div>';
but I couldn't find this class. In bootstrap there is a class .google-maps, which sets the <img> max-width to "none".
So I changed class="gmapsxenon" to class="google-maps" and it's ok.
If you don't have a css where it is defined, and don't want to change the plugin file, you can use this in your main css file:
Code:
/*--------- Google Maps ----------*/
div[id^="gmap_"] img {
    max-width: none;
}
Or, if you want to do the changes I did, you copy this to your css file:
Code:
.google-maps img {
  max-width: none;
}
Maybe it's useful for anybody.

So long,
moped
I would think google embed has its own css resets, perhaps they are missing.
Thank you very, very much!