We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12013
    • 61 Posts
    forgot to give the snippet call

    [!GoogleMap? &key=`ABQIAAAAh.......` &maps=`mapid : map | address1 : [*address1*] | address2 : [*address2*] | city : [*city*] | state : [*state*] | zip : [*zip*] | title : [*title*] | zoom : 12 | width : 260 | height : 150 | control : small | typecontrol : 0 `!]
      • 12013
      • 61 Posts
      any ideas?
        • 29774
        • 386 Posts
        Seems to be working for me? If you’re seeing odd characters then maybe some gremlins have crept in when you copied/pasted the snippet code. If you have BBEdit, try running ’zap gremlins’ on the snippet code and see if it finds any.
          Snippets: GoogleMap | FileDetails | Related Plugin: SSL
          • 332
          • 23 Posts
          Hi, I am running into some issues with GoogleMap inside of a thickbox, using the inline content method. I have tracked down a potential solution/reason here: http://dropstones.blogspot.com/2008/04/google-maps-into-thickbox.html, but I do not know how to edit the snippet to accomodate. Can anyone help me out with a little info?

          Thanks
          Anthony
            • 29774
            • 386 Posts
            Google’s map code needs the element to which it attaches the map to be rendered in the DOM as a block level element. So hiding the map inside a hidden div (display: none) can cause problems. The solution I have found that works most reliably for modal windows is to load the map within an iframe. So the map is simply a separate page that is loaded within an iframe within the modal window. I believe thickbox supports this.

            There is another way round this, and that is to call initGmap(mapdata) after the point at which the modal window has been opened. But that requires some jquery foo to get right.
              Snippets: GoogleMap | FileDetails | Related Plugin: SSL
              • 20349 ☆ A M B ☆
              • 453 Posts
              Sorry that I start this topic again, but I’m going nuts in here...

              I want to use GoogleMap on my new project and it won’t display me the map at all...
              It just displays
              <div id="map" style="width: 340px; height: 250px"></div>
              

              in the code, but with no map...

              I striped all the code besides head and body tags to ecxlude all template errors, but still no progress...

              Example:
              http://www.croevent.net/lokacije/klubovi/aquarius-a1-a2
              


              P.S. I found the snippet code for version 1.2 (it has different values in the snippet), but that is working fine (except lousy lat & lng positioning...)

              Can anyone explain why is this happening?
                BASE - Web Design Studio
                MODX Ambassador

                Website
                • 25803 ☆ A M B ☆
                • 721 Posts
                I’ve been using this Plugin for quite some time but have run into a problem using it in a different way, specifically with Ditto.

                I use template variables for each field so that the client can enter their details and the maps show up accordingly (site is still in development so excuse things that aren’t working:

                Roncesvalles Location
                http://dev.turnerporter.net/index.php?id=11

                Yorke Location
                http://dev.turnerporter.net/index.php?id=12

                So that’s fine. But if you visit the locations page, it is an index of each location (the reason they can click through to an individual location is to view a future gallery which isn’t there yet):

                http://dev.turnerporter.net/index.php?id=10

                Each map does have a distinct id (I can see it in the code and in the div id= for the Google Map portion but still the moment I unpublish Yorke, the Roncesvalles location shows up but the moment there is more than one location it only renders the last one.

                Here is the Ditto call:

                [!Ditto?&parents=`10`&summarize=`10`&total=`all`&depth=`0`&tpl=`locations-tpl`&paginate=`0`&hideFolders=`1`&hiddenFields=`gmid,gmaddress1,gmcity,gmprov,gmcountry,gmpc,gmtitle,gmwidth,gmheight,gmzoom,gmcontrol,gmtypecontrol,gmtype,gmshowbubble,googlebubble,content,phone,fax,locationemail`&orderBy=`longtitle ASC`!]


                And the template (locations-tpl):

                <div class="two-cols clearfix">
                <div class="tc-left">
                <h2 class="ahead">[+title+]</h2>
                <p>[+content+]</p>
                <p>[+gmaddress1+]<br />
                [+gmcity+], [+gmprov+] [+gmpc+]<br />
                Telephone [+phone+]<br />
                Fax [+fax+]<br />
                [+locationemail+]</p>
                <p><a href="[~[+id+]~]">view gallery</a></p>
                </div>
                <div class="tc-right">
                [[GoogleMap? &key=`[+gmkey+]` &maps=`mapid : [+gmid+] | address1 : [+gmaddress1+] | city : [+gmcity+] | state : [+gmprov+], [+gmcountry+] | zip : [+gmpc+] | title : [+gmtitle+] | width : [+gmwidth+] | height : [+gmheight+] | zoom : [+gmzoom+] | control : [+gmcontrol+] | typecontrol : [+gmtypecontrol+] | type : [+gmtype+] | showbubble: [+gmshowbubble+] | bubbletpl: googlebubble`]]
                <p align="right"><a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=[+gmaddress1+], [+gmcity+], [+gmprov+], [+gmpc+], [+gmcountry+]">[map]</a> <a href="http://maps.google.com/maps?daddr=[+gmaddress1+], [+gmcity+], [+gmprov+], [+gmpc+], [+gmcountry+]">[directions]</a></p>
                </div>
                </div>


                Now you’ll note that the gmkey is missing from the list of hidden fields in the Ditto call. This is because when I had it in there I got thrown the "you’ll need a key" error so I just assigned the locations index page the key itself.

                Any ideas as to why I can only see one map?
                  • 4310
                  • 2,310 Posts
                  To have multiple maps I think you only call the snippet once, with multiple map parameters e.g.
                  [!GoogleMap? &key=`ABQIAAAAYcoc9A-duXiuiTXWZoAygxRyMMs4AZ8agmjRigGuel04tIiP_xSmk_SsFN6PufzgSfRrdqZ1vTltkg` &maps=`mapid : map1 | address1 : 10 Claremont Terrace | city : Glasgow | zip : G3 7XR  | title : The Movement Studio | width : 600 | height : 480 | control : large | typecontrol : 1 | zoom : 16 | lng : -4.277635 | lat : 55.867673 || mapid : map2 | address1 : Tramway, 25 Albert Drive | city : Glasgow | zip : G41 2PE  | title : The Movement Studio  width : 600 | height : 480 | control : large | 
                  typecontrol : 1 | zoom : 16 | lng : -4.26685 | lat : 55.841051`!]

                  Not sure how easy that will be with Ditto.
                    • 25803 ☆ A M B ☆
                    • 721 Posts
                    Quote from: bunk58 at Jun 25, 2010, 03:08 AM

                    To have multiple maps I think you only call the snippet once, with multiple map parameters e.g.
                    [!GoogleMap? &key=`ABQIAAAAYcoc9A-duXiuiTXWZoAygxRyMMs4AZ8agmjRigGuel04tIiP_xSmk_SsFN6PufzgSfRrdqZ1vTltkg` &maps=`mapid : map1 | address1 : 10 Claremont Terrace | city : Glasgow | zip : G3 7XR  | title : The Movement Studio | width : 600 | height : 480 | control : large | typecontrol : 1 | zoom : 16 | lng : -4.277635 | lat : 55.867673 || mapid : map2 | address1 : Tramway, 25 Albert Drive | city : Glasgow | zip : G41 2PE  | title : The Movement Studio  width : 600 | height : 480 | control : large | 
                    typecontrol : 1 | zoom : 16 | lng : -4.26685 | lat : 55.841051`!]

                    Not sure how easy that will be with Ditto.

                    Yes, I had come to the same conclusion. I like to make things as automatic as possible for clients so that when they add a new location, which they can do now themselves with a combination of TVs and ManagerManager it would be added to the locations index page but in this case I’ll just manually build the index page. In this case not to much of a big deal since it’s not like they’re adding locations with any frequency.
                      • 8463
                      • 11 Posts
                      Hey everyone, I’m having trouble trying to show my Northern Ireland postcode, with this error:

                      Error: one or more of the following parameters are missing: address1, city or zip

                      My snippet is

                      [!GoogleMap? &key=`ABQIAA...` &maps=`mapid : map | address1 : 67 Valley Business Centre |  address2 : Newtownabbey | city : Belfast | zip : BT36 7LS | title : PM-Lighting | width : 400 | height : 300 | zoom : 14 | type : normal`!]


                      Cheers in advance!