We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    This is an auto-generated support/comment thread for GoogleMapMarker.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    Snippet to render GoogleMap with markers from MODx documents!


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 25663 MODX Staff
      • 12,272 Posts
      wow... very cool doze! nice job.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 33337
        • 3,975 Posts
        AWESOME!!! man! shocked

        Thanks for sharing.

        regards,

        zi
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • 7923
          • 4,213 Posts
          Btw, I haven’t tested it very much, just built it yesterday/today.. but it’s working ok at my test site. Would be nice if ditto allowed to specify template variables what it would then output to placeholders with the template variable name.. Then it would be easy to expand this snippet with some very cool features. Think of custom icons to markers from image TV, etc.

          Another thing I’d like to see in Ditto is that I could specify a template straight in the snippet call or path to the filesystem.. then there would be no need to have that "additional" dittoChunk what I have in this.. I’ll post request to Ditto’s thread.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 7923
            • 4,213 Posts
            Anyone using this snippet should download the 1.0b version from the repository. I added some code what makes body onunload event listener what calls to GUnload() function. This function should reduce the memory taken by the script when leaving the page.

            I tested it a bit, and it does reduce the memory usage on IE, but not on Firefox. The GoogleMap script is pretty resource hungry, especially when viewing with FF. But I can’t help with that.


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."
              • 7923
              • 4,213 Posts
              I fixed some typos in documentation example call (parameter names were in lover case) and fixed ditto call to use the chunkname from the parameter (chunk name was hardcoded to "mapcode").

              So now this should actually work just fine.. sorry for the typos and for the problems this may have caused.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 20207
                • 22 Posts
                I installed the snipped but i can’t get it to work. What i did:
                - Made a snippet GoogleMapMarker an paste the complete code in it
                - Made a chunk GoogleMapCode and paste "var ="ect. in it
                - Made a marker in a folder with the ID 903
                - Made a testpage width: [[GoogleMapMarker? &apiKey=`ABQIAAAAZwK...ect` &startID=`903`]]

                The only thing i get is Loading map...
                huh

                Page can be found at: http://www.forensischepsychiatrie.nl/modx.php?id=904
                  • 6726
                  • 7,075 Posts
                  Really awesome Doze, I’ll try to give it a test run as soon as possible !
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l'outil id
                    • 22815
                    • 1,097 Posts
                    MooseBreath - I get a map but no marker.

                    Incidentally, while I like this snippet and the other Google Map one, I think it’s best to paste the apiKey into the snippet as the default. The key is per domain, after all.
                      No, I don't know what OpenGeek's saying half the time either.
                      MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                      Forum: Where to post threads about add-ons | Forum Rules
                      Like MODx? donate (and/or share your resources)
                      Like me? See my Amazon wishlist
                      MODx "Most Promising CMS" - so appropriate!
                      • 7923
                      • 4,213 Posts
                      Quote from: MooseBreath at Aug 16, 2006, 06:58 AM

                      I installed the snipped but i can’t get it to work. What i did:
                      - Made a snippet GoogleMapMarker an paste the complete code in it
                      - Made a chunk GoogleMapCode and paste "var ="ect. in it
                      - Made a marker in a folder with the ID 903
                      - Made a testpage width: [[GoogleMapMarker? &apiKey=`ABQIAAAAZwK...ect` &startID=`903`]]

                      The only thing i get is Loading map...
                      huh

                      Page can be found at: http://www.forensischepsychiatrie.nl/modx.php?id=904

                      I see a map there, but no markers. And by looking at the source, I see that Ditto is outputting "<p>No entries found.</p>", so do you have any marker documents in the folder (id 903) ?


                        "He can have a lollipop any time he wants to. That's what it means to be a programmer."