We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29774
    • 386 Posts
    @lmestre

    I’m the original author of GoogleMap. I’ve had a look at your fork and it looks great - nice work - but if you’re planning to add it to the repository I’d appreciate it if you could give it a unique name (such as ’GoogleMapMulti’ ?) rather than GoogleMap 2. I have been working on an update that provides multiple POI but that takes a new approach to configuring the locations, and I’d rather that there was no confusion between the two. Many thanks!
      Snippets: GoogleMap | FileDetails | Related Plugin: SSL
      • 17329
      • 53 Posts
      @therebechips

      Actually, I was not planning a repository addition. I think there is no need for two GoogleMap snippets, it will just add up confusion. Especially if you do plan to add support for multiple POI.
      I would rather contribute to make your snippet fit my requirements. In that sense, please feel free to reuse anything that might be useful in what I did or let me know what I could do to help you.

      Cheers
      lionel
        • 17329
        • 53 Posts
        @therebechips
        You’ll noticed that I removed the logic to form the complete address based on address1,address2, zipcode, town etc...

        Problem is that it’s very hard to form a proper address out of the components. The way you would do it depends very much on the country I think. That is why I tought it was better to leave that out of the snippet for the caller to form the address the way she/he wants.

        For instance :
          In US :        401 W 14th Street, New York City, NY 10014
          In France    2 place de La Défense, 92053 Paris-La-Défense Cedex
          • 29774
          • 386 Posts
          Leaving out the address means that you can’t do geocoding on the fly - and GoogleMap currently makes up to three passes to establish the right point depending on the supplied address details. But it doesn’t always work accurately and a better solution is to provide a way for your content editors to supply the latitude and longitude points within the Manager. I have a working solution for this that provides geocoding and a draggable marker to permit minor tweaks of position:
          http://farm4.static.flickr.com/3502/3266638546_9d743db5d9_o_d.png

          The update will allow a content editor to define multiple POI as modx documents, or provide a configuration file for the points (most likely xml that could also be dynamically generated by a third part script). Eventually it could also provide a way to create relationships between points (eg a route line) and grouping.

          Regarding the format of the bubbles, I was planning to make this templatable so that people can use their own TVs and embed whatever else they like in it, simply by using placeholders in the template.
            Snippets: GoogleMap | FileDetails | Related Plugin: SSL
            • 17329
            • 53 Posts
            For the address I didn’t mean not to pass it, but to pass it in one piece instead of pieces (zip,town ...) that you reassemble in the snippet.

            The idea of having the geocoding integrated in the manager is great stuff indeed. It is definitely better to locate with the coordinates for positions that are static in the website.

            Templating for the bubble is a must. Look at the idea of using a DOM node that I did as well. You could use standard ditto for instance to output on the page and format nicely the info you want to display in each bubble. All that info could be visible or hidden (display:none) depending of the use case. Then you just need to pass the matching node in the page to Google Maps api to make the bubble display.
            In my case for instance, because I wanted to display the info on the page anyway, I do not need to construct twice the same thing (faster, smaller, simpler). In addition, it is easy to alter the node in any way through JavaScript to adapt it for the bubble. For instance I added a link "zoom map to location" that is not on the page but appear in the bubble.
              • 29774
              • 386 Posts
              Using a DOM node is an interesting idea, very flexible! And as you say it makes sense to use the same node if you have multiple points and make it dynamic.

              I’ll see if I can use it smiley

              Cheers

              Mark
                Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                • 20696
                • 18 Posts
                Great stuff,

                Please advice. i wish to display google map with the "satellite option" as oppose to the map itself. what attribute can i add to the snippet call.

                thanks.

                Mut
                  • 1121
                  • 2 Posts
                  Quote from: therebechips at Jun 04, 2009, 04:29 AM

                  I have been working on an update that provides multiple POI but that takes a new approach to configuring the locations, and I’d rather that there was no confusion between the two. Many thanks!

                  @therebechips This is a great snippet! I also have a need to drop 2 pins on a single map and I’d like to stick with your implementation. Do you have any planned timeline for releasing your update that handles that?
                    • 29774
                    • 386 Posts
                    Sorry, I’ve been so busy recently I’ve not had a chance to finish this... so I think it’s likely to be about 2 months away.
                      Snippets: GoogleMap | FileDetails | Related Plugin: SSL
                      • 17771
                      • 14 Posts
                      Hi,

                      I am trying this googlemap snippet into my website. The map displays without any issues on the default page that modx installs which uses the minimal template. But when I am trying to use the same snippet on the page that uses my custom template, the map does not show up. It would be great if you guys can help me with this.

                      Thanks
                      Vinzy
                        Vinzy