Options

Problem with Google Maps in Smugmug

Lawrence.youngLawrence.young Registered Users Posts: 20 Big grins
edited August 22, 2008 in SmugMug Support
Hello - My name is Lawrence and I have been with Smugmug for a short time. I have recently added a map via Google API to my page. I created a separate Gallery for the Map. I am now experiencing a minor issue with the map I'm hoping you can help me with. My map is showing up as a half display. This seems to be a common issue in a couple of threads however none of them have been able to solve my particular issue. I have tried moving the javascript from the footer to the header as in a few other threads but this has no effect to fix the problem. It just simply takes away my additional galleries. I would be more than happy to entertain any suggestions on the topic. Thank you so much for any help.

Lawrence

www.theyoungspace.smugmug.com

Comments

  • Options
    Adriano61Adriano61 Registered Users Posts: 7 Beginner grinner
    edited July 13, 2008
    Unfortunately I have the same problem and I didn't get much help (none actually...ne_nau.gif); the only way to have it working (for me) is to display the map also in the main page, not including in the CSS code: .homepage #mapBox {display: none;} ; but this is not what i want headscratch.gif.

    I start to think this is a real bug not fixable :cry.

    http://www.dgrin.com/showthread.php?t=98881

    Cheers,
    Adriano
  • Options
    rainforest1155rainforest1155 Registered Users Posts: 4,566 Major grins
    edited July 13, 2008
    I'm checking with Rich on this. Maybe he has a clue as it seems to work on his page:
    http://photos.lmsportspix.com/map/
    Sebastian
    SmugMug Support Hero
  • Options
    Lawrence.youngLawrence.young Registered Users Posts: 20 Big grins
    edited July 13, 2008
    re:
    I'm checking with Rich on this. Maybe he has a clue as it seems to work on his page:
    http://photos.lmsportspix.com/map/

    Let me know if you come up with anything. I really like this feature but can't find anyone who can get it to work just right. Thanks for any help.
  • Options
    richWrichW Registered Users Posts: 941 Major grins
    edited July 15, 2008
    The odd map display has to do with the 'galleries page' hack from this tutorial: http://dgrin.smugmug.com/gallery/2160039

    Place the following in the header javascript section:

    function hasPath(sPath)
    {
    re = new RegExp("\/" + sPath + "(\/|$)");
    return re.test(window.location)
    }

    The rest of the code will need to go into the header section, something like this:
    <*script type="text/javascript"*>

    if (hasPath("galleries"))
    YD.addClass(document.body, "galleries");

    if (hasPath("map"))
    YD.addClass(document.body, "map");

    <*/script*>

    Your code may be different than what I have here, but you get the idea :)

    Remove the *'s prior to pasting
  • Options
    Lawrence.youngLawrence.young Registered Users Posts: 20 Big grins
    edited July 15, 2008
    Hello, Thank you for your response. Unfortunately I have tried that before and it only seems to work when I have the code:


    function hasPath(sPath)
    {
    re = new RegExp("\/" + sPath + "(\/|$)");
    return re.test(window.location)
    }

    if (hasPath("mapGallery"))
    YD.addClass(document.body, "mapGallery");

    if (hasPath("galleries"))
    YD.addClass(document.body, "galleries");

    Pasted into my Javascript Footer Section in this exact order. If I reverse the order of the two I seem to run into issues. When ever I try to place the hack into my Javascript Header Section I loose my Galleries & the Map Page. Any other ideas or am I just applying it wrong? Please let me know what you think.
  • Options
    Lawrence.youngLawrence.young Registered Users Posts: 20 Big grins
    edited July 15, 2008
    Another Map issue
    I'm not sure if this will help figure out where the problem is. I'm not sure it's actually with my coding or not. Now that I'm looking at it I went ahead and hid the map so it wouldn't be seen in half form anymore. I have noticed that even when the map hidden in my control panel it still appears in the same half view. I wouldn't think the coding would be affecting it in this location. I could be wrong.

    Let me know if you come up with anything. Thanks
  • Options
    Lawrence.youngLawrence.young Registered Users Posts: 20 Big grins
    edited July 15, 2008
    Hey Rich,

    Sorry for chatting your ear off. I got it figured out and everything is working perfectly. Thank you for all your help.
  • Options
    richWrichW Registered Users Posts: 941 Major grins
    edited July 15, 2008
    Hey Rich,

    Sorry for chatting your ear off. I got it figured out and everything is working perfectly. Thank you for all your help.
    You're Welcome....thumb.gif Need anything, yell........
  • Options
    Adriano61Adriano61 Registered Users Posts: 7 Beginner grinner
    edited July 17, 2008
    richW wrote:
    You're Welcome....thumb.gif Need anything, yell........
    It's working clap.gif.

    Thank you!

    Adriano
  • Options
    nycfirefighternycfirefighter Registered Users Posts: 20 Big grins
    edited July 22, 2008
    richW wrote:
    You're Welcome....thumb.gif Need anything, yell........

    Rich, thanks this works great with one exception: when I click on a pic on the map, it brings me to the pic on "digitalphotographybyfrank.smugmug.com" rather than the pic on www.digitalphotographybyfrank.com -- any way to keep the custom URL live from map page to map to clicked photo?

    Thanks again.
  • Options
    nycfirefighternycfirefighter Registered Users Posts: 20 Big grins
    edited July 23, 2008
    Bump
    Rich, thanks this works great with one exception: when I click on a pic on the map, it brings me to the pic on "digitalphotographybyfrank.smugmug.com" rather than the pic on www.digitalphotographybyfrank.com -- any way to keep the custom URL live from map page to map to clicked photo?

    Thanks again.
  • Options
    richWrichW Registered Users Posts: 941 Major grins
    edited July 24, 2008
    Rich, thanks this works great with one exception: when I click on a pic on the map, it brings me to the pic on "digitalphotographybyfrank.smugmug.com" rather than the pic on www.digitalphotographybyfrank.com -- any way to keep the custom URL live from map page to map to clicked photo?

    Thanks again.
    I'm not sure, I'll check with our API Master to see what the answer is :)
  • Options
    razorfrograzorfrog Registered Users Posts: 4 Beginner grinner
    edited August 16, 2008
    I'm having this issue on my page:
    http://maxelman.smugmug.com/map

    But moving around the JavaScript hasn't changed anything.. Any ideas?
    Thanks!
  • Options
    hyachtshyachts Registered Users Posts: 140 Major grins
    edited August 17, 2008
    I'm having the same problem as razorfrog, and moving the JS didn't help. I tried adding it between script tags in the header (without removing it from the footer JS) and got the same result. I then removed it from the footer JS and my galleries page disappeared. Finally I tried putting it in the header JS and, again, my galleries page failed to load. So apparently the only way I get a galleries page is if I have all of the Java code from the second homepage hack in my Footer Javascript.

    To add to the weirdness, I tried to use the web dev toolbar to troubleshoot a little (for example by NOT hiding it on my first homepage) but when I show the web developer toolbar the map fixes itself! Without reloading the page or anything, something about simply showing the web dev toolbar (i.e. View>Toolbars>Web Developer) corrects the issue in FF3 (I don't have it shown by default).

    By the way, razorfrog, your "Around The World" map looks fine to me, except that it is the whole world when your pictures appear to be only in the NW hemisphere. I'm not clear on whether that's supposed to be the behavior or not. If I don't hide the map on my homepage it displays (on my homepage and on my galleries page) only the area encompassing my geotagged photos...

    Also, I should be clear about what I mean by the map fixing itself above - the map displays completely in the box. It doesn't recenter on my pictures or anything like that.
  • Options
    hyachtshyachts Registered Users Posts: 140 Major grins
    edited August 19, 2008
    *tap tap tap*

    Is this thing on?
  • Options
    AndyAndy Registered Users Posts: 50,016 Major grins
    edited August 19, 2008
    hyachts wrote:
    *tap tap tap*

    Is this thing on?
    Stay tuned today, I'll ask Rich to have a look thumb.gif
  • Options
    hyachtshyachts Registered Users Posts: 140 Major grins
    edited August 19, 2008
    Thanks Andy, I'll be sure to keep checking back. clap.gif
  • Options
    hyachtshyachts Registered Users Posts: 140 Major grins
    edited August 20, 2008
    *coughs, shuffles feet, hums a little ditty*
  • Options
    hyachtshyachts Registered Users Posts: 140 Major grins
    edited August 21, 2008
    No? Nobody interested in taking a look at this? I'd hate to have to turn it off, because it's such a cool function, but... it looks like hell right now.
  • Options
    richWrichW Registered Users Posts: 941 Major grins
    edited August 21, 2008
    razorfrog wrote:
    I'm having this issue on my page:
    http://maxelman.smugmug.com/map

    But moving around the JavaScript hasn't changed anything.. Any ideas?
    Thanks!
    Did you try this suggestion? It should work: http://www.dgrin.com/showpost.php?p=873545&postcount=5
    hyachts wrote:
    No? Nobody interested in taking a look at this? I'd hate to have to turn it off, because it's such a cool function, but... it looks like hell right now.
    Will need a link to your site to look :)
  • Options
    richWrichW Registered Users Posts: 941 Major grins
    edited August 22, 2008
    Rich, thanks this works great with one exception: when I click on a pic on the map, it brings me to the pic on "digitalphotographybyfrank.smugmug.com" rather than the pic on www.digitalphotographybyfrank.com -- any way to keep the custom URL live from map page to map to clicked photo?

    Thanks again.
    Devbobo is working on the custom domain name issue as we speak :)
  • Options
    razorfrograzorfrog Registered Users Posts: 4 Beginner grinner
    edited August 22, 2008
    That fixed it! Thank you!
    maxelman.smugmug.com/map now works!
  • Options
    razorfrograzorfrog Registered Users Posts: 4 Beginner grinner
    edited August 22, 2008
    However, when I click on an image, it doesn't go to my site, it goes to the general smugmug map. Is there a way to make it go to my site and picture?
    maxelman.smugmug.com/map

    Thanks-
  • Options
    hyachtshyachts Registered Users Posts: 140 Major grins
    edited August 22, 2008
    richW wrote:


    Will need a link to your site to look :)

    Oops. I put it in the first post I made about his issue but forgot that was in another thread...

    http:\\monkeytales.smugmug.com

    I don't have time to look at or try the link you suggest above, but I'll check it out later today. Thanks for looking into this!

    EDIT: I was about to say that I tried that and it didn't work, blah blah blah, when I read your instructions a little more carefully and put the first section of code in my header Javascript. That fixed it... And here I was tapping my foot impatiently when the answer was already given. What a schmo! Sorry, and thanks, Rich!
  • Options
    richWrichW Registered Users Posts: 941 Major grins
    edited August 22, 2008
    hyachts wrote:
    Oops. I put it in the first post I made about his issue but forgot that was in another thread...

    http:\\monkeytales.smugmug.com

    I don't have time to look at or try the link you suggest above, but I'll check it out later today. Thanks for looking into this!

    EDIT: I was about to say that I tried that and it didn't work, blah blah blah, when I read your instructions a little more carefully and put the first section of code in my header Javascript. That fixed it... And here I was tapping my foot impatiently when the answer was already given. What a schmo! Sorry, and thanks, Rich!
    It looks much better :)
    You're Welcome....thumb.gif
  • Options
    hyachtshyachts Registered Users Posts: 140 Major grins
    edited August 22, 2008
    So to follow up - my map is still displaying locations for a number of pictures that are no longer in listed galleries. Is this cached information, or is it that, once they're on the map they stay there as long as they exist (regardless of gallery settings)? When you click on the map you find the one photo I have left that's tagged and in a listed gallery, but the little green smug markers show for all of them on the Around the World map.

    Just a curiosity at this point really...

    EDIT: I deleted all the other photos (in unlisted galleries) and they're still showing on the map - so maybe it's cached somewhere?
    EDIT2: Now it's only displaying the one - so making them unlisted didn't hide them but deleting them got rid of the data after some relatively short refresh time (maybe 20 min?)
Sign In or Register to comment.