The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
GoogleMaps Profile Tab Strange Problem
Hi all,
i add a profile tab with User Location on GoogleMaps. I have a very strange problem, After Profile page koaded , if you go to the User Location GoogleMap the map are not Ok. (See First Image). If you press Zoom In/Zoom Out from Browser View Menu the Map Fixed automaticaly! (See Second Image). Another Info may help you understand what happen... If you switch to User Location GoogleMap Tab when Profile Page Loading(Before finished) then load the map ok. I need your Help !!! First Image: Second Image: |
#2
|
|||
|
|||
I don't know anything about google maps, but my guess would be that it's just because it's not visible when the page loads (but maybe that's the obvious part).
Is this a mod or did you code this yourself? I'm thinking if you can somehow change the tab switch js function for that tab you could add some call to refresh it (or maybe not load it at all until the user actually goes to that tab). |
#3
|
||||
|
||||
Quote:
Code by me. Good idea but i don't know how to do that, can u help on that ? |
#4
|
|||
|
|||
Well, maybe you could use a plugin on member_complete hook and do a str_replace of the javascript call. There may be a better way to handle it but I don't remember offhand how tabs are added to the profile.
I guess I should have let someone else help you... ETA: On my test site there's one custom tab (added by a modification), and it's got it's own template. In that case it would be easy because the javascript "toggle_collapse" call is in the template code. If you know what GMap method would refresh the map, you could try putting it in there after the toggle_collapse(); |
#5
|
||||
|
||||
Quote:
Code:
onclick="return toggle_collapse('vbgooglemaps_ul')" but how? |
#6
|
|||
|
|||
I haven't tried it, but maybe something like this:
Code:
onclick="var ret = toggle_collapse('vbgooglemaps_ul'); Load_Map(); return ret;" |
#7
|
||||
|
||||
Here the code i use:
Quote:
i check the source with mozilla and the replace work !!! any idea? |
#8
|
|||
|
|||
No, it looks OK to me. Could you post that section from the mozilla source?
ETA: except that, shouldn't it be Load_Map()? I'm not a js expert, I can't remember if you need the "()" for a function call. And in any case it seems like the alert should show up (unless it all gets ignored if there's an error an it somewhere). ETA more: I tried it and you do need it to be "Load_Map();" for the function to be called, but using just "Load_Map;" doesn't cause any error. |
#9
|
||||
|
||||
i add the ()
here the code i view with Mozilla sources: Quote:
|
#10
|
|||
|
|||
I created this html file for a test:
HTML Code:
<html> <head><title></title> <script type="text/javascript"> function Load_Map() { alert('Load_Map'); } function toggle_collapse(name) { alert('toggle_collapse'); return false; } </script> </head> <body> <div id="vbgooglemaps_ul" class="tborder content_block"> <h4 class="thead block_title"> <a href="http://www.sorento-ultimateclub.com/...rator.html#top" onclick="var ret = toggle_collapse('vbgooglemaps_ul'); alert('Geo'); Load_Map(); return ret;">Test</a> <a name="vbgooglemaps_ul"></a> <span class="block_name">Location On GoogleMaps</span> </h4> </div> </body> </html> And it works, I get three alerts: toggle_collapse, Geo, Load_Map. But I'm not including the CSS classes or the real toggle_collapse function, so maybe that's the difference. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|