Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bandico0t 11 posts 48 karma points
    Apr 04, 2014 @ 15:00
    Bandico0t
    5

    Render only part of map

    Hello. Nice extension.

    When I open document first time it render not full, just a part.

    But then I resized my browser window and it take right size

    enter image description here enter image description here

    Regards, Anton

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 04, 2014 @ 16:29
    Jan Skovgaard
    0

    Hi guys

    I've actually seen this issue too so +1 from here. If I find some spare time in near future I might have a look at the source.

    /Jan

  • John Churchley 272 posts 1258 karma points c-trib
    May 13, 2014 @ 22:56
    John Churchley
    0

    Any news on a solution?

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    May 21, 2014 @ 11:03
    Jesper Ordrup
    0

    Same problem here.

    Workaround - if you resize browserwindow it fixes the problem (until next load).

    I've tested a different package that loads a google map and it does exactly same. 

    best

    Jesper

     

  • Jesper Ordrup 1019 posts 1528 karma points MVP
    May 21, 2014 @ 11:54
    Jesper Ordrup
    1

    http://stackoverflow.com/questions/15051796/google-map-only-show-half-screen

     

    Post suggests executing following statement after map is displayed. Do Property editors have a post render event?

      google.maps.event.trigger(map,"resize"); 

    best
    Jesper

     

     

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 21, 2014 @ 12:37
    Dirk De Grave
    0

    Jesper,

    Don't think you need a post render event, just add this line of code in the GMaps.controller.js file! Although I think I orginally removed this line of code as it wasn't working as exptected... which it currently isn't either :(

    Let me know if that fixes it for you.

     

    --Dirk

  • Daniel 44 posts 187 karma points
    May 26, 2014 @ 14:18
    Daniel
    0

    I have this problem too. I can't seem to find the file GMaps.controller.js either. Where is it located?

    Thanks,
    Daniel 

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    May 26, 2014 @ 14:20
    Dirk De Grave
    1

    ~/App_Plugins/GMaps folder

    --Dirk

  • Daniel 44 posts 187 karma points
    May 26, 2014 @ 14:52
    Daniel
    0

    I added the code line Jesper (and several on StackOverflow) recommended on places in the code I found logical: initializeMap() and resetMap() but with no success.
    google.maps.event.trigger(map,"resize"); 

    I'm pretty sure the issue has to do with multiple maps (as I've had this problem before). It seems as if the map script gets confused when switching between nodes with maps on them. I would have thought the entire page gets reloaded when I switch node in Umbraco but that doesn't seem to be the case, hence the google maps script misinterpret the size of the container of the map.

    Unfortunately I know too little about the rendering order of the scripts to find a solution to this. But some ideas is:
    - Try a different naming logic where the map container always have a unique name, like "map-<node id>"
    - Change the rendering flow so the map initialization is triggered after the new map area is loaded.

    Best,
    Daniel 

  • Desley 44 posts 169 karma points
    Jun 13, 2014 @ 12:04
    Desley
    0

    What Daniel says appears to be true. As soon as I add the map to a document type where I have multiple of, it renders only a small corner.

    Hope you can find a solution.

  • Christopher 28 posts 173 karma points
    Jun 24, 2014 @ 10:09
    Christopher
    0

    This is how I've managed to overcome it, adding a slight delay to the loading of the script:

    http://our.umbraco.org/projects/backoffice-extensions/google-maps-property-editor-w-google-places-autocomplete-lookup/bugs,-feedback-and-suggestions/53913-Fix-for-the-resize-bug

    350ms was the lowest I could go before it failed to render.

Please Sign in or register to post replies

Write your reply to:

Draft