We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8960
    • 150 Posts
    I think I’ve temporarily solved Issue #2. When looking at the IE’s View Source, I notice this line within the GoogleMapMarker Javascript call:
                    // This function picks up the click and opens the corresponding info window
                    function myclick(i) {
                        gmarkers[i].openInfoWindowHtml(htmls[i]);
                    }<p>No documents found.</p>
                    // put the assembled sidebar_html contents into the sidebar div
    

    Notice the < p>No documents found.< /p>. This was coming from Ditto. I found it in the english.inc.php file within the Ditto languages folder and I removed the line.

    Long story short, my maps are working in IE for the first time. I’m not sure why Ditto was making that appear, especially since it’s on my document, so it’s not like I’m not seeing my text.

    Now I just need help with getting the markers to show up.

    Thanks!
      • 36582
      • 463 Posts
      Any help with this would be much appreciated. I’ve scoured this thread and tried to follow the instructions carefully but I get no map and the message:

      "You have to provide a Google Maps API Key to use..."

      Here’s my call:

      [[GoogleMapMarker? &apikey=`ABQIA...` &startID=`103` &tpl=`GMap` &centerPos=`47.357955,6.354132` &defaultZoom=`10`]]

      I’m using the page 6 code. MODx 0.9.6.1p2. Ditto 2.0.2

      As far as I can tell everything that’s supposed to be uncached is and unpublished as necessary.

      Get the feeling I’m missing something obvious...

      Many thanks
        Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: chrisandy at Jul 29, 2008, 09:52 AM

        "You have to provide a Google Maps API Key to use..."

        Get the feeling I’m missing something obvious...
        Kind of...you need to put in your valid API key just like it says, which you get from Google.
          • 36582
          • 463 Posts
          SOLVED

          Obviously I copied and pasted in a mistake - I didn’t use a Capital K in the &apiKey

          I told you it was something obvious embarrassed
            Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
            • 750
            • 4 Posts
            Anybody knows how to use different markers on one map for? There’s no way to use TV call from snippet (instead getTemplateVar, but this will return TV from page, where snippet was called...)

            Help me, please.

            P.S. Sorry for my bad English...
              • 7923
              • 4,213 Posts
              Quote from: AK-74U at Aug 04, 2008, 02:12 PM

              Anybody knows how to use different markers on one map for? There’s no way to use TV call from snippet (instead getTemplateVar, but this will return TV from page, where snippet was called...)

              Help me, please.

              P.S. Sorry for my bad English...
              The line numbers in this post matches the snippet code of this posts. So get that snippet as base.

              Then go to line 262, where you find the following:
              function createMarker(point,name,html) {

              change that to:
              function createMarker(point,name,html,iconurl) {


              Then paste the following starting from line 263:
              // Create our custom marker icon
              var icon = new GIcon();
              icon.image = iconurl;
              icon.shadow = "";
              icon.iconSize = new GSize(20, 35);
              icon.shadowSize = new GSize(29, 18);
              icon.iconAnchor = new GPoint(10, 15);
              icon.infoWindowAnchor = new GPoint(5, 1);


              Then in line 271, replace:
              var marker = new GMarker(point);';

              with:
              var marker = new GMarker(point,icon);';


              Then in line 316, find the part:
              var marker = createMarker(point, \'[+title:slashandstrip+]\', \'[+content:slashandstrip+]\');

              and replace that part with:
              var marker = createMarker(point, \'[+pagetitle:slashandstrip+]\', \'[+content:slashandstrip+]\', \'[+longtitle:slashandstrip+]\');


              That should be it.. Now you can set the url of the icon you want to the marker to the "longtitle" field of a document. Didn’t test it though...

              You can also change all those fields in to TVs if you want. The description field is on the same line 316 used to make the point, you can change all those to TV fields if you like.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 36582
                • 463 Posts
                Anybody knows how to use different markers on one map for? There’s no way to use TV call from snippet (instead getTemplateVar, but this will return TV from page, where snippet was called...)

                I’d be really interested to know the outcome of this - been trying to figure it out for a while...
                  Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  You can specify a different document ID in getTemplateVar(’tvname’, <docID here>)
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 7923
                    • 4,213 Posts
                    Quote from: chrisandy at Aug 05, 2008, 02:14 AM

                    Anybody knows how to use different markers on one map for? There’s no way to use TV call from snippet (instead getTemplateVar, but this will return TV from page, where snippet was called...)

                    I’d be really interested to know the outcome of this - been trying to figure it out for a while...
                    What? I thought that question meant that each marker on one map has a different icon.. and that’s what I answered above. If it’s something else, please explain the question a little bit better, so I’ll understand what you mean.


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 36582
                      • 463 Posts
                      Doze - you’re quite right - I was just asking if AK-74U could just let us know if this worked for him. I can’t find the time at the moment to try it myself.
                        Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk