Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript google map is zoomed out

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #179277
    Legie
    Participant

    Hi,

    Iam searching everything, but i cant figure out one thing.

    I put google map link to website and it works.

    Then i write little script that changes 2 divs as you can see on the code.

    It looks like here: http://mojemisto.wz.cz/gmaps_prob.png

    problem is that when i click on the second link, map is zoomed out like for whole world.

    Where can be problem? Where i should find the problem? Before i use my script and puts div`s behaine it, it works.

    Thanks for reply!

    EDIT: source code where it works as you can see whole map image zommed on the location http://codepen.io/anon/pen/FwKBo

    #179292
    Legie
    Participant

    sorry i just forgot to add it!

    #179303
    Legie
    Participant

    Its same code what is on the website (i just remove text and some css). I think the problem is that i need to reload div again or something. I can paste whole code if it helps.

    http://pastebin.com/gLspgPsk

    #179370
    Legie
    Participant

    I just make simple code, what doesnt work – its same but with no-text and doesnt work for me. Try this one and let me know results please.

    I have no idea why map “MAP2” doesnt show…or show but zommed out.. Maybe i need to put differend script source or something?

    Thank you!

    code: http://pastebin.com/8XQDdnAm
    website: http://mojemisto.wz.cz/ (doesnt work)

    #179396
    Legie
    Participant

    when i put single link on the site ( the iframe) it works. So question is, where can be the problem? When i put link to any site it work…but with this code, it doesnt,

    nevermind, thanks for your help!

    #179405
    nixnerd
    Participant

    Can I just jump in here and suggest mapbox? It’s got a great API. Real easy to work with.

    #179423
    Legie
    Participant

    It looks nice and clear. Going to check it. Thanks for tip.

    #179510
    nixnerd
    Participant

    NP. Those maps are GORGEOUS. Love the way they look. Will FOR SURE use them for many little webapps.

    #179821
    Legie
    Participant

    my boss wants gmaps so i need to figure it out. But anyway, thanks for the info, i will use it in other projects.

    Btw problem with my map was that i just paste link from maps.google (there is function that create <iframe>)

    i fix it a little, i use working link from 1st map, and change some stuff in URL(adress) and rest I left as it is.

    now you can see on http://mojemisto.wz.cz/ that it works, but there is one little think i cant fixed and its that my point is not on the center but on the left top corner. Any ideas?

    Thanks for help and tips!

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.