We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30912
    • 463 Posts
    Has anyone encountered GoogleMap locating only in America?

    ive entered the following snippet call into http://aspiredevelopmentserver.co.uk/simpson/index.php?id=19

    [!GoogleMap? &key=`xxxxxxx` $phmode=`1` &maps=`mapid : gmap | address1 : Unit 4 | address2 : 1 Parkway Avenue | city : Sheffield | zip : S9 4WA | title : Simpson Limited | width : 400 | height : 400 | zoom : 15 |’!]

    can anyone see what ive done wrong? - same call works on another site....

    thanks
      • 29774
      • 386 Posts
      You’ve used a single quote instead of a closing back tick, and you don’t need that last pipe.

      Call should be:
      [!GoogleMap? &key=`xxxxxxx` $phmode=`1` &maps=`mapid : gmap | address1 : Unit 4 | address2 : 1 Parkway Avenue | city : Sheffield | zip : S9 4WA | title : Simpson Limited | width : 400 | height : 400 | zoom : 15`!]
      


        Snippets: GoogleMap | FileDetails | Related Plugin: SSL
        • 12584
        • 208 Posts
        I have this snippet working perfect, however I have another domain parked on top of this site and my google map key wont let me view the other domain without creating a new key, the only way I can see around this is to provide an if statment which gets the domain name the user has entered the site from then output the snippet call I need with the correct key .
        I cant see on google how to get a key that works across more than 1 domain.
        Does anyone have any ideas

        Cheers

        Ian
          • 30912
          • 463 Posts
          Quote from: therebechips at Sep 26, 2008, 04:32 AM

          You’ve used a single quote instead of a closing back tick, and you don’t need that last pipe.

          Call should be:
          [!GoogleMap? &key=`xxxxxxx` $phmode=`1` &maps=`mapid : gmap | address1 : Unit 4 | address2 : 1 Parkway Avenue | city : Sheffield | zip : S9 4WA | title : Simpson Limited | width : 400 | height : 400 | zoom : 15`!]
          




          thanks missed that hehe
            • 29774
            • 386 Posts
            @ian_m

            AFAIK Google limit the key to one domain. You could of course generate keys for each domain and write a little snippet to pass the right key for the current domain to the GoogleMap snippet key parameter, or you could ensure that links to the page hosting the map always point to the same domain (I quite often use jquery + shadowbox modal window with the map in an iframe for example - eg see http://www.interiors.davroc.co.uk/pomdor/). Or you could add some htaccess rules to redirect requests for googlemap pages to the primary domain.
              Snippets: GoogleMap | FileDetails | Related Plugin: SSL
              • 9869
              • 41 Posts
              Cool Snippet. I also need this for the latest version:

              - don’t center the pin, maybe "pin_x" and "pin_y" would be cool to positioning with a value depending to center
              - abiability to have a custom pin, maybe "pin_img" with a image path

              rolleyes
                --
                Design Agency - http://fruehjahr.ch
                • 20349 ☆ A M B ☆
                • 453 Posts
                Aaaaaaaaaaaaaa can you please help me?
                I can’t get this to work for me sad((

                What am I doing wrong???
                - I have the google api key
                - I uplaoded GoogleMap.inc.php into the assets/snippets/GoogleMap folder
                - I created a snippet called GoogleMap and here is my call where I want the map to show up
                [!GoogleMap? &key=`ABQIAAAAsdA.............` &maps=`mapid : map | address1 : Unit 3 Cygnet Park | address2 : Phorpress Way | city : Peterborough | state : Cambs | zip : PE7 8FQ | title : Tile Library | width : 400  | height : 400 | zoom : 9 || mapid : map2 | address1 : 5 Trafalgar Court | city : Brighton | state : East Sussex | zip : BN1 4FB | title : Hallmarkdesign | width : 600 | height : 300 | control : large | typecontrol : 1 | zoom : 12 | type : hybrid `!]
                  BASE - Web Design Studio
                  MODX Ambassador

                  Website
                  • 29774
                  • 386 Posts
                  Do you see any php error messages or javascript alerts? What happens when you try to view the page? Are you sure you’ve included the file correctly (check capitalisation in particular) and are using the latest version 1.3.2? Have you tried a different browser?


                    Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                    • 20349 ☆ A M B ☆
                    • 453 Posts
                    I tested it with Firefox 3.0.5., Google Chrome and IE7.
                    The page is just blank, but when I view the source code I can see the google javascript in the <head> tags and in the <body>
                    <div id="map" style="width: 400px; height: 400px">
                    so I suppose this is the place where the map should be.

                    Tested it with Google Map 1.3.2 and MODx version: 0.9.6.2
                      BASE - Web Design Studio
                      MODX Ambassador

                      Website
                      • 29774
                      • 386 Posts
                      Can you copy the entire page source into an text file and upload it somewhere?
                        Snippets: GoogleMap | FileDetails | Related Plugin: SSL