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
    Updated the 1.0c code to what’s in my post and added installation instructions file as the extras page was all mess. There are were html, php and modx tags in the instructions that they were stripped out together with most of the instruction lines...

    Anyways.. Warm welcome to the community TartanPhoenix! I hope you will have happy time modxing!

    @coroico about improvements for this snippet.. I will probably do a new snippet for Revolution. I think I’m going to build a site with Revolution soon and I’ll need google map functionality on that site, so I’ll do a new snippet for Rev then. I will look at that marker manager at that time and also include the support for KML / GeoRSS file(s).


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 26931
      • 2,314 Posts
      Updated the 1.0c code to what’s in my post and added installation instructions file as the extras page was all mess. There are were html, php and modx tags in the instructions that they were stripped out together with most of the instruction lines...

      thank you doze!

      jan
        • 29323
        • 4 Posts
        I have modified the code to deal with directions using the LoadFromWaypoints.

        Still in dev state:

        Set up:
        After
        // [text]
        // Name of the Ditto snippet
        $dittoName = (isset($dittoName)) ? $dittoName : "Ditto";
        

        Add
        // [text]
        // Direction Parameters (Array of waypoints)
        $directions = (isset($directions)) ? $directions : "'[email protected],-4.456415','[email protected],-4.511948'";
        


        Then just after
                       map.setCenter(new GLatLng('.$centerPos.'),'.$defaultZoom.');
            
                        //add controls to navigate / zoom
        

        add
                       // Test Directions
                       var directionsPanel = document.getElementById("routes");
                       directions = new GDirections(map, directionsPanel);
                                      //directions.load("from: 55.886814,-4.425087 to: 55.911644,-4.511948");
                                      //directions.load("from:55.912225,-4.456415 to:55.913953,-4.463539 to:55.911644,-4.511948");
                       var waypts = new Array('.$directions.');
                       directions.loadFromWaypoints(waypts);
                        ';
        


        Called within the page content:

        [[GoogleMapMarker? &startID=`8` &directions=`"Start: Erskine Bridge [email protected],-4.456415","Wemyss [email protected],-4.889088","[email protected],-4.618034","[email protected],-4.787979","End: Erskine Bridge [email protected],-4.456415"`]]
        
          • 7923
          • 4,213 Posts
          Sounds great! Thanks for the post!

          I’m thinking for the new snippet to make all coordinate settings optional and use geocode by default. I’d also like to add the driving instructions feature to the component.. will see how it goes..


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 36582
            • 463 Posts
            This is a fantastic snippet - can’t begin to tell you how useful it is.

            Anybody using Googlemapmarker on the same page as Maxigallery? - in my case it breaks Maxigallery / slimbox.


              Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
              • 25737
              • 62 Posts
              Hey guys,

              I am getting the Loading map... error. I followed the instructions just like it said. I created a snippet for GoogleMapMarker. Created a document and added the below code. After that I created another page inside of this docuent with the coordinates, title and map information. I have friendly URL’s enabled.

              [[GoogleMapMarker? &tpl=`Gmaker` &apikey=`ABQIAAAAyZVN_6eVneTpgPWxZda_RBQw5O4K0_brmgiR4SxKgGj0TlRedxRVeNBm1FINq10V5yE3RhW5ueTj4g` &startID=`1` &centerPos=`37.212, -119.797` &defaultZoom=`5` openMouseOverMarker=`1` &mapTypeControl=`none` &hideOverviewMapByDefault=`1`]]


              Take a look here: http://www.24hourfitnessca.com/
                Faithfully using MODx since 2007!
                • 7923
                • 4,213 Posts
                Use uncached snippet call or uncache the document.


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 25737
                  • 62 Posts
                  That worked, thanks!
                    Faithfully using MODx since 2007!
                    • 888
                    • 1 Posts
                    Hi there...
                    im using the GoogleMapMarker snipper, its pretty cool, thanx for the code... Now im having a problem, and its that i have to coords a little closer from each other, and the one of the right is alwasy on top. I have tried to create then changing the order of creation but i still have the one of the right on top. I tried it changing the sort parameter to id, menuindex, and others and the ASC DESC too, but got no result. Im using custom icons, even i dont think thats the problem, can anyones give me a clue of what i should do?? the address of the googlemap im using is:

                    http://88.191.95.80/sites/vihsite/index.php?id=33

                    in there im having the problem with the blue circles, the one of the right is always on top and i need to get the one on the left on top.

                    The coords are:

                    the left circle
                    43.6461701, 3.8686002

                    the right circle:
                    43.52759, 5.41846

                    idk i may think that googlemap always put the right spots in top of the left?





                      • 20967
                      • 3 Posts
                      It is very promising snippet for me. However, could anyone let me know whether it is possible for me to let the web user to mark their location and it become a document in my website or not

                      Best regards
                      Narongwit